/* ============================================================
   HORÓSCOPO TIBETANO — Estilos
   Paleta: granate tibetano, azafrán/dorado, índigo oscuro
   Fuentes: Cinzel + IM Fell English + Crimson Pro + Noto Serif JP
   ============================================================ */

:root {
    --bg-deep:        #12080e;
    --bg-card:        #1a0f16;
    --bg-card2:       #221520;
    --border:         rgba(184,68,60,0.15);
    --border-bright:  rgba(212,165,74,0.45);
    --maroon:         #b8443c;
    --maroon-dim:     #7a2a25;
    --saffron:        #c9963c;
    --gold:           #d4a54a;
    --gold-light:     #e8c96a;
    --gold-dim:       #8a6f2e;
    --white:          #f0ead8;
    --white-dim:      rgba(240,234,216,0.55);
    --white-faint:    rgba(240,234,216,0.22);
    --red-err:        #cc4444;
    --sign-color:     var(--saffron);

    --font-title:     'Cinzel', serif;
    --font-body:      'IM Fell English', serif;
    --font-ui:        'Crimson Pro', serif;
    --font-tibetan:   'Noto Serif JP', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-deep);
    color: var(--white);
    font-family: var(--font-body);
    min-height: 100vh;
}

/* Background */
#ht-app {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 5%, rgba(184,68,60,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 90%, rgba(201,150,60,0.06) 0%, transparent 50%),
        var(--bg-deep);
}

/* Subtle stars */
#ht-app::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.28) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 50%, rgba(255,255,255,0.16) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 60% 12%, rgba(255,255,255,0.22) 0%, transparent 100%),
        radial-gradient(1px 1px at 78% 38%, rgba(255,255,255,0.18) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 65%, rgba(255,255,255,0.16) 0%, transparent 100%),
        radial-gradient(1px 1px at 48% 78%, rgba(255,255,255,0.10) 0%, transparent 100%),
        radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,0.14) 0%, transparent 100%),
        radial-gradient(1px 1px at 68% 85%, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* Container */
.ht-container {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* Header */
.ht-header {
    text-align: center;
    margin-bottom: 40px;
}

.ht-deco-subtitle {
    display: block;
    font-family: var(--font-tibetan);
    font-size: 20px;
    letter-spacing: 10px;
    color: var(--maroon-dim);
    margin-bottom: 14px;
    opacity: 0.7;
}

.ht-title {
    font-family: var(--font-title);
    font-size: clamp(22px, 5.5vw, 38px);
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--saffron);
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
    text-shadow: 0 0 40px rgba(201,150,60,0.3);
}

.ht-result-title {
    text-align: center;
    margin-bottom: 24px;
}

.ht-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 15px;
    color: rgba(240,234,216,0.70);
    letter-spacing: 2px;
    margin-top: 10px;
}

.ht-header-rule {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--maroon-dim), transparent);
    margin: 16px auto 0;
    border-radius: 1px;
}

/* Steps */
.ht-step          { display: none; }
.ht-step.active   {
    display: block;
    animation: stepIn 0.45s ease both;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Ornament */
.ht-ornament {
    text-align: center;
    color: var(--maroon-dim);
    font-size: 16px;
    letter-spacing: 6px;
    margin: 28px 0;
    opacity: 0.6;
}

/* ================================================================
   STEP 1 — FORM
   ================================================================ */

.ht-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px 28px;
    margin-bottom: 24px;
}

.ht-form-main-label {
    display: block;
    font-family: var(--font-title);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--gold-light);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.ht-form-hint {
    font-family: var(--font-ui);
    font-style: italic;
    font-size: 14px;
    color: rgba(240,234,216,0.70);
    margin-bottom: 26px;
}

.ht-year-input-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 220px;
    margin: 0 auto;
}

.ht-year-label {
    font-family: var(--font-title);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--maroon);
    text-transform: uppercase;
    text-align: center;
}

.ht-year-select {
    width: 100%;
    background: rgba(184,68,60,0.05);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-ui);
    font-size: 20px;
    text-align: center;
    /*padding: 14px 12px;*/
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a6f2e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.ht-year-select option {
    background: #1a0f16;
    color: var(--white);
    font-size: 16px;
}

.ht-year-select:focus {
    outline: none;
    border-color: var(--maroon);
    background-color: rgba(184,68,60,0.08);
    box-shadow: 0 0 0 3px rgba(184,68,60,0.12);
}

.ht-year-select.field-error {
    border-color: var(--red-err);
    box-shadow: 0 0 0 3px rgba(204,68,68,0.14);
}

.ht-form-error {
    font-family: var(--font-ui);
    font-style: italic;
    font-size: 13px;
    color: #e07070;
    margin-top: 14px;
    text-align: center;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.2s;
}
.ht-form-error.visible { opacity: 1; }

/* Buttons */
.ht-btn-oracle {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #8a2a25 0%, #b8443c 50%, #8a2a25 100%);
    color: #1a0a08;
    font-family: var(--font-title);
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    border: none;
    border-radius: 6px;
    padding: 16px 24px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(184,68,60,0.25);
}
.ht-btn-oracle:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(184,68,60,0.35);
}
.ht-btn-oracle:active { transform: translateY(0); }

.ht-btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--saffron);
    font-family: var(--font-title);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    padding: 12px 28px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.ht-btn-secondary:hover {
    background: rgba(201,150,60,0.08);
    box-shadow: 0 0 16px rgba(201,150,60,0.15);
    transform: translateY(-1px);
}

/* ================================================================
   STEP 2 — RESULT
   ================================================================ */

.ht-result-hero {
    text-align: center;
    margin-bottom: 24px;
}

/* Tibetan script large with glow */
.ht-tibetan-big {
    font-family: var(--font-tibetan);
    font-size: 72px;
    line-height: 1.2;
    margin-bottom: 4px;
    display: block;
    animation: tibGlow 3s ease-in-out infinite;
    text-shadow: 0 0 24px rgba(201,150,60,0.4);
}

@keyframes tibGlow {
    0%, 100% { filter: drop-shadow(0 0 18px var(--sign-color)); }
    50%       { filter: drop-shadow(0 0 40px var(--sign-color)); }
}

.ht-animal-name {
    font-family: var(--font-title);
    font-size: clamp(26px, 7vw, 44px);
    letter-spacing: 5px;
    color: var(--gold-light);
    text-transform: uppercase;
}

.ht-animal-romaji {
    font-family: var(--font-ui);
    font-style: italic;
    font-size: 16px;
    color: rgba(240,234,216,0.55);
    margin-top: 4px;
    letter-spacing: 2px;
}

.ht-years-label {
    font-family: var(--font-ui);
    font-style: italic;
    font-size: 14px;
    color: rgba(240,234,216,0.65);
    margin-top: 8px;
}

/* Chips */
.ht-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 26px;
    flex-wrap: wrap;
}

.ht-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,150,60,0.3);
    border-radius: 999px;
    padding: 8px 18px;
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--white);
}

.ht-chip-tib {
    font-family: var(--font-tibetan);
    font-size: 18px;
    color: var(--gold-light);
}

.ht-chip.element-wood   { border-color: rgba(90,138,60,0.5);  color: #b4d47a; }
.ht-chip.element-fire   { border-color: rgba(199,62,58,0.5);  color: #f5a07a; }
.ht-chip.element-earth  { border-color: rgba(196,154,60,0.5); color: #e8c070; }
.ht-chip.element-iron   { border-color: rgba(160,160,160,0.5);color: #d0d0d0; }
.ht-chip.element-water  { border-color: rgba(74,127,181,0.5); color: #8fb8e0; }
.ht-chip.mewa           { border-color: rgba(201,150,60,0.4); color: var(--gold-light); }
.ht-chip.yinyang        { border-color: rgba(184,68,60,0.4);  color: #e8a0a0; }

/* Mewa number circle */
.ht-mewa-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 700;
    color: #1a0f16;
}

/* Info cards */
.ht-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--maroon);
    border-radius: 10px;
    padding: 20px 22px;
    opacity: 0;
    transform: translateY(14px);
    animation: cardIn 0.4s ease forwards;
    margin-bottom: 14px;
}
.ht-info-card:nth-child(1) { animation-delay: 0.05s; }
.ht-info-card:nth-child(2) { animation-delay: 0.12s; }
.ht-info-card:nth-child(3) { animation-delay: 0.19s; }
.ht-info-card:nth-child(4) { animation-delay: 0.26s; }
.ht-info-card:nth-child(5) { animation-delay: 0.33s; }
.ht-info-card:nth-child(6) { animation-delay: 0.40s; }
.ht-info-card:nth-child(7) { animation-delay: 0.47s; }

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

.ht-info-card-title {
    font-family: var(--font-title);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--maroon);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ht-info-card-body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--white);
    line-height: 1.8;
}

/* Traits */
.ht-traits-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ht-trait-tag {
    background: rgba(184,68,60,0.08);
    border: 1px solid rgba(184,68,60,0.3);
    border-radius: 4px;
    padding: 6px 14px;
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--white);
}

/* Compatibility */
.ht-compat-section { margin-bottom: 14px; }
.ht-compat-section:last-child { margin-bottom: 0; }

.ht-compat-label {
    font-family: var(--font-title);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--saffron);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.ht-compat-animals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ht-compat-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    padding: 6px 14px;
    font-family: var(--font-ui);
    font-size: 14px;
}

.ht-compat-tag.best {
    background: rgba(90,138,60,0.12);
    border: 1px solid rgba(90,138,60,0.4);
    color: #b4d47a;
}

.ht-compat-tag.challenge {
    background: rgba(184,68,60,0.10);
    border: 1px solid rgba(184,68,60,0.35);
    color: #f5a07a;
}

.ht-compat-emoji { font-size: 16px; }

/* Lucky attributes */
.ht-lucky-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: baseline;
}
.ht-lucky-row:last-child { margin-bottom: 0; }

.ht-lucky-label {
    font-family: var(--font-title);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--saffron);
    text-transform: uppercase;
    min-width: 120px;
    flex-shrink: 0;
}

.ht-lucky-value {
    font-family: var(--font-ui);
    font-size: 15px;
    color: var(--white);
}

.ht-result-actions { text-align: center; }

/* Responsive */
@media (max-width: 500px) {
    .ht-container { padding: 28px 14px 60px; }
    .ht-year-select { font-size: 18px; /*padding: 12px 10px;*/ }
    .ht-tibetan-big { font-size: 52px; }
    .ht-form-card { padding: 24px 18px 22px; }
    .ht-info-card { padding: 16px 16px; }
    .ht-chip { padding: 6px 14px; font-size: 13px; }
    .ht-lucky-label { min-width: 100px; font-size: 9px; }
    .ht-lucky-value { font-size: 14px; }
}