/* =============================================
   TEST ¿QUÉ DEIDAD MITOLÓGICA TE REPRESENTA?
   styles.css
   Estética: cosmos divino, oscuro y épico
   Paleta base: negro cósmico, dorado divino,
   marfil, gradientes dinámicos por mitología
   ============================================= */

:root {
    --black:          #04030a;
    --deep:           #08060f;
    --surface:        #0e0b1a;
    --surface-2:      #15122a;
    --surface-3:      #1e1a3a;
    --border:         rgba(255,255,255,.06);

    /* Variables dinámicas — sobreescritas por JS según mitología */
    --myth-gradient:  linear-gradient(135deg, #100818 0%, #200830 100%);
    --myth-accent:    #c0a0e0;
    --myth-glow:      rgba(192,160,224,.5);

    /* Colores fijos */
    --gold:           #d4a840;
    --gold-light:     #f0cc70;
    --gold-pale:      #fae8b0;
    --silver:         #c8c0e0;
    --ivory:          #f5f0e8;
    --border-gold:    rgba(212,168,64,.3);

    --text:           #ece8f8;
    --text-muted:     #5850a0;
    --text-dim:       #201840;

    --radius:         16px;
    --radius-sm:      10px;
    --transition:     .25s ease;
}

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

body {
    background-color: var(--black);
    background-image: var(--myth-gradient);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    transition: background-image .8s ease;
}

/* ── Steps ── */
.step {
    display: none;
    min-height: 100vh;
    padding: 40px 20px 80px;
    animation: fadeUp .45s ease both;
    position: relative;
}
.step.active { display: flex; flex-direction: column; }

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

.container { max-width: 720px; margin: 0 auto; width: 100%; }
.center-col {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; flex: 1; gap: 22px;
}

/* ── Estrellas animadas ── */
.stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle ease-in-out infinite;
    opacity: 0;
}
@keyframes twinkle {
    0%, 100% { opacity: 0;    transform: scale(1); }
    50%       { opacity: .7;  transform: scale(1.4); }
}

/* Asegura que el contenido quede sobre las estrellas */
.center-col, .container { position: relative; z-index: 1; }

/* ── Símbolo intro ── */
.intro-symbol {
    font-size: 4rem;
    line-height: 1;
    display: block;
    animation: divine-pulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--myth-glow, rgba(212,168,64,.6)));
    color: var(--gold-light);
}
@keyframes divine-pulse {
    0%, 100% { opacity: .75; transform: scale(1)    translateY(0);    }
    50%       { opacity: 1;   transform: scale(1.07) translateY(-8px); }
}

/* ── Título hero ── */
.hero-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.6rem, 4.5vw, 2.9rem);
    font-weight: 700;
    letter-spacing: .05em;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--myth-accent, #c0a0e0) 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-sub {
    font-size: 1rem;
    color: #8880b0;
    max-width: 500px;
    line-height: 1.75;
    font-style: italic;
}

/* ── Strip de mitologías ── */
.mythologies-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 4px;
    max-width: 420px;
    opacity: .55;
}
.mythologies-strip span {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
}
.mythologies-strip span:not(:last-child) { }

/* ── Botón principal ── */
.btn-primary {
    background: linear-gradient(135deg, #1a1440 0%, #38206a 60%, var(--gold) 100%);
    color: var(--gold-pale);
    border: 1px solid rgba(212,168,64,.4);
    border-radius: var(--radius-sm);
    padding: 15px 44px;
    font-family: 'Cinzel', serif;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 28px rgba(212,168,64,.3), 0 0 60px rgba(60,20,100,.4);
    margin-top: 8px;
}
.btn-primary:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(212,168,64,.5), 0 0 80px rgba(60,20,100,.5);
}

/* ── Progreso ── */
.progress-bar-wrap {
    width: 100%; height: 2px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--myth-accent, #c0a0e0), var(--gold-light));
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 0%;
    box-shadow: 0 0 8px var(--myth-glow, rgba(192,160,224,.5));
}
.progress-label {
    font-size: .73rem;
    color: var(--text-muted);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 32px;
    text-align: right;
}

/* ── Preguntas ── */
.question-block { width: 100%; }
.question-num {
    font-family: 'Cinzel', serif;
    font-size: 3.2rem; font-weight: 700;
    color: var(--surface-3);
    line-height: 1; margin-bottom: 8px;
    user-select: none;
    letter-spacing: .05em;
}
.question-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    font-weight: 600; color: var(--text);
    line-height: 1.35; margin-bottom: 28px;
    letter-spacing: .02em;
}

/* ── Opciones ── */
.options-grid { display: flex; flex-direction: column; gap: 10px; }

.opt-btn {
    display: flex; align-items: flex-start; gap: 14px;
    background: rgba(14, 11, 26, .7);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    cursor: pointer; text-align: left;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    width: 100%;
    backdrop-filter: blur(4px);
}
.opt-btn:hover {
    background: rgba(30, 26, 58, .8);
    border-color: rgba(212,168,64,.35);
    transform: translateX(4px);
}
.opt-btn.selected {
    background: rgba(30, 26, 58, .9);
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(212,168,64,.4), 0 4px 20px rgba(212,168,64,.2);
    transform: translateX(6px);
}

.opt-letter {
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid rgba(212,168,64,.25);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: .72rem; font-weight: 600;
    color: var(--gold);
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.opt-btn.selected .opt-letter {
    background: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}
.opt-text {
    font-size: .93rem; color: var(--text); line-height: 1.45;
}

/* ── Loading Olimpo ── */
#step-loading { justify-content: center; align-items: center; gap: 28px; }

.loading-olympus {
    position: relative;
    width: 140px; height: 140px;
    display: flex; align-items: center; justify-content: center;
}
.olympus-ring {
    position: absolute; border-radius: 50%;
    animation: spin-olympus linear infinite;
}
.r1 {
    inset: 0;
    border: 1.5px solid transparent;
    border-top-color: var(--gold);
    border-right-color: var(--gold);
    animation-duration: 4s; opacity: .6;
}
.r2 {
    inset: 16px;
    border: 1px solid transparent;
    border-bottom-color: var(--myth-accent, #c0a0e0);
    border-left-color:   var(--myth-accent, #c0a0e0);
    animation-duration: 2.8s;
    animation-direction: reverse; opacity: .5;
}
.r3 {
    inset: 32px;
    border: 1px dashed rgba(212,168,64,.2);
    animation-duration: 8s; opacity: .4;
}
@keyframes spin-olympus { to { transform: rotate(360deg); } }

.olympus-core {
    font-size: 2.4rem; z-index: 1;
    animation: divine-pulse 2.2s ease-in-out infinite;
    filter: drop-shadow(0 0 14px var(--myth-glow, rgba(212,168,64,.6)));
}

.loading-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem; font-weight: 600;
    color: var(--gold-light); text-align: center;
    letter-spacing: .04em;
}
.loading-sub {
    font-size: .88rem; color: var(--text-muted);
    font-style: italic; text-align: center;
}

/* ── Resultado ── */
#step-result { justify-content: flex-start; }

.result-header {
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    margin-bottom: 28px; text-align: center;
}
.result-symbol {
    font-size: 3.2rem; line-height: 1; display: block;
    animation: divine-pulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 16px var(--myth-glow, rgba(212,168,64,.6)));
    transition: filter .6s ease;
}
.result-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700; letter-spacing: .06em;
    background: linear-gradient(135deg, var(--gold-pale) 0%, var(--myth-accent, #c0a0e0) 50%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-card {
    background: rgba(14, 11, 26, .75);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 34px 38px;
    margin-bottom: 28px;
    box-shadow: 0 8px 50px rgba(0,0,0,.7),
                inset 0 1px 0 rgba(212,168,64,.08),
                0 0 60px rgba(212,168,64,.05);
    position: relative; overflow: hidden;
    backdrop-filter: blur(6px);
    transition: border-color .6s ease, box-shadow .6s ease;
}

/* Ornamento decorativo de esquinas */
.result-card::before,
.result-card::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    border-color: rgba(212,168,64,.25);
    border-style: solid;
    pointer-events: none;
}
.result-card::before {
    top: 12px; left: 12px;
    border-width: 1px 0 0 1px;
}
.result-card::after {
    bottom: 12px; right: 12px;
    border-width: 0 1px 1px 0;
}

.result-text p {
    font-size: 1.04rem; line-height: 1.9;
    color: var(--text); margin-bottom: 20px;
}
.result-text p:first-child::first-letter {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem; font-weight: 700;
    float: left; line-height: .8;
    margin: 4px 10px 0 0;
    color: var(--gold-light);
    text-shadow: 0 0 20px var(--myth-glow, rgba(212,168,64,.5));
}
.result-text p:last-child { margin-bottom: 0; }

/* ── Botones ── */
.result-actions { display: flex; justify-content: center; }
.btn-reset {
    background: transparent;
    color: var(--gold-light);
    border: 1px solid rgba(212,168,64,.5);
    border-radius: var(--radius-sm);
    padding: 12px 34px;
    font-family: 'Cinzel', serif;
    font-size: .88rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-reset:hover {
    background: rgba(212,168,64,.15);
    border-color: var(--gold-light);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.88);
    display: none; align-items: center; justify-content: center;
    z-index: 100; backdrop-filter: blur(8px); padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: var(--surface-2);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 44px 36px; max-width: 440px; width: 100%;
    text-align: center;
    box-shadow: 0 20px 70px rgba(0,0,0,.8), 0 0 40px rgba(212,168,64,.1);
    animation: fadeUp .3s ease;
}
.modal-icon {
    font-size: 2.4rem; margin-bottom: 16px;
    display: block; color: var(--gold-light);
}
.modal-msg { color: var(--text); line-height: 1.65; margin-bottom: 20px; }
.btn-modal-close {
    background: linear-gradient(135deg, #2a1850 0%, var(--gold) 100%);
    color: var(--gold-pale);
    border: none; border-radius: var(--radius-sm);
    padding: 12px 30px;
    font-family: 'Cinzel', serif;
    font-size: .88rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    cursor: pointer; transition: opacity var(--transition); margin-top: 8px;
}
.btn-modal-close:hover { opacity: .85; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .result-card     { padding: 22px 18px; }
    .result-card::before, .result-card::after { width: 20px; height: 20px; }
    .question-text   { font-size: 1.15rem; }
    .opt-btn         { padding: 12px 14px; }
    .hero-title      { font-size: 1.5rem; }
    .mythologies-strip span { font-size: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
