/* =============================================
   TEST DE VIDAS PASADAS — styles.css
   Diseño: púrpura profundo, índigo, plata
   Estética: mística, etérea, ancestral
   ============================================= */

:root {
    --black:        #06050f;
    --deep:         #0c0a1a;
    --surface:      #111028;
    --surface-2:    #17153a;
    --surface-3:    #1e1c45;
    --border:       rgba(255,255,255,.07);
    --border-indigo:rgba(120,100,220,.3);

    --indigo:       #4a3fa0;
    --indigo-light: #6a5fc0;
    --purple:       #7a40c0;
    --purple-light: #a060e0;
    --violet:       #b07aff;
    --silver:       #c8c0e8;
    --silver-dim:   #8880aa;
    --gold:         #c9993a;
    --gold-light:   #e8c06a;

    --text:         #ece8f8;
    --text-muted:   #7870a0;
    --text-dim:     #3a3460;

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

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

body {
    background: var(--black);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(74,63,160,.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(122,64,192,.12) 0%, transparent 60%);
}

/* ── Steps ── */
.step {
    display: none;
    min-height: 100vh;
    padding: 40px 20px 80px;
    animation: fadeUp .45s ease both;
}
.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: 24px;
}

/* ── Símbolo ∞ ── */
.intro-symbol, .result-symbol {
    font-size: 4rem;
    color: var(--violet);
    line-height: 1;
    animation: float-symbol 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(176,122,255,.5);
}
@keyframes float-symbol {
    0%, 100% { transform: translateY(0);   opacity: .8; }
    50%       { transform: translateY(-8px); opacity: 1;  }
}

/* ── Títulos ── */
.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: .04em;
    background: linear-gradient(135deg, var(--silver) 0%, var(--violet) 60%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.15;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--silver-dim);
    max-width: 500px;
    line-height: 1.7;
    font-style: italic;
}

/* ── Botón principal ── */
.btn-primary {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--purple) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 24px rgba(106,95,192,.4);
    margin-top: 8px;
}
.btn-primary:hover {
    opacity: .9;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(106,95,192,.6);
}

/* ── Barra de progreso ── */
.progress-bar-wrap {
    width: 100%;
    height: 3px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--indigo-light), var(--violet));
    border-radius: 2px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
    width: 0%;
    box-shadow: 0 0 8px rgba(176,122,255,.5);
}

.progress-label {
    font-size: .78rem;
    color: var(--text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 32px;
    text-align: right;
}

/* ── Pregunta ── */
.question-block { width: 100%; }

.question-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--surface-3);
    line-height: 1;
    margin-bottom: 8px;
    user-select: none;
}

.question-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 28px;
}

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

.opt-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    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%;
}
.opt-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-indigo);
    transform: translateX(4px);
}
.opt-btn.selected {
    background: var(--surface-3);
    border-color: var(--indigo-light);
    box-shadow: 0 0 0 1px var(--indigo-light), 0 4px 16px rgba(106,95,192,.3);
    transform: translateX(6px);
}

.opt-letter {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--surface-2);
    border: 1px solid var(--border-indigo);
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--violet);
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.opt-btn.selected .opt-letter {
    background: var(--indigo-light);
    color: #fff;
    border-color: var(--indigo-light);
}

.opt-text {
    font-size: .95rem;
    color: var(--text);
    line-height: 1.4;
}

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

.loading-orb {
    position: relative;
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
    animation: spin-ring linear infinite;
}
.r1 {
    inset: 0;
    border-top-color: var(--violet);
    border-right-color: var(--violet);
    animation-duration: 3s;
    opacity: .7;
}
.r2 {
    inset: 14px;
    border-bottom-color: var(--indigo-light);
    border-left-color: var(--indigo-light);
    animation-duration: 2.2s;
    animation-direction: reverse;
    opacity: .55;
}
.r3 {
    inset: 28px;
    border-top-color: var(--silver);
    animation-duration: 1.6s;
    opacity: .3;
}
@keyframes spin-ring {
    to { transform: rotate(360deg); }
}

.orb-core {
    font-size: 2rem;
    color: var(--violet);
    text-shadow: 0 0 20px rgba(176,122,255,.8);
    animation: float-symbol 2s ease-in-out infinite;
    z-index: 1;
}

.loading-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--silver);
    text-align: center;
}
.loading-sub {
    font-size: .9rem;
    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: 10px;
    margin-bottom: 28px;
    text-align: center;
}
.result-symbol { font-size: 2.5rem; }

.result-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 600;
    background: linear-gradient(135deg, var(--silver) 0%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border-indigo);
    border-radius: var(--radius);
    padding: 32px 36px;
    margin-bottom: 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04);
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '∞';
    position: absolute;
    top: -20px; right: -10px;
    font-size: 8rem;
    color: var(--indigo);
    opacity: .06;
    pointer-events: none;
    user-select: none;
}

.result-text p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    margin-bottom: 18px;
}
.result-text p:last-child { margin-bottom: 0; }

/* ── Botones ── */
.result-actions { display: flex; justify-content: center; }

.btn-reset {
    background: transparent;
    color: var(--violet);
    border: 1px solid var(--indigo-light);
    border-radius: var(--radius-sm);
    padding: 12px 32px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.btn-reset:hover {
    background: var(--indigo);
    color: #fff;
    border-color: var(--indigo);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8);
    display: none; align-items: center; justify-content: center;
    z-index: 100;
    backdrop-filter: blur(6px);
    padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--surface-2);
    border: 1px solid var(--border-indigo);
    border-radius: var(--radius);
    padding: 40px 32px;
    max-width: 440px; width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    animation: fadeUp .3s ease;
}
.modal-icon { font-size: 2.2rem; color: var(--violet); margin-bottom: 16px; }
.modal-msg  { color: var(--text); line-height: 1.6; margin-bottom: 20px; }

.btn-modal-close {
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    font-weight: 500;
    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; }
    .question-text { font-size: 1.3rem; }
    .opt-btn { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
