/* ==========================================================================
   CHASIDE & PSYCHOMETRIC HUB PREMIUM v5.0 — Dark Academia Elite
   ========================================================================== */
:root {
    --gold:       #C5A059;
    --gold-light: #E8C97A;
    --gold-dim:   rgba(197, 160, 89, 0.12);
    --bg:         #060913;
    --surface:    rgba(255, 255, 255, 0.025);
    --border:     rgba(197, 160, 89, 0.14);
    --text:       #F0EDE6;
    --muted:      rgba(240, 237, 230, 0.5);
    --serif:      'Cinzel', serif;
    --sans:       'Inter', sans-serif;
    --ease:       cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ajustes de Navbar y Main Layout */
.screen {
    display: none;
    min-height: 100vh;
    padding-top: 100px;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ──────────────────────────────────────────────────────────────────────────
   1. ESTILOS DEL HUB / BIBLIOTECA DE EVALUACIONES
   ────────────────────────────────────────────────────────────────────────── */
.hub-main-container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    padding: 120px 0 8rem;
}

.hub-header-section {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3.5rem;
}

.hub-pretitle {
    display: inline-block;
    font-size: 0.62rem;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--border);
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    background: rgba(197, 160, 89, 0.03);
    margin-bottom: 1.5rem;
}

.hub-title {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 1px;
    color: #F0EDE6;
    margin-bottom: 0.6rem;
}

.gold-bar.centered {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 1.8rem auto;
    opacity: 0.45;
}

.hub-desc {
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.85;
    font-weight: 300;
}

/* Buscador y Controles de Filtro */
.hub-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    margin-bottom: 4rem;
    width: 100%;
}

.search-box-wrap {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.35;
    pointer-events: none;
}

#test-search-input {
    width: 100%;
    padding: 1.1rem 1.1rem 1.1rem 2.8rem;
    background: rgba(10, 14, 28, 0.45);
    border: 1px solid rgba(197, 160, 89, 0.16);
    border-radius: 30px;
    color: #F0EDE6;
    font-family: var(--sans);
    font-size: 0.88rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    backdrop-filter: blur(12px);
    transition: all 0.3s var(--ease);
}

#test-search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.15), inset 0 0 8px rgba(197, 160, 89, 0.05);
    background: rgba(10, 14, 28, 0.65);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.filter-chip {
    padding: 0.5rem 1.3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.filter-chip:hover {
    border-color: rgba(197, 160, 89, 0.25);
    color: var(--gold-light);
    background: rgba(197, 160, 89, 0.03);
}

.filter-chip.active {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-light);
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.1);
}

/* Grid de Tarjetas */
.test-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 2rem;
    width: 100%;
}

.test-card {
    background: rgba(10, 14, 28, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease);
}

.test-card.active-test:hover {
    border-color: rgba(197, 160, 89, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 25px rgba(197, 160, 89, 0.05);
}

.test-card.active-test::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.test-card.active-test:hover::before {
    opacity: 0.65;
}

/* Bloqueado / Locked */
.test-card.locked-test {
    opacity: 0.55;
    background: rgba(7, 9, 20, 0.35);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.card-badge {
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.card-badge.active {
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.25);
    color: var(--gold-light);
}

.card-badge.locked {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.card-cat-label {
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.7;
}

.card-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.35;
    color: #F0EDE6;
    margin-bottom: 1rem;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-lead {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.stat-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 300;
}

.stat-icon {
    font-size: 0.75rem;
    opacity: 0.7;
}

.btn-card-start {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--gold), #9A7A2A);
    color: #060913;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s var(--ease);
}

.btn-card-start:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.25);
}

.btn-card-start.disabled {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(240, 237, 230, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

/* ──────────────────────────────────────────────────────────────────────────
   2. ESTILOS DE LA FICHA METODOLÓGICA (WELCOME GRID)
   ────────────────────────────────────────────────────────────────────────── */
#welcome-screen {
    padding-top: 100px;
}

.welcome-grid-container {
    max-width: 1100px;
    width: 90%;
    margin: 20px auto 4rem;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3.5rem;
    align-items: start;
}

/* Columna Izquierda: Acrónimo */
.acronym-breakdown-section {
    position: sticky;
    top: 120px;
}

.acronym-heading {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 400;
    color: #F0EDE6;
    margin-bottom: 0.8rem;
}

.acronym-heading strong {
    color: var(--gold);
    font-weight: 400;
}

.acronym-lead {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 2.2rem;
    font-weight: 300;
}

.acronym-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.acronym-item-row {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.005);
    transition: all 0.35s var(--ease);
}

.acronym-item-row:hover {
    border-color: rgba(197, 160, 89, 0.16);
    background: rgba(197, 160, 89, 0.02);
    transform: translateX(6px);
}

.acronym-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--row-color);
    color: #060913;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 0.95rem;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.acronym-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.acronym-title {
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

.acronym-item-row:hover .acronym-title {
    color: var(--gold-light);
}

.acronym-desc {
    font-size: 0.74rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.45;
}

/* Columna Derecha: Ficha Científica */
.scientific-sheet-section {
    width: 100%;
}

.sheet-card {
    background: rgba(10, 14, 28, 0.45);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.sheet-badge {
    display: inline-block;
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.25);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1.4rem;
}

.sheet-title {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: #F0EDE6;
    letter-spacing: 1px;
}

.gold-bar-left {
    width: 45px;
    height: 1px;
    background: var(--gold);
    margin: 1.2rem 0 2rem;
    opacity: 0.5;
}

.sheet-body-content {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin-bottom: 2.8rem;
}

.sheet-sub {
    font-family: var(--serif);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.sheet-text {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.85;
    font-weight: 300;
}

.sheet-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-left: 0.2rem;
}

.sheet-features-list li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.6;
    font-weight: 300;
}

.sheet-features-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0.1rem;
    color: var(--gold);
    font-size: 0.6rem;
}

.sheet-features-list li strong {
    color: var(--gold-light);
    font-weight: 500;
}

.sheet-text-accent {
    padding: 1.1rem 1.4rem;
    border-left: 2px solid var(--gold);
    background: rgba(197, 160, 89, 0.03);
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text);
    border-radius: 0 8px 8px 0;
}

.sheet-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2.8rem;
    padding: 1.8rem;
    border: 1px solid rgba(197, 160, 89, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.005);
}

.meta-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.bubble-num {
    font-family: var(--serif);
    font-size: 1.8rem;
    color: var(--gold);
    font-weight: 400;
    line-height: 1.2;
}

.bubble-label {
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 400;
}

.btn-start-eval {
    display: block;
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, var(--gold), #9A7A2A);
    color: #060913;
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s var(--ease);
    margin-bottom: 1.2rem;
}

.btn-start-eval:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(197, 160, 89, 0.25);
}

.sheet-disclaimer {
    font-size: 0.72rem;
    color: var(--muted);
    opacity: 0.55;
    line-height: 1.6;
    text-align: center;
    font-weight: 300;
}

/* ──────────────────────────────────────────────────────────────────────────
   3. ESTILOS DE LA PANTALLA DEL TEST Y PREGUNTAS (TEST SCREEN)
   ────────────────────────────────────────────────────────────────────────── */
#test-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 110px 5% 5rem;
    min-height: 100vh;
    width: 100%;
}

#test-screen.active {
    display: flex;
}

/* Barra de progreso superior segmentada */
.progress-track {
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    height: 3.5px;
    background: rgba(197, 160, 89, 0.07);
    z-index: 200;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    width: 0%;
    transition: width 0.5s var(--ease);
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.5);
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 700px;
    margin: 1.6rem 0 2rem;
}

.progress-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.65;
}

.area-chip {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.area-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    transition: background 0.4s;
}

/* Tarjeta de Pregunta Real */
.card-container {
    width: 100%;
    max-width: 700px;
}

.question-card {
    background: rgba(10, 14, 28, 0.65);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 3rem 3.5rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--area-color, var(--gold)), transparent);
    opacity: 0.6;
    transition: background 0.4s;
}

.question-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.04), transparent 70%);
    pointer-events: none;
}

.q-number {
    font-family: var(--serif);
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.q-number::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.q-text {
    font-family: var(--serif);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    line-height: 1.6;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 2.8rem;
    min-height: 3rem;
}

/* Botones Binarios (Sí / No) */
.options-binary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-binary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.4rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.12);
    background: rgba(255, 255, 255, 0.015);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.35s var(--ease);
}

.btn-binary .btn-label {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 2px;
}

.btn-binary .btn-sub {
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
}

.btn-binary.yes:hover:not(.disabled) {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.08);
    color: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.12);
}

.btn-binary.no:hover:not(.disabled) {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    transform: translateY(-3px);
}

.btn-binary.selected-yes {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.12);
    color: var(--gold-light);
}

.btn-binary.selected-no {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.btn-binary.disabled {
    cursor: default;
    opacity: 0.45;
}

.btn-binary.disabled.selected-yes,
.btn-binary.disabled.selected-no {
    opacity: 1;
}

/* Navegación Inferior (Retroceder) */
.test-nav {
    margin-top: 1.6rem;
    width: 100%;
    max-width: 700px;
    display: flex;
    justify-content: flex-start;
}

.btn-prev {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-prev:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ──────────────────────────────────────────────────────────────────────────
   4. ANIMACIONES SUTILES
   ────────────────────────────────────────────────────────────────────────── */
.animate-fade-up {
    animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.slide-in-right {
    animation: slideInRight 0.42s var(--ease) both;
}

.slide-in-left {
    animation: slideInLeft 0.42s var(--ease) both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(55px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-55px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   5. RESPONSIVE COMPACTO
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 950px) {
    .welcome-grid-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .acronym-breakdown-section {
        position: static;
    }
    
    .acronym-heading {
        font-size: 2.2rem;
    }
}

@media (max-width: 660px) {
    .hub-main-container {
        padding: 90px 0 5rem;
    }
    
    .sheet-card {
        padding: 2rem 1.4rem;
    }
    
    .question-card {
        padding: 2rem 1.4rem;
    }
    
    .sheet-meta-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
        padding: 1.2rem;
    }
    
    .welcome-meta {
        gap: 1.4rem;
        padding: 1.5rem;
    }
    
    .score-row {
        grid-template-columns: 120px 1fr 36px;
    }
    
    .progress-meta {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
    }
}
