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

/* ===== THEME VARIABLES ===== */
:root,
[data-theme="dark"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --bg: #0f172a;
    --bg2: #1e293b;
    --bg3: #334155;
    --text: #f1f5f9;
    --text2: #cbd5e1;
    --text3: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 30px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
    --header-bg: rgba(15, 23, 42, .95);
    --grad1: linear-gradient(135deg, #667eea, #764ba2);
    --grad2: linear-gradient(135deg, #f093fb, #f5576c);
    --grad3: linear-gradient(135deg, #4facfe, #00f2fe);
    --grad4: linear-gradient(135deg, #43e97b, #38f9d7);
    --grad5: linear-gradient(135deg, #fa709a, #fee140);
    --grad6: linear-gradient(135deg, #f6d365, #fda085);
    --grad7: linear-gradient(135deg, #a18cd1, #fbc2eb);
    --grad8: linear-gradient(135deg, #ff6a88, #ff9a9e);
    --grad9: linear-gradient(135deg, #84fab0, #8fd3f4);
    --grad10: linear-gradient(135deg, #fccb90, #d57eeb);
}

[data-theme="light"] {
    --bg: #f1f5f9;
    --bg2: #ffffff;
    --bg3: #e2e8f0;
    --text: #1e293b;
    --text2: #475569;
    --text3: #64748b;
    --border: #cbd5e1;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .12);
    --header-bg: rgba(241, 245, 249, .95);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh; /* evita scroll extra en móviles con barra de URL */
    transition: background .3s, color .3s;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, .08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, .08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===== SCREENS ===== */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s, transform .4s;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg2);
    border: 2px solid var(--border);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all .3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.sound-toggle {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg2);
    border: 2px solid var(--border);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all .3s;
}

.sound-toggle:hover {
    transform: scale(1.1);
}

.sound-toggle.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, .15);
}

.focus-toggle {
    position: fixed;
    bottom: 140px;
    right: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg2);
    border: 2px solid var(--border);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all .3s;
}

.focus-toggle:hover {
    transform: scale(1.1);
}

.focus-toggle.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, .18);
    animation: focusPulse 2s infinite;
}

@keyframes focusPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, .3)
    }

    50% {
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0)
    }
}

/* ===== FLOATING CLOCK ===== */
.floating-clock {
    position: fixed;
    bottom: 210px;
    right: 20px;
    z-index: 9998;
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.3rem 0.35rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.05rem;
    width: 58px;
    overflow: hidden;
}

.floating-clock:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
}

.clock-time {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: clip;
}

.clock-date {
    font-size: 0.45rem;
    color: var(--text3);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: clip;
}

/* Responsive: adjust clock on mobile */
@media (max-width: 768px) {
    .floating-clock {
        bottom: 220px;
        right: 10px;
        padding: 0.3rem 0.3rem;
        width: 54px;
    }

    .clock-time {
        font-size: 0.55rem;
    }

    .clock-date {
        font-size: 0.42rem;
    }
}

/* ===== FOCUS MODE ===== */
body.focus-mode .theme-toggle {
    display: none !important;
}

body.focus-mode .focus-toggle {
    bottom: 20px;
}

body.focus-mode {
    background: var(--bg);
}

/* Hide navbar ONLY when a lesson is active */
body.focus-mode:has(#lesson-screen.active) .navbar {
    display: none !important;
}

body.focus-mode #lesson-screen.active {
    opacity: 1;
    transform: none;
    overflow: hidden;
}

/* Lesson screen fills viewport ONLY when active */
body.focus-mode #lesson-screen.active {
    display: flex !important;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Lock body scroll only when lesson is active in focus mode */
body.focus-mode:has(#lesson-screen.active) {
    overflow: hidden;
}

body.focus-mode #lesson-screen .screen-header {
    background: var(--bg2);
    border-bottom: 2px solid var(--primary);
    position: relative;
    top: auto;
    z-index: 100;
    flex-shrink: 0;
    padding: .5rem 2rem;
}

body.focus-mode #lesson-screen .screen-header h2 {
    font-size: 1.05rem;
}

/* Content: centered column */
body.focus-mode .lesson-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 0;
    padding: 1.5vh 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Cards: large, fills available space */
body.focus-mode .question-card,
body.focus-mode .case-study,
body.focus-mode .info-card {
    border: 2px solid rgba(99, 102, 241, .3);
    box-shadow: 0 4px 40px rgba(99, 102, 241, .08), 0 0 80px rgba(99, 102, 241, .04);
    background: var(--bg2);
    width: 96%;
    max-width: 1100px;
    overflow-y: auto;
    max-height: 100%;
    padding: 3vh 4vw;
    border-radius: 20px;
    scrollbar-width: thin;
}

body.focus-mode .question-card::-webkit-scrollbar,
body.focus-mode .case-study::-webkit-scrollbar,
body.focus-mode .info-card::-webkit-scrollbar {
    width: 6px;
}

body.focus-mode .question-card::-webkit-scrollbar-thumb,
body.focus-mode .case-study::-webkit-scrollbar-thumb,
body.focus-mode .info-card::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 6px;
}

/* Opciones: 2 columnas, grandes */
body.focus-mode .options-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.2vh 1.5vw;
    margin-bottom: 1.5vh;
    margin-top: 1vh;
}

body.focus-mode .option-btn {
    padding: 1.4vh 1.8vw;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    border-radius: 14px;
    line-height: 1.45;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

body.focus-mode .option-letter {
    width: 2.4rem;
    height: 2.4rem;
    min-width: 2.4rem;
    border-radius: 10px;
    font-size: 1.05rem;
}

/* Texto principal: grande y centrado */
body.focus-mode .question-text {
    font-size: clamp(1.3rem, 1.8vw, 1.8rem);
    margin-bottom: 1.5vh;
    line-height: 1.5;
    text-align: center;
    padding: 1vh 1.5vw;
    background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(99, 102, 241, .07));
    border: 1px solid rgba(99, 102, 241, .35);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, .12);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

body.focus-mode .question-type {
    margin-bottom: 1vh;
    font-size: .9rem;
    padding: .35rem 1rem;
    display: inline-block;
}

body.focus-mode .question-timer {
    margin-bottom: 1vh;
    padding: .4rem 1.2rem;
    font-size: .95rem;
}

/* Caso de estudio */
body.focus-mode .case-title {
    font-size: clamp(1.3rem, 1.6vw, 1.6rem);
    margin-bottom: .8vh;
    text-align: center;
}

body.focus-mode .case-scenario {
    padding: 1.2vh 2vw;
    margin-bottom: 1.2vh;
    line-height: 1.55;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    background: rgba(99, 102, 241, .05);
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

body.focus-mode .case-question {
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    margin-bottom: 1vh;
    text-align: center;
    padding: .9vh 1.2vw;
    background: linear-gradient(135deg, rgba(99, 102, 241, .14), rgba(99, 102, 241, .06));
    border: 1px solid rgba(99, 102, 241, .3);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(99, 102, 241, .1);
}

/* Feedback */
body.focus-mode .feedback-box {
    padding: 1.2vh 2vw;
    margin-bottom: 1vh;
    font-size: clamp(.95rem, 1.1vw, 1.1rem);
    line-height: 1.5;
    border-radius: 14px;
}

body.focus-mode .feedback-title {
    margin-bottom: .4vh;
    font-size: 1.1rem;
}

body.focus-mode .question-actions {
    margin-top: .8vh;
}

body.focus-mode .question-actions .btn-primary {
    padding: 1vh 2.5vw;
    font-size: 1.05rem;
}

/* Info card */
body.focus-mode .info-title {
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    margin-bottom: 1.2vh;
    text-align: center;
}

body.focus-mode .info-content {
    line-height: 1.7;
    font-size: clamp(1.1rem, 1.35vw, 1.3rem);
    max-width: 900px;
    margin: 0 auto;
}

body.focus-mode .continue-btn {
    margin-top: 1.5vh;
}

/* True/False: botones grandes */
body.focus-mode .truefalse-container {
    gap: 2vw;
    margin-bottom: 1.2vh;
    display: flex;
    justify-content: center;
}

body.focus-mode .tf-btn {
    padding: 2vh 4vw;
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    border-radius: 16px;
    min-width: 200px;
}

/* Classify */
body.focus-mode .classify-categories {
    gap: 1vw;
    margin-bottom: 1vh;
}

body.focus-mode .classify-items {
    gap: .6rem;
    margin-bottom: 1vh;
}

body.focus-mode .classify-item {
    padding: .6rem 1rem;
    font-size: .95rem;
    border-radius: 12px;
}

/* Fun facts */
body.focus-mode .fun-fact-card {
    padding: .6vh 1.5vw;
    margin-bottom: .6vh;
    flex-shrink: 0;
    max-width: 1100px;
    width: 96%;
    font-size: .9rem;
    border-radius: 12px;
}

/* Nav bar in focus */
body.focus-mode #q-nav-container {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Answered review in focus */
body.focus-mode .answered-review {
    text-align: left;
}

/* Focus badge */
body.focus-mode::after {
    content: '🎯 Modo Concentración';
    position: fixed;
    top: 10px;
    right: 70px;
    font-size: .75rem;
    color: var(--accent);
    background: rgba(245, 158, 11, .1);
    padding: 4px 12px;
    border-radius: 20px;
    z-index: 10000;
    border: 1px solid rgba(245, 158, 11, .3);
    animation: focusBadgeFade 3s forwards;
}

@keyframes focusBadgeFade {
    0% {
        opacity: 1
    }

    80% {
        opacity: 1
    }

    100% {
        opacity: 0
    }
}

/* ===== QUESTION NAV BAR ===== */
.q-nav-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem 1.5rem;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
}

.q-nav-arrow {
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: .3rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all .2s;
}

.q-nav-arrow:hover:not(:disabled) {
    background: var(--bg3);
    color: var(--primary-light);
}

.q-nav-arrow.disabled,
.q-nav-arrow:disabled {
    opacity: .25;
    cursor: not-allowed;
}

.q-nav-dots {
    display: flex;
    gap: .35rem;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.q-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg3);
    color: var(--text3);
    font-size: .7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.q-dot:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.q-dot.current {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(99, 102, 241, .4);
}

.q-dot.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, .2);
    color: var(--success);
}

.q-dot.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, .2);
    color: var(--danger);
}

.q-dot.visited {
    border-color: var(--text3);
    background: rgba(148, 163, 184, .15);
    color: var(--text3);
}

/* Answered review card */
.answered-review {
    opacity: .95;
}

.answered-badge {
    display: inline-block;
    padding: .3rem .9rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Nav warning toast */
.nav-warning-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(245, 158, 11, .95);
    color: #000;
    padding: .7rem 1.5rem;
    border-radius: 12px;
    font-size: .9rem;
    z-index: 99999;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
    opacity: 0;
    transition: all .4s;
    white-space: nowrap;
}

.nav-warning-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Focus mode: nav bar */
body.focus-mode .q-nav-bar {
    padding: .5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg2);
    border-radius: 0 0 12px 12px;
}

body.focus-mode .q-dot {
    width: 30px;
    height: 30px;
    font-size: .75rem;
}

body.focus-mode .q-nav-arrow {
    padding: .4rem;
}

body.focus-mode .q-nav-arrow svg {
    width: 22px;
    height: 22px;
}

/* ===== HINT (inline in nav bar) ===== */
.hint-btn {
    position: fixed;
    right: 20px;
    bottom: 280px;
    z-index: 9999;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    transition: all .3s;
    animation: hintPulse 2s infinite;
}

@keyframes hintPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 8px 35px rgba(245, 158, 11, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    }
}

.hint-btn:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: #fff;
}

.hint-btn.show {
    display: flex;
}

.hint-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hint-btn .hint-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.hint-btn .hint-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hint-bubble {
    display: none;
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    animation: hintAppear .3s ease;
    box-shadow: 0 6px 25px rgba(0, 0, 0, .2);
    margin: 1rem auto;
    max-width: 85%;
    width: fit-content;
    text-align: center;
    border-left: 6px solid var(--accent);
    border-right: 6px solid var(--accent);
}

.hint-bubble.show {
    display: block;
}

@keyframes hintAppear {
    from {
        opacity: 0;
        transform: translateY(-5px)
    }

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

/* ===== AUTH SCREENS ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    animation: fadeInUp .6s;
    position: relative;
    z-index: 2;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

/* Floating topic tags */
.auth-floating-tags {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.floating-tag {
    position: absolute;
    white-space: nowrap;
    background: rgba(99, 102, 241, .06);
    color: var(--text3);
    border: 1px solid rgba(99, 102, 241, .12);
    border-radius: 24px;
    padding: .45rem 1rem;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .3px;
    opacity: 0;
    pointer-events: auto;
    cursor: default;
    animation: floatTag var(--ft-dur, 20s) ease-in-out infinite;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s, border-color .3s;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
    contain: layout style paint;
}

.floating-tag:hover {
    background: rgba(99, 102, 241, .25);
    color: #fff;
    border-color: var(--primary);
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 20px rgba(99, 102, 241, .35);
    z-index: 5;
    opacity: .95 !important;
}

@keyframes floatTag {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
    4%   { opacity: .45; transform: translate(-50%, -50%) scale(1); }
    20%  { opacity: .35; transform: translate(-50%, -50%) translate(6px, -8px); }
    40%  { opacity: .55; transform: translate(-50%, -50%) translate(10px, 4px); }
    60%  { opacity: .3; transform: translate(-50%, -50%) translate(-7px, 7px); }
    80%  { opacity: .5; transform: translate(-50%, -50%) translate(-8px, -5px); }
    100% { opacity: .35; transform: translate(-50%, -50%) translate(0, 0); }
}

.shield-icon.small {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 1rem;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text3);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .4rem;
    color: var(--text2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg3);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: .95rem;
    transition: border-color .3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-error {
    color: var(--danger);
    font-size: .85rem;
    margin-bottom: .75rem;
    min-height: 1.2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text3);
    font-size: .9rem;
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nav-logo {
    font-size: 1.5rem;
}

.nav-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-links {
    flex: 1;
    display: flex;
    gap: .25rem;
    justify-content: center;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text3);
    padding: .5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .9rem;
    transition: all .2s;
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--bg3);
    color: var(--text);
}

.nav-btn.nav-admin {
    color: var(--accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.nav-username {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.25;
}

.nav-user-meta {
    font-size: .75rem;
    color: var(--text3);
    line-height: 1.25;
}

.nav-user-center {
    font-size: .7rem;
    color: var(--text3);
    line-height: 1.25;
    opacity: .9;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}

.nav-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .3s;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg2);
    z-index: 199;
    padding: 1rem;
    flex-direction: column;
    gap: .5rem;
    overflow-y: auto;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu-item {
    background: var(--bg3);
    border: none;
    color: var(--text);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all .2s;
}

.mobile-menu-item:hover {
    background: var(--primary);
    color: white;
}

.mobile-menu-item.danger {
    color: var(--danger);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-back,
.btn-sm {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--grad1);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, .3);
}

.btn-secondary {
    background: var(--bg3);
    color: var(--text);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.btn-back {
    background: var(--bg3);
    color: var(--text);
    padding: .6rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    justify-content: center;
}

.btn-back:hover {
    background: var(--border);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: .6rem 1.2rem;
    font-size: .85rem;
    border-radius: 8px;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: .9;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* ===== GLOBAL HOVER HIGHLIGHT ===== */
/* All clickable elements get a subtle highlight on hover */
.btn-primary:hover,
.btn-secondary:hover,
.btn-sm:hover,
.btn-back:hover,
.btn-danger:hover,
.btn-success:hover,
.nav-btn:hover,
.admin-tab:hover,
.level-card:hover,
.admin-action-btn:hover,
.admin-filter:hover,
.study-topic-tag.more:hover {
    filter: brightness(1.15);
}

/* Outline glow for buttons */
.btn-primary:hover,
.btn-sm.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, .3);
}

.btn-secondary:hover,
.btn-sm.btn-secondary:hover {
    box-shadow: 0 2px 12px rgba(99, 102, 241, .12);
}

/* Admin tabs hover highlight */
.admin-tab:hover:not(.active) {
    background: rgba(99, 102, 241, .08);
    border-color: rgba(99, 102, 241, .3);
    color: var(--primary);
}

/* Table row hover */
.admin-table tbody tr:hover {
    background: rgba(99, 102, 241, .06) !important;
}

/* Action icons hover */
.admin-action-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

/* Select/filter hover */
.admin-filter:hover,
.admin-filter-search:hover,
.admin-input:hover {
    border-color: rgba(99, 102, 241, .4);
}

/* Nav buttons */
.nav-btn:hover {
    box-shadow: 0 2px 8px rgba(99, 102, 241, .1);
}

/* Level cards */
.level-card:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, .15);
}

/* Generic clickable cursor hint */
[onclick]:hover,
button:hover,
a:hover,
select:hover,
.admin-tab:hover {
    cursor: pointer;
}

/* ===== HERO ===== */
.hero-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    animation: fadeInUp .6s;
    margin-bottom: 2rem;
}

.welcome-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.welcome-text span {
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    transition: all .3s;
    animation: fadeInUp .5s both;
}

.stat-card:nth-child(1) {
    animation-delay: .1s
}

.stat-card:nth-child(2) {
    animation-delay: .2s
}

.stat-card:nth-child(3) {
    animation-delay: .3s
}

.stat-card:nth-child(4) {
    animation-delay: .4s
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.stat-info h3 {
    font-size: 1.6rem;
}

.stat-info p {
    color: var(--text3);
    font-size: .8rem;
}

/* Rewards Preview */
.rewards-preview {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.reward-chip {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: .5rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.reward-chip.reward-unlocked {
    animation: rewardBounceIn .6s ease both;
    border-color: rgba(255, 215, 0, .4);
    box-shadow: 0 0 8px rgba(255, 215, 0, .15);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.reward-chip.reward-unlocked::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30px;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 215, 0, .25) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.reward-chip.reward-unlocked:hover {
    transform: scale(1.12);
    border-color: rgba(255, 215, 0, .8);
    box-shadow: 0 0 16px 4px rgba(255, 215, 0, .35), 0 0 30px 2px rgba(255, 215, 0, .15);
    z-index: 2;
}

.reward-chip.reward-unlocked:hover::before {
    opacity: 1;
}

.reward-chip.reward-unlocked:hover .reward-icon-anim {
    animation: rewardHoverSpin .6s ease;
}

.reward-chip.reward-unlocked .reward-icon-anim {
    display: inline-block;
    animation: rewardPulseGlow 2.5s ease-in-out infinite;
}

.no-rewards-msg {
    color: var(--text3);
    font-size: .88rem;
    padding: .5rem 0;
    width: 100%;
}

@keyframes rewardBounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    75% {
        transform: scale(.95);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rewardPulseGlow {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0));
    }

    50% {
        transform: scale(1.25);
        filter: drop-shadow(0 0 6px rgba(255, 215, 0, .6));
    }
}

@keyframes rewardHoverSpin {
    0% {
        transform: scale(1) rotate(0deg);
    }

    30% {
        transform: scale(1.5) rotate(-15deg);
    }

    60% {
        transform: scale(1.4) rotate(15deg);
    }

    100% {
        transform: scale(1.25) rotate(0deg);
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, .8));
    }
}

/* ===== SCREEN HEADER ===== */
.screen-header {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.screen-header h2 {
    flex: 1;
    font-size: 1.3rem;
}

.progress-indicator {
    background: var(--bg2);
    padding: .4rem .8rem;
    border-radius: 20px;
    font-size: .85rem;
    color: var(--text2);
}

/* ===== LEVELS ===== */
.levels-container {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.level-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    cursor: pointer;
    transition: all .3s;
    position: relative;
    overflow: hidden;
    animation: fadeInUp .5s both;
}

.level-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--card-grad, var(--grad1));
}

.level-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.level-card.locked {
    opacity: .5;
    cursor: not-allowed;
}

.level-card.locked:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.level-card.not-available {
    opacity: .65;
    cursor: not-allowed;
    filter: saturate(0.85);
}

.level-card.not-available:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.level-card.expired {
    opacity: .55;
    cursor: not-allowed;
    filter: saturate(0.7);
    border-color: rgba(239, 68, 68, .4);
}

.level-card.expired:hover {
    transform: none;
    border-color: rgba(239, 68, 68, .5);
    box-shadow: none;
}

.level-card.not-available:hover .level-tooltip,
.level-card.expired:hover .level-tooltip {
    opacity: 0;
    pointer-events: none;
}

.level-card.no-dates {
    opacity: .6;
    cursor: not-allowed;
    filter: saturate(0.8);
    border-left: 4px solid var(--warning, #f59e0b);
}
.level-card.no-dates:hover {
    transform: none;
    border-color: var(--warning, #f59e0b);
    box-shadow: none;
}
.level-card.no-dates:hover .level-tooltip {
    opacity: 0;
    pointer-events: none;
}

.level-card.completed::after {
    content: '✓';
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 36px;
    height: 36px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.completed-banner {
    position: absolute;
    top: .75rem;
    right: 3.5rem;
    height: 36px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

.level-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
}

.level-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.level-number {
    font-size: .8rem;
    color: var(--text3);
}

.level-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.level-description {
    color: var(--text2);
    font-size: .9rem;
    line-height: 1.5;
    margin-bottom: .75rem;
}

.level-meta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.level-meta-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--text3);
}

/* Level Tooltip on Hover */
.level-tooltip {
    position: absolute;
    top: 0; left: 0; right: 0;
    bottom: 70px; /* deja espacio para los botones + línea divisoria */
    z-index: 5;
    background: linear-gradient(135deg, rgba(var(--bg2-rgb, 30, 30, 46), .97), rgba(var(--bg2-rgb, 30, 30, 46), .99));
    background: var(--bg2);
    backdrop-filter: blur(8px);
    border-radius: 18px 18px 0 0; /* redondeo solo arriba, empata con botones */
    padding: 1.25rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* arranca desde arriba para que todo sea visible */
    overflow-y: auto; /* scroll interno si hay muchos temas */
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
}

/* Fade inferior sutil para indicar que hay más contenido con scroll */
.level-tooltip::after {
    content: '';
    position: sticky;
    bottom: -1rem;
    left: 0; right: 0;
    height: 24px;
    margin-top: auto;
    background: linear-gradient(to bottom, transparent, var(--bg2));
    pointer-events: none;
    flex-shrink: 0;
}

/* Scrollbar elegante del tooltip */
.level-tooltip::-webkit-scrollbar {
    width: 6px;
}
.level-tooltip::-webkit-scrollbar-track {
    background: transparent;
}
.level-tooltip::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, .3);
    border-radius: 3px;
}
.level-tooltip::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, .5);
}

.level-card:hover .level-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.level-card.locked:hover .level-tooltip {
    opacity: 0;
    pointer-events: none;
}

.level-tooltip-title {
    font-weight: 700;
    font-size: .95rem;
    color: var(--primary);
    margin-bottom: .6rem;
    letter-spacing: .3px;
}

.level-tooltip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .6rem;
}

.level-tooltip-list li {
    background: rgba(99, 102, 241, .12);
    color: var(--text);
    padding: .3rem .7rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, .2);
    transition: background .2s, border-color .2s;
}

.level-tooltip-list li:hover {
    background: rgba(99, 102, 241, .25);
    border-color: var(--primary);
}

/* ===== LEVEL ACTION BUTTONS ===== */
.level-actions {
    display: flex;
    gap: .6rem;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 6;
    background: var(--bg2); /* fondo sólido: garantiza que no se vean temas detrás al hacer hover */
}

.btn-level-action {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    flex: 1;
    justify-content: center;
}

.btn-level-action svg {
    flex-shrink: 0;
}

.btn-level-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.btn-study {
    border-color: rgba(59, 130, 246, .4);
    color: var(--primary);
}

.btn-study:hover {
    background: rgba(59, 130, 246, .12);
    border-color: var(--primary);
}

.btn-quiz {
    border-color: rgba(16, 185, 129, .4);
    color: var(--success);
}

.btn-quiz:hover {
    background: rgba(16, 185, 129, .12);
    border-color: var(--success);
}

/* ===== STUDY SCREEN ===== */
.study-header-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.study-time-badge {
    background: rgba(59, 130, 246, .1);
    color: var(--primary);
    padding: .3rem .8rem;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, .2);
}

#study-screen {
    overflow-y: auto;
    max-height: 100vh;
    scroll-behavior: smooth;
}

.study-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Progress tracker */
.study-progress-tracker {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 65px;
    z-index: 10;
    backdrop-filter: blur(12px);
}

.study-progress-dots {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.study-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg3);
    color: var(--text3);
    border: 2px solid var(--border);
    transition: all .3s;
}

.study-dot:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.study-dot.read {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.study-progress-label {
    font-size: .82rem;
    color: var(--text3);
    font-weight: 500;
    margin-left: auto;
}

/* Study sections */
.study-section {
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color .4s ease, box-shadow .4s ease;
    animation: fadeInUp .4s both;
}

.study-section:nth-child(odd) {
    animation-delay: .05s;
}

.study-section:nth-child(even) {
    animation-delay: .1s;
}

.study-section:hover {
    border-color: rgba(99, 102, 241, .3);
}

.study-section-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background .2s;
}

.study-section-header:hover {
    background: rgba(99, 102, 241, .05);
}

.study-section-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.study-section-title {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.study-section-toggle {
    font-size: .8rem;
    color: var(--text3);
    transition: transform .3s;
    width: 24px;
    text-align: center;
}

.study-section-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .5s cubic-bezier(0.4, 0, 0.2, 1), padding .4s cubic-bezier(0.4, 0, 0.2, 1), opacity .45s ease .1s;
}

.study-section-body.open {
    max-height: 3000px;
    padding: 0 1.25rem 1.25rem;
    opacity: 1;
}

.study-section-content {
    font-size: .92rem;
    line-height: 1.7;
    color: var(--text2);
}

.study-section-content p {
    margin-bottom: .75rem;
}

.study-section-content ul,
.study-section-content ol {
    margin: .5rem 0 .75rem 1.25rem;
    padding-left: .5rem;
}

.study-section-content li {
    margin-bottom: .4rem;
}

.study-section-content strong {
    color: var(--text);
}

.study-section-content em {
    color: var(--primary);
    font-style: italic;
}

.study-section-content kbd {
    background: var(--bg3);
    border: 1px solid var(--border);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .82rem;
    font-family: monospace;
    color: var(--text);
}

/* Study examples & highlights */
.study-example {
    background: rgba(59, 130, 246, .06);
    border-left: 3px solid var(--primary);
    padding: .85rem 1rem;
    border-radius: 0 10px 10px 0;
    margin: .75rem 0;
    font-size: .88rem;
    line-height: 1.6;
}

.study-highlight {
    background: rgba(245, 158, 11, .08);
    border-left: 3px solid var(--warning);
    padding: .85rem 1rem;
    border-radius: 0 10px 10px 0;
    margin: .75rem 0;
    font-size: .88rem;
    line-height: 1.6;
}

/* Key points */
.study-key-points {
    background: rgba(16, 185, 129, .06);
    border: 1px solid rgba(16, 185, 129, .2);
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-top: 1rem;
}

.study-key-points-title {
    font-weight: 700;
    font-size: .88rem;
    color: var(--success);
    margin-bottom: .5rem;
}

.study-key-points ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.study-key-points li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: .35rem;
    font-size: .85rem;
    color: var(--text2);
    line-height: 1.5;
}

.study-key-points li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* Mark as read button */
.btn-mark-read {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .75rem;
    padding: .45rem .9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg3);
    color: var(--text3);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
}

.btn-mark-read:hover:not(:disabled) {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, .08);
}

.btn-mark-read.study-timer-locked {
    opacity: .6;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text3);
}

.btn-mark-read.study-timer-locked:hover {
    border-color: var(--border);
    color: var(--text3);
    background: var(--bg3);
}

/* Super Admin: botón con countdown pero cliqueable (puede saltar el timer) */
.btn-mark-read.study-timer-locked.admin-skip {
    cursor: pointer;
    opacity: .85;
}
.btn-mark-read.study-timer-locked.admin-skip:hover {
    opacity: 1;
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, .08);
}

.btn-mark-read.read {
    background: rgba(16, 185, 129, .12);
    border-color: var(--success);
    color: var(--success);
    cursor: default;
}

/* Sequential study: locked section */
.study-section.study-section-locked {
    opacity: .45;
    filter: grayscale(.4);
    pointer-events: none;
    position: relative;
    transform: scale(.97);
}

.study-section.study-section-locked .study-section-header {
    cursor: not-allowed;
}

.study-section.study-section-locked .study-section-body {
    display: none;
}

/* Current/active section breathing glow */
.study-section.study-section-current {
    border-color: rgba(99, 102, 241, .4);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1), 0 2px 16px rgba(99, 102, 241, .12);
    animation: sectionBreathe 2.5s ease-in-out infinite;
}

@keyframes sectionBreathe {

    0%,
    100% {
        border-color: rgba(99, 102, 241, .25);
        box-shadow: 0 0 0 2px rgba(99, 102, 241, .06), 0 2px 12px rgba(99, 102, 241, .08);
    }

    50% {
        border-color: rgba(99, 102, 241, .5);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, .12), 0 4px 20px rgba(99, 102, 241, .18);
    }
}

/* Section unlock + glow combined animation */
.study-section.study-section-unlocking {
    animation: sectionUnlockGlow 2s ease forwards;
}

@keyframes sectionUnlockGlow {
    0% {
        opacity: .45;
        filter: grayscale(.4);
        transform: scale(.97) translateY(12px);
        border-color: var(--border);
        box-shadow: none;
    }

    20% {
        opacity: .85;
        filter: grayscale(.05);
        transform: scale(1) translateY(-2px);
    }

    30% {
        opacity: 1;
        filter: grayscale(0);
        transform: scale(1) translateY(0);
        border-color: rgba(99, 102, 241, .55);
        box-shadow: 0 0 0 4px rgba(99, 102, 241, .15), 0 4px 24px rgba(99, 102, 241, .2);
    }

    50% {
        border-color: rgba(99, 102, 241, .4);
        box-shadow: 0 0 0 6px rgba(99, 102, 241, .08), 0 4px 16px rgba(99, 102, 241, .12);
    }

    100% {
        border-color: var(--border);
        box-shadow: none;
        opacity: 1;
        filter: grayscale(0);
        transform: scale(1) translateY(0);
    }
}

/* Tips section */
.study-tips {
    background: linear-gradient(135deg, rgba(245, 158, 11, .06), rgba(245, 158, 11, .02));
    border: 1.5px solid rgba(245, 158, 11, .2);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.study-tips-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--warning);
    margin-bottom: .75rem;
}

.study-tips ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.study-tips li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: .5rem;
    font-size: .88rem;
    color: var(--text2);
    line-height: 1.5;
}

.study-tips li::before {
    content: '💡';
    position: absolute;
    left: 0;
    font-size: .75rem;
}

/* CTA */
.study-cta {
    text-align: center;
    padding: 2rem 0 1rem;
}

.btn-start-quiz {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .85rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: var(--grad1);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, .3);
    transition: all .3s;
}

.btn-start-quiz:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 28px rgba(99, 102, 241, .4);
}

.btn-start-quiz.study-locked {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.6);
    background: var(--bg3);
    box-shadow: none;
    color: var(--text3);
}

.btn-start-quiz.study-locked:hover {
    transform: none;
    box-shadow: none;
}

.study-cta-hint {
    font-size: .82rem;
    color: var(--text3);
    margin-top: .75rem;
    transition: color .3s;
}

.btn-start-quiz.eval-available-anim {
    animation: eval-pulse 2s infinite ease-in-out;
    background: var(--grad4) !important;
    box-shadow: 0 4px 25px rgba(16, 185, 129, .5) !important;
}

@keyframes eval-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
        filter: brightness(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== LESSON ===== */
.lesson-content {
    max-width: 900px;
    margin: 1.5rem auto;
    padding: 1.5rem;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--grad1);
    transition: width .3s;
}

/* Question Timer */
.question-timer {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    background: var(--bg3);
    border-radius: 20px;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 1.25rem;
}

.question-timer.warning {
    background: var(--danger);
    color: white;
    animation: pulse 1s infinite;
}

/* Question Card */
.review-context-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1.2rem;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 12px;
    margin-bottom: .75rem;
    animation: fadeInUp .3s;
}

.review-context-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.review-context-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.review-context-level-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.review-context-level-name {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text1);
}

.review-context-topic {
    font-size: .8rem;
    color: var(--text3);
    font-style: italic;
}

.question-card,
.case-study {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    animation: fadeInUp .4s;
    position: relative;
}

.question-type {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: .3rem .9rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    padding: .85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, .28);
    background: linear-gradient(135deg, rgba(99, 102, 241, .12), rgba(99, 102, 241, .05));
    box-shadow: 0 6px 16px rgba(99, 102, 241, .08);
    position: relative;
}

.question-text::before {
    content: 'Pregunta';
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-right: .5rem;
    font-weight: 700;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.option-btn {
    background: var(--bg3);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: .95rem;
    color: var(--text);
    cursor: pointer;
    transition: all .3s;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.option-btn:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.option-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.option-btn.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
    animation: pulse .5s;
}

.option-btn.incorrect {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: shake .5s;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: .7;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 8px;
    background: rgba(99, 102, 241, .15);
    color: var(--primary);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .5px;
    transition: all .3s;
}

.option-btn:hover .option-letter {
    background: var(--primary);
    color: #fff;
}

.option-btn.selected .option-letter,
.option-btn.correct .option-letter,
.option-btn.incorrect .option-letter {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.option-text {
    flex: 1;
}

.feedback-box {
    background: var(--bg3);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp .3s;
}

.feedback-box.correct {
    border-left-color: var(--success);
}

.feedback-box.incorrect {
    border-left-color: var(--danger);
}

.feedback-title {
    font-weight: 600;
    margin-bottom: .4rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.feedback-text {
    color: var(--text2);
    line-height: 1.6;
}

.question-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Case Study */
.case-title {
    font-size: 1.3rem;
    margin-bottom: .75rem;
    color: var(--primary-light);
}

.case-scenario {
    background: var(--bg3);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text2);
}

.case-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding: .75rem .95rem;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, .25);
    background: linear-gradient(135deg, rgba(99, 102, 241, .11), rgba(99, 102, 241, .05));
}

/* Info Card */
.info-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-left: 6px solid var(--primary);
    border-radius: 16px;
    padding: 2rem;
    animation: fadeInUp .4s;
}

.info-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.info-content {
    color: var(--text2);
    line-height: 1.7;
}

.info-content ul {
    margin-left: 1.5rem;
    margin-top: .75rem;
}

.info-content li {
    margin-bottom: .5rem;
}

.info-content strong {
    color: var(--text);
}

.continue-btn {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
}

/* ===== RESULTS ===== */
.results-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
    animation: fadeInUp .6s;
}

.results-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: bounceIn .8s;
}

#results-title {
    font-size: 2.2rem;
    margin-bottom: .5rem;
}

#results-message {
    font-size: 1.1rem;
    color: var(--text2);
    margin-bottom: 2rem;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-stat {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
}

.result-label {
    font-size: .8rem;
    color: var(--text3);
    margin-bottom: .3rem;
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-badges {
    display: flex;
    justify-content: center;
    gap: .75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: fadeInUp .5s both;
}

.badge-icon {
    font-size: 1.5rem;
}

.badge-name {
    font-weight: 600;
    font-size: .9rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Feedback Section */
.feedback-section {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.feedback-section h3 {
    margin-bottom: .75rem;
    font-size: 1.1rem;
}

.rating-stars {
    display: flex;
    gap: .4rem;
    justify-content: center;
    margin-bottom: .75rem;
}

.star {
    font-size: 1.8rem;
    cursor: pointer;
    opacity: .3;
    transition: all .2s;
}

.star:hover,
.star.active {
    opacity: 1;
    transform: scale(1.15);
}

#feedback-text {
    width: 100%;
    min-height: 70px;
    padding: .75rem;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    margin-bottom: .75rem;
    font-size: .9rem;
}

/* ===== STATS SCREEN ===== */
.stats-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
}

.stats-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stats-big {
    font-size: 3rem;
    font-weight: 800;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.stats-label {
    text-align: center;
    color: var(--text3);
    font-size: .9rem;
}

.level-breakdown {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.level-break-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem;
    background: var(--bg3);
    border-radius: 10px;
}

.level-break-icon {
    font-size: 1.8rem;
}

.level-break-info {
    flex: 1;
}

.level-break-name {
    font-weight: 600;
    font-size: .95rem;
}

.level-break-meta {
    font-size: .8rem;
    color: var(--text3);
}

.level-break-score {
    font-weight: 700;
    font-size: 1.1rem;
}

.level-break-score.completed {
    color: var(--success);
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* Progress Ring (CSS) */
.progress-ring-wrap {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--bg3);
    stroke-width: 12;
}

.progress-ring-fg {
    fill: none;
    stroke: url(#statsGrad);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-ring-text .big {
    font-size: 2.5rem;
    font-weight: 800;
}

.progress-ring-text .small {
    color: var(--text3);
    font-size: .85rem;
}

/* ===== LEADERBOARD ===== */
.leaderboard-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.leaderboard-podium {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-end;
}

.podium-item {
    text-align: center;
    transition: all .3s;
}

.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--grad1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto .5rem;
}

.podium-item:nth-child(1) .podium-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.podium-name {
    font-weight: 600;
    font-size: .9rem;
}

.podium-points {
    color: var(--text3);
    font-size: .8rem;
}

.podium-rank {
    font-size: 1.5rem;
    margin-bottom: .25rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.lb-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all .3s;
}

.lb-row.me {
    border-color: var(--primary);
    background: rgba(99, 102, 241, .08);
}

.lb-rank {
    width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.lb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--grad1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.lb-info {
    flex: 1;
}

.lb-name {
    font-weight: 600;
}

.lb-area {
    font-size: .8rem;
    color: var(--text3);
}

.lb-points {
    font-weight: 700;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lb-levels {
    font-size: .8rem;
    color: var(--text3);
}

/* ===== CERTIFICATES ===== */
.certificates-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.certs-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg2);
    border: 2px dashed var(--border);
    border-radius: 20px;
    margin-top: 1rem;
}

.certs-empty-icon {
    font-size: 4rem;
    margin-bottom: .8rem;
    filter: grayscale(.3);
}

.certs-empty h3 {
    font-size: 1.3rem;
    margin-bottom: .5rem;
    color: var(--text1);
}

.certs-empty p {
    color: var(--text3);
    font-size: .95rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.certs-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.certs-summary-icon {
    font-size: 2.2rem;
}

.certs-summary-text {
    font-size: 1rem;
    color: var(--text2);
}

.certs-summary-text .certs-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.cert-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all .3s ease;
    animation: certCardIn .5s ease both;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, .2);
    border-color: var(--primary);
}

.cert-card-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad1);
    border-radius: 18px 18px 0 0;
}

.cert-card-icon {
    font-size: 2.5rem;
    margin-bottom: .5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .15));
}

.cert-card-body {
    margin-bottom: .8rem;
}

.cert-card-level {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: .2rem;
}

.cert-card-name {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text1);
    margin-bottom: .5rem;
}

.cert-card-meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: .82rem;
    color: var(--text3);
}

.cert-card-score {
    background: rgba(102, 126, 234, .12);
    color: var(--primary);
    padding: .15rem .55rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: .78rem;
}

.cert-card-actions {
    display: flex;
    gap: .5rem;
}

.cert-card-actions .btn-sm {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    padding: .4rem .75rem;
    border-radius: 10px;
}

@keyframes certCardIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width:640px) {
    .certs-grid {
        grid-template-columns: 1fr;
    }

    .certificates-container {
        padding: 1rem;
    }
}

/* ===== PROFILE ===== */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-header {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar-big {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--grad1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 1.5rem;
    margin-bottom: .25rem;
}

.profile-info p {
    color: var(--text3);
    font-size: .9rem;
}

.profile-badges-label {
    font-size: .85rem;
    color: var(--text3);
    margin-top: .5rem;
}

.profile-edit-section {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
}

.profile-edit-section h3 {
    margin-bottom: 1rem;
}

.profile-certs {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg3);
    border-radius: 12px;
}

.cert-icon {
    font-size: 2rem;
}

.cert-info {
    flex: 1;
}

.cert-name {
    font-weight: 600;
}

.cert-date {
    font-size: .8rem;
    color: var(--text3);
}

/* ===== ADMIN ===== */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.admin-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: .6rem 1.2rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg2);
    color: var(--text);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: .9rem;
    transition: all .2s;
}

.admin-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.admin-tab.active:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, .35);
    filter: brightness(1.1);
}

.admin-panel {
    display: none;
    animation: fadeInUp .3s;
}

.admin-panel.active {
    display: block;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.admin-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-stat-label {
    color: var(--text3);
    font-size: .9rem;
    margin-top: .25rem;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg2);
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: .9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}

/* Tabla de usuarios: compacta, filas estrechas, Centro con mas espacio */
.admin-users-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.admin-users-table {
    table-layout: auto;
    width: 100%;
    min-width: 950px;
    font-size: .78rem;
}

.admin-users-table th,
.admin-users-table td {
    padding: .28rem .45rem;
    font-size: inherit;
    word-wrap: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
    line-height: 1.2;
}

.admin-users-table .col-ciudad {
    min-width: 90px;
    max-width: 120px;
}

.admin-users-table .col-centro {
    min-width: 100px;
    max-width: 140px;
}

.admin-users-table .col-acciones {
    width: 1%;
    white-space: nowrap;
}

.admin-users-table .admin-actions-flow {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: .2rem;
}

.admin-users-table .admin-action-btn {
    padding: .2rem .35rem;
    font-size: .65rem;
    min-width: 24px;
}

.admin-table th {
    background: var(--bg3);
    font-weight: 600;
    color: var(--text2);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.admin-table tr:hover {
    background: rgba(99, 102, 241, .04);
}

.admin-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
}

.admin-badge.superadmin {
    background: rgba(168, 85, 247, .2);
    color: #a855f7;
}

.admin-badge.admin {
    background: rgba(239, 68, 68, .15);
    color: var(--danger);
}

.admin-badge.user {
    background: rgba(16, 185, 129, .15);
    color: var(--success);
}

.empty-levels-msg {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text2);
}

.admin-actions {
    display: flex;
    gap: .5rem;
}

.admin-action-btn {
    padding: .4rem .8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg3);
    color: var(--text);
    cursor: pointer;
    font-size: .8rem;
    font-family: 'Poppins', sans-serif;
    transition: all .2s;
}

.admin-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.admin-action-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.admin-action-btn.active {
    background: rgba(16, 185, 129, .2);
    border-color: var(--success);
    color: var(--success);
}

.admin-action-btn.active:hover {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.admin-feedback-item {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: .75rem;
}

.admin-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.admin-feedback-user {
    font-weight: 600;
}

.admin-feedback-date {
    font-size: .8rem;
    color: var(--text3);
}

.admin-feedback-stars {
    font-size: 1.2rem;
    margin-bottom: .5rem;
}

.admin-feedback-text {
    color: var(--text2);
    font-size: .9rem;
}

.admin-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ===== QUESTION MANAGEMENT ===== */
.admin-q-level-tabs {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    background: var(--bg3);
    border-radius: 12px;
    padding: .4rem;
}

.admin-q-level-tab {
    padding: .35rem .7rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text3);
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    transition: all .2s;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.admin-q-level-tab:hover {
    background: var(--bg2);
    color: var(--text);
}

.admin-q-level-tab.active {
    background: var(--primary);
    color: #fff;
}

.admin-q-level-name {
    display: inline;
}

.admin-q-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.admin-q-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .6rem 1rem;
    transition: all .2s;
    gap: .75rem;
}

.admin-q-item:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, .04);
}

.q-search-result:hover {
    background: rgba(99, 102, 241, .08) !important;
}

.admin-q-item.custom {
    border-left: 3px solid var(--success);
}

.admin-q-item.edited {
    border-left: 3px solid var(--accent);
}

.admin-q-item-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 0;
}

.admin-q-type-badge {
    background: var(--bg3);
    padding: .2rem .5rem;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
}

.admin-q-item-num {
    font-weight: 700;
    color: var(--text3);
    font-size: .8rem;
    white-space: nowrap;
}

.admin-q-item-text {
    font-size: .85rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-q-custom-badge {
    background: rgba(16, 185, 129, .15);
    color: var(--success);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-q-edited-badge {
    background: rgba(245, 158, 11, .15);
    color: var(--accent);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-input {
    width: 100%;
    padding: .6rem .8rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    transition: border-color .2s;
}

.admin-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== FILTER BAR ===== */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    padding: .75rem;
    margin-bottom: 1rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.admin-filter-bar label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-right: -.2rem;
}

.admin-filter {
    padding: .35rem .5rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: .78rem;
    transition: border-color .2s;
    min-width: 0;
    max-width: 180px;
}

.admin-filter:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-filter-search {
    padding: .35rem .6rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: .78rem;
    min-width: 130px;
    max-width: 200px;
    flex: 1;
}

.admin-filter-search:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-filter-search::placeholder {
    color: var(--text3);
}

.admin-filter-actions {
    display: flex;
    gap: .4rem;
    margin-left: auto;
}

.admin-filter-badge {
    font-size: .72rem;
    padding: .2rem .5rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, .1);
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.admin-filter-bar .btn-sm {
    font-size: .72rem;
    padding: .3rem .6rem;
}

#admin-filter-content {
    min-height: 100px;
}

.btn-sm {
    padding: .4rem .8rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: 'Poppins', sans-serif;
    border: 1px solid var(--border);
}

.btn-sm.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-sm.btn-secondary {
    background: var(--bg3);
    color: var(--text);
}

.btn-sm:hover {
    transform: translateY(-1px);
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    user-select: none;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInUp .3s;
    user-select: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text3);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

/* ===== TOAST NOTIFICATIONS ===== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 400px;
    pointer-events: none;
}

.toast-item {
    background: var(--bg2);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: .8rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideInRight .3s ease, fadeIn .3s ease;
    transition: transform .2s ease, opacity .2s ease;
}

.toast-item:hover {
    transform: translateX(-4px);
}

.toast-item.removing {
    animation: slideOutRight .3s ease, fadeOut .3s ease;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn .4s ease;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text3);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background .2s, color .2s;
}

.toast-close:hover {
    background: var(--bg3);
    color: var(--text);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    animation: progressBar linear forwards;
    transform-origin: left;
}

/* Toast Types */
.toast-item.success {
    border-color: var(--success);
}

.toast-item.success .toast-icon {
    color: var(--success);
}

.toast-item.success .toast-progress {
    color: var(--success);
}

.toast-item.error {
    border-color: var(--danger);
}

.toast-item.error .toast-icon {
    color: var(--danger);
}

.toast-item.error .toast-progress {
    color: var(--danger);
}

.toast-item.warning {
    border-color: var(--warning);
}

.toast-item.warning .toast-icon {
    color: var(--warning);
}

.toast-item.warning .toast-progress {
    color: var(--warning);
}

.toast-item.info {
    border-color: var(--primary);
}

.toast-item.info .toast-icon {
    color: var(--primary);
}

.toast-item.info .toast-progress {
    color: var(--primary);
}

/* Toast Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes progressBar {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* ===== CONFIRM MODAL ===== */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.confirm-overlay.open {
    display: flex;
    animation: fadeIn .2s ease;
}

.confirm-content {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: fadeInUp .3s ease;
    box-shadow: var(--shadow-lg);
}

.confirm-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: .8rem;
    animation: scaleIn .4s ease;
}

.confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: .5rem;
}

.confirm-message {
    font-size: .9rem;
    color: var(--text2);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-buttons {
    display: flex;
    gap: .75rem;
    justify-content: center;
}

.confirm-btn {
    padding: .7rem 1.5rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 100px;
    justify-content: center;
}

.confirm-btn-confirm {
    background: var(--primary);
    color: white;
}

.confirm-btn-confirm:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.confirm-btn-confirm.danger {
    background: var(--danger);
}

.confirm-btn-confirm.danger:hover {
    background: #dc2626;
}

.confirm-btn-confirm.warning {
    background: var(--warning);
}

.confirm-btn-confirm.warning:hover {
    background: #d97706;
}

.confirm-btn-cancel {
    background: var(--bg3);
    color: var(--text);
}

.confirm-btn-cancel:hover {
    background: var(--border);
    transform: translateY(-2px);
}

/* Reward Notification */
.reward-notification {
    position: fixed;
    top: -120px;
    right: 20px;
    z-index: 99999;
    background: var(--bg2);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    transition: top .5s ease;
    max-width: 350px;
}

.reward-notification.show {
    top: 20px;
}

.reward-notif-icon {
    font-size: 2.5rem;
}

.reward-notif-title {
    font-weight: 700;
    font-size: 1rem;
    background: var(--grad1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reward-notif-desc {
    font-size: .85rem;
    color: var(--text3);
}

/* ===== CONFETTI CANVAS ===== */
.confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
}

/* ===== MASCOT ===== */
.mascot {
    position: fixed;
    bottom: 80px;
    left: 16px;
    z-index: 998;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.mascot.show {
    display: flex;
}

.mascot-body {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
    transition: transform .3s;
    animation: float 3s ease-in-out infinite;
}

.mascot.correct .mascot-body {
    animation: mascotJump .6s ease;
}

.mascot.incorrect .mascot-body,
.mascot.timeout .mascot-body {
    animation: shake .5s ease;
}

.mascot.combo .mascot-body,
.mascot.bigcombo .mascot-body {
    animation: mascotSpin .6s ease;
}

.mascot.levelComplete .mascot-body {
    animation: mascotJump .6s ease 3;
}

.mascot-speech {
    background: var(--bg2);
    border: 2px solid var(--primary);
    border-radius: 14px 14px 14px 4px;
    padding: .4rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    max-width: 170px;
    text-align: center;
    opacity: 0;
    transform: translateY(8px) scale(.8);
    transition: all .3s ease;
    box-shadow: var(--shadow);
    margin-bottom: .4rem;
    color: var(--text);
}

.mascot-speech.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===== COMBO INDICATOR ===== */
.combo-indicator {
    position: fixed;
    top: 160px;
    /* Adjusted to be below headers */
    left: 16px;
    z-index: 997;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: .6rem 1.1rem;
    background: var(--bg2);
    border: 2px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(245, 158, 11, .3);
    transition: top 0.4s ease;
}

body.focus-mode .combo-indicator {
    top: 80px;
    /* Higher up when navbar is gone */
}

.combo-indicator.show {
    display: flex;
    animation: comboAppear .4s ease;
}

.combo-indicator.fire {
    border-color: #ef4444;
    box-shadow: 0 0 30px rgba(239, 68, 68, .4);
    animation: comboPulse .8s infinite;
}

.combo-count {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.combo-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
}

/* ===== DAILY CAPSULE ===== */
.daily-capsule {
    background: var(--bg2);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all .3s;
    animation: fadeInUp .6s both .3s;
    position: relative;
    overflow: hidden;
}

.daily-capsule::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad1);
    opacity: .05;
    pointer-events: none;
}

.daily-capsule:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.capsule-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
}

.capsule-icon {
    font-size: 1.8rem;
}

.capsule-badge {
    background: var(--grad1);
    color: white;
    padding: .2rem .65rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.capsule-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .3rem;
}

.capsule-text {
    color: var(--text2);
    font-size: .88rem;
    line-height: 1.6;
}

#capsule-content {
    transition: opacity .28s ease;
}

#capsule-content.capsule-fade-out {
    opacity: 0;
    transform: scale(.97);
}

#capsule-content.capsule-fade-in {
    animation: capsuleFadeIn .5s cubic-bezier(.22, 1, .36, 1);
}

@keyframes capsuleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(.96);
    }

    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.01);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.daily-capsule.capsule-shimmer {
    animation: capsuleShimmerBorder .9s ease;
}

.daily-capsule.capsule-shimmer::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    pointer-events: none;
    background: conic-gradient(from var(--shimmer-angle, 0deg), transparent 40%, rgba(255, 215, 0, .5) 50%, transparent 60%);
    animation: capsuleShimmerSpin .9s linear;
    opacity: 0;
    z-index: 0;
}

@keyframes capsuleShimmerSpin {
    0% {
        opacity: 1;
        --shimmer-angle: 0deg;
    }

    100% {
        opacity: 0;
        --shimmer-angle: 360deg;
    }
}

@keyframes capsuleShimmerBorder {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, .4);
    }

    30% {
        box-shadow: 0 0 18px 4px rgba(255, 215, 0, .35);
    }

    100% {
        box-shadow: var(--shadow);
    }
}

.capsule-sparkle {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    color: rgba(255, 215, 0, .9);
    animation: sparkleFloat .9s ease-out forwards;
    text-shadow: 0 0 6px rgba(255, 215, 0, .7);
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: scale(0) translateY(0);
    }

    40% {
        opacity: 1;
        transform: scale(1.2) translateY(-10px);
    }

    100% {
        opacity: 0;
        transform: scale(.5) translateY(-28px);
    }
}

.capsule-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: .8rem;
    padding-top: .6rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.capsule-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    line-height: 1;
    padding: 0;
}

.capsule-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.capsule-nav-counter {
    font-size: .78rem;
    color: var(--text3);
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

/* ===== FUN FACT ===== */
.fun-fact-card {
    background: var(--bg2);
    border: 2px solid var(--accent);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    text-align: center;
    animation: fadeInUp .4s;
    margin-bottom: 1rem;
}

.fun-fact-text {
    color: var(--text2);
    font-size: .95rem;
    line-height: 1.5;
    font-style: italic;
}

/* ===== POINT POPUP ===== */
.point-popup {
    position: fixed;
    z-index: 99999;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--success);
    pointer-events: none;
    animation: pointFloat 1.5s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.point-popup.bonus {
    color: var(--accent);
    font-size: 1.6rem;
}

/* ===== TRUE/FALSE BUTTONS ===== */
.truefalse-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tf-btn {
    padding: 1.5rem;
    border: 3px solid var(--border);
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--bg3);
    color: var(--text);
}

.tf-btn:hover {
    transform: translateY(-3px);
}

.tf-btn.true:hover {
    border-color: var(--success);
    background: rgba(16, 185, 129, .1);
}

.tf-btn.false:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, .1);
}

.tf-btn.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
    animation: pulse .5s;
}

.tf-btn.incorrect {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    animation: shake .5s;
}

.tf-btn:disabled {
    cursor: not-allowed;
    opacity: .7;
}

/* ===== CLASSIFY GAME ===== */
.classify-container {
    margin-bottom: 1.5rem;
}

.classify-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.classify-category {
    background: var(--bg3);
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: .85rem;
    min-height: 100px;
    text-align: center;
    transition: all .3s;
    cursor: pointer;
}

.classify-category.active {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(99, 102, 241, .08);
}

.classify-category-title {
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: .5rem;
    color: var(--primary-light);
}

.classify-items {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.classify-item {
    background: var(--bg2);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: .5rem .9rem;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 500;
    transition: all .2s;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

.classify-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.classify-item.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.classify-item.placed {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.classify-placed-item {
    display: inline-block;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .25rem .55rem;
    font-size: .72rem;
    margin: .15rem;
}

.classify-placed-item.correct-place {
    border-color: var(--success);
    background: rgba(16, 185, 129, .15);
    color: var(--success);
}

.classify-placed-item.wrong-place {
    border-color: var(--danger);
    background: rgba(239, 68, 68, .15);
    color: var(--danger);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes mascotJump {

    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-25px) scale(1.1);
    }

    50% {
        transform: translateY(-12px);
    }

    70% {
        transform: translateY(-18px) scale(1.05);
    }
}

@keyframes mascotSpin {
    0% {
        transform: rotate(0) scale(1);
    }

    50% {
        transform: rotate(15deg) scale(1.2);
    }

    100% {
        transform: rotate(0) scale(1);
    }
}

@keyframes comboAppear {
    from {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }

    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes comboPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

@keyframes pointFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-80px) scale(1.5);
    }
}

.shield-icon {
    width: 100px;
    height: 100px;
    background: var(--grad1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: float 3s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

.shield-icon svg {
    width: 60px;
    height: 60px;
}

.shield-icon.small svg {
    width: 40px;
    height: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-user-info {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .levels-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .lesson-content {
        padding: 1rem;
    }

    .question-card,
    .case-study,
    .info-card {
        padding: 1.5rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .results-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .leaderboard-podium {
        gap: .5rem;
    }

    .admin-table th,
    .admin-table td {
        padding: .6rem .5rem;
        font-size: .8rem;
    }

    .admin-grid-2col {
        grid-template-columns: 1fr !important;
    }

    .welcome-text {
        font-size: 1.5rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .navbar {
        padding: .5rem 1rem;
    }

    .mascot {
        bottom: 70px;
        left: 8px;
    }

    .mascot-body {
        font-size: 2.2rem;
    }

    .mascot-speech {
        max-width: 130px;
        font-size: .7rem;
    }

    .combo-indicator {
        top: 70px;
        left: 8px;
        padding: .5rem .8rem;
    }

    .combo-count {
        font-size: 1.2rem;
    }

    .truefalse-container {
        gap: .75rem;
    }

    .tf-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .q-nav-bar {
        padding: .3rem .75rem;
    }

    .q-dot {
        width: 24px;
        height: 24px;
        font-size: .6rem;
    }

    .q-nav-dots {
        gap: .25rem;
    }

    .nav-warning-toast {
        font-size: .8rem;
        padding: .5rem 1rem;
        white-space: normal;
        max-width: 90vw;
    }

    /* Botón Pista: reubicado para no colisionar + más visible */
    .hint-btn {
        bottom: 190px !important; /* antes: 280px (fuera de viewport en móvil alto) */
        right: 12px !important;
        width: 56px !important;
        height: 56px !important;
        padding: 0 !important;
        font-size: 1rem;
    }
    .hint-btn .hint-label { display: none; }
    .hint-btn .hint-icon { font-size: 1.6rem; }

    /* Burbuja de pista: protagonista en móvil */
    .hint-bubble {
        font-size: .9rem;
        padding: .75rem 1rem;
        margin: .75rem .5rem;
        max-width: calc(100vw - 1rem);
        line-height: 1.4;
    }

    /* Escalonamiento vertical de botones flotantes */
    .theme-toggle  { bottom: 20px;  right: 12px; width: 44px; height: 44px; font-size: 1.2rem; }
    .sound-toggle  { bottom: 74px;  right: 12px; width: 44px; height: 44px; font-size: 1.2rem; }
    .focus-toggle  { bottom: 128px; right: 12px; width: 44px; height: 44px; font-size: 1.2rem; }
    .floating-clock { display: none; } /* liberar espacio en móvil */

    /* Modal admin — padding reducido y usa dvh */
    .modal-content {
        max-width: 95vw;
        max-height: 92dvh;
        padding: 1.25rem;
        border-radius: 14px;
    }
    .modal-overlay { padding: .75rem; }

    /* Tabla admin — deshabilitar min-width forzado */
    .admin-users-table {
        min-width: auto;
        font-size: .72rem;
    }
    .admin-users-table th,
    .admin-users-table td {
        padding: .4rem .35rem;
    }
    .admin-table-wrap { max-height: 60dvh; }

    /* Tabs admin scrolleable horizontalmente */
    .admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .admin-tab { flex-shrink: 0; }

    /* Auth card: ancho completo en móvil */
    .auth-card {
        max-width: 100%;
        padding: 1.5rem;
    }

    /* Toast: no desbordar */
    #toast-container {
        max-width: calc(100vw - 24px);
        right: 12px;
        left: 12px;
    }
    .toast-item {
        min-width: auto;
        max-width: 100%;
    }

    /* Touch targets mínimos accesibles */
    .btn-level-action {
        min-height: 40px;
        padding: .6rem .9rem;
    }
    .admin-action-btn {
        min-height: 36px;
        padding: .4rem .6rem;
        font-size: .75rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .results-icon {
        font-size: 4rem;
    }

    #results-title {
        font-size: 1.6rem;
    }

    .hint-bubble {
        margin: .5rem .4rem;
        font-size: .85rem;
    }

    /* Grid de niveles: una sola columna y padding compacto */
    .levels-container {
        grid-template-columns: 1fr;
        padding: .75rem;
        gap: .75rem;
    }
    .level-card { padding: 1.25rem; }

    /* Auth card aún más compacta */
    .auth-card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    /* Navbar compact */
    .navbar { padding: .5rem .75rem; }
    .nav-brand { font-size: .95rem; }

    /* Modal con casi todo el ancho */
    .modal-content {
        padding: 1rem;
        border-radius: 12px;
    }
}

/* Dispositivos sin hover (táctiles): mostrar siempre el tooltip de temas */
@media (hover: none) {
    .level-tooltip {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
    .level-card:hover {
        transform: none; /* sin levantar tarjeta al tocar */
    }
}

/* Animación flash cuando se muestra la pista */
.hint-bubble.hint-flash {
    animation: hintFlash .7s ease;
}
@keyframes hintFlash {
    0%, 100% { box-shadow: 0 6px 25px rgba(0, 0, 0, .2); }
    40%      { box-shadow: 0 0 0 10px rgba(245, 158, 11, .35), 0 6px 25px rgba(0, 0, 0, .2); }
}

/* Admin Notifications */
.admin-tabs {
    flex-wrap: wrap;
}

.admin-tab {
    white-space: nowrap;
}

/* ===== ADMIN STUDY MATERIAL ===== */
.study-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.study-admin-card {
    background: var(--bg3);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1.15rem;
    transition: border-color .3s, box-shadow .3s, background .3s;
    overflow: hidden;
    position: relative;
}

.study-admin-card:hover {
    border-color: rgba(99, 102, 241, .4);
    box-shadow: 0 6px 24px rgba(99, 102, 241, .12);
    background: color-mix(in srgb, var(--bg3) 92%, var(--primary));
}

.study-admin-card-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.study-admin-card-icon {
    font-size: 2rem;
}

.study-admin-card-level {
    font-size: .75rem;
    color: var(--text3);
    font-weight: 500;
}

.study-admin-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.study-badge {
    margin-left: auto;
    padding: .2rem .6rem;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.study-badge.default {
    background: rgba(59, 130, 246, .1);
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, .2);
}

.study-badge.custom {
    background: rgba(16, 185, 129, .1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, .2);
}

.study-badge.none {
    background: rgba(245, 158, 11, .1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, .2);
}

.study-admin-card-meta {
    display: flex;
    gap: .75rem;
    font-size: .82rem;
    color: var(--text3);
    margin-bottom: .6rem;
}

.study-admin-card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}

.study-topic-tag {
    background: rgba(99, 102, 241, .08);
    color: var(--text2);
    padding: .15rem .5rem;
    border-radius: 6px;
    font-size: .72rem;
    border: 1px solid rgba(99, 102, 241, .12);
}

.study-topic-tag.more {
    background: rgba(99, 102, 241, .15);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.study-admin-card-topics-hidden {
    display: none;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .35rem;
}

.study-admin-card:hover .study-admin-card-topics-hidden {
    display: flex;
}

.study-admin-card:hover .study-topic-tag.more {
    display: none;
}

.study-admin-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
}

.study-admin-card-actions .btn-sm {
    text-align: center;
    font-size: .78rem;
    padding: .45rem .4rem;
    white-space: nowrap;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.study-admin-card-actions .btn-sm.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.study-admin-card-actions .btn-sm.btn-secondary {
    background: rgba(99, 102, 241, .08);
    color: var(--text);
    border: 1.5px solid rgba(99, 102, 241, .2);
}

.study-admin-card-actions .btn-sm.btn-secondary:hover {
    background: rgba(99, 102, 241, .18);
    border-color: rgba(99, 102, 241, .4);
    color: var(--primary);
}

.study-admin-card-actions .btn-sm.btn-primary:hover {
    filter: brightness(1.15);
    box-shadow: 0 2px 8px rgba(99, 102, 241, .3);
}

.study-admin-card-actions .btn-sm.btn-danger-outline {
    background: rgba(239, 68, 68, .06);
    color: var(--danger);
    border: 1.5px solid rgba(239, 68, 68, .25);
}

.study-admin-card-actions .btn-sm.btn-danger-outline:hover {
    background: rgba(239, 68, 68, .15);
    border-color: rgba(239, 68, 68, .4);
    color: var(--danger);
}

.study-tip-row {
    display: flex;
    gap: .5rem;
    margin-bottom: .4rem;
    align-items: center;
}

.study-tip-row input {
    flex: 1;
}

.study-section-editor textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg2);
    color: var(--text);
    padding: .5rem .75rem;
}

/* ===== WYSIWYG EDITOR ===== */
.wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    padding: .35rem .5rem;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    align-items: center;
}

.wysiwyg-toolbar button {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: .3rem .55rem;
    cursor: pointer;
    font-size: .78rem;
    color: var(--text2);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.wysiwyg-toolbar button:hover {
    background: rgba(99, 102, 241, .12);
    border-color: rgba(99, 102, 241, .25);
    color: var(--primary);
}

.wysiwyg-toolbar button.active {
    background: rgba(99, 102, 241, .18);
    border-color: rgba(99, 102, 241, .3);
    color: var(--primary);
    font-weight: 600;
}

.wysiwyg-toolbar .toolbar-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 .25rem;
    flex-shrink: 0;
}

.wysiwyg-editor {
    min-height: 160px;
    max-height: 420px;
    overflow-y: auto;
    padding: .75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 0 0 10px 10px;
    background: var(--bg);
    color: var(--text);
    font-size: .88rem;
    line-height: 1.65;
    outline: none;
    transition: border-color .3s, box-shadow .3s;
}

.wysiwyg-editor:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.wysiwyg-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text3);
    font-style: italic;
    pointer-events: none;
}

.wysiwyg-editor p {
    margin-bottom: .6rem;
}

.wysiwyg-editor ul,
.wysiwyg-editor ol {
    padding-left: 1.5rem;
    margin: .5rem 0;
}

.wysiwyg-editor li {
    margin-bottom: .3rem;
}

.wysiwyg-editor strong,
.wysiwyg-editor b {
    color: var(--text);
    font-weight: 700;
}

.wysiwyg-editor em,
.wysiwyg-editor i {
    color: var(--primary);
    font-style: italic;
}

.wysiwyg-editor h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1rem 0 .5rem;
    color: var(--text);
}

.wysiwyg-editor kbd {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1rem .35rem;
    font-family: monospace;
    font-size: .82rem;
}

.wysiwyg-editor .study-example {
    background: rgba(59, 130, 246, .06);
    border-left: 3px solid var(--primary);
    padding: .65rem .85rem;
    border-radius: 0 8px 8px 0;
    margin: .65rem 0;
}

.wysiwyg-editor .study-highlight {
    background: rgba(245, 158, 11, .08);
    border-left: 3px solid var(--warning);
    padding: .65rem .85rem;
    border-radius: 0 8px 8px 0;
    margin: .65rem 0;
}

.wysiwyg-editor .study-example::before {
    content: '📦 Ejemplo: ';
    font-weight: 700;
}

.wysiwyg-editor .study-highlight::before {
    content: '💡 Importante: ';
    font-weight: 700;
}

.wysiwyg-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .25rem;
}

.wysiwyg-label-row label {
    font-weight: 600;
    font-size: .85rem;
}

.wysiwyg-label-row .wysiwyg-html-toggle {
    font-size: .72rem;
    color: var(--text3);
    cursor: pointer;
    text-decoration: underline;
}

.wysiwyg-label-row .wysiwyg-html-toggle:hover {
    color: var(--primary);
}

/* ===== SORTING STYLES ===== */
.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
    transition: background 0.2s, color 0.2s;
}

.admin-table th.sortable:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.sort-icon {
    font-size: 0.75rem;
    margin-left: 0.4rem;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
}

.sort-icon.active {
    opacity: 1;
    color: var(--primary);
    font-weight: bold;
}

.admin-table th.sortable:active {
    transform: translateY(1px);
}

/* Material First - Question Integration */
.study-sec-questions-container {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px dashed var(--primary);
    border-radius: 12px;
}

.study-sec-question-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    font-size: 0.85rem;
}

.study-sec-question-card:hover {
    border-color: var(--primary);
}

.study-sec-question-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
    display: block;
}

.study-sec-question-text {
    font-weight: 500;
    margin-bottom: 0.4rem;
    display: block;
}

.study-sec-question-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.study-sec-q-empty {
    text-align: center;
    padding: 1rem;
    color: var(--text3);
    font-style: italic;
    font-size: 0.8rem;
}

.eval-config-header {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ===== SIMULADORES DE AUDITORÍA ===== */
.audit-system-tabs { display:flex; gap:.5rem; padding:.75rem 1.5rem .25rem; flex-wrap:wrap; max-width:1400px; margin:0 auto; }
.audit-system-tab { padding:.35rem .9rem; border-radius:20px; border:1.5px solid var(--border); background:var(--bg2); color:var(--text2); cursor:pointer; font-size:.82rem; font-weight:600; transition:all .2s; }
.audit-system-tab.active, .audit-system-tab:hover { background:var(--primary); color:#fff; border-color:var(--primary); }

.audit-simulator-badge { display:inline-flex; align-items:center; gap:.25rem; padding:.2rem .6rem; border-radius:20px; font-size:.72rem; font-weight:700; background:rgba(99,102,241,.12); color:var(--primary); border:1px solid rgba(99,102,241,.25); margin-bottom:.4rem; }

/* Badges de tipo de hallazgo SENA */
.finding-badge { display:inline-block; padding:.12rem .45rem; border-radius:6px; font-size:.72rem; font-weight:700; margin-left:.4rem; vertical-align:middle; }
.finding-badge.nc { background:rgba(239,68,68,.15); color:#ef4444; border:1px solid rgba(239,68,68,.3); }
.finding-badge.obs { background:rgba(245,158,11,.15); color:#f59e0b; border:1px solid rgba(245,158,11,.3); }
.finding-badge.omn { background:rgba(234,179,8,.15); color:#eab308; border:1px solid rgba(234,179,8,.3); }
.finding-badge.ome { background:rgba(16,185,129,.15); color:#10b981; border:1px solid rgba(16,185,129,.3); }

/* Barra de progreso de simulador */
.audit-progress-bar-wrap { margin-top:.5rem; background:var(--bg3); border-radius:4px; height:5px; overflow:hidden; }
.audit-progress-bar-fill { height:100%; background:var(--primary); border-radius:4px; transition:width .4s; }

/* Norm tag en preguntas */
.question-norm-tag { display:inline-block; padding:.12rem .45rem; background:rgba(16,185,129,.1); color:var(--success); border:1px solid rgba(16,185,129,.2); border-radius:6px; font-size:.7rem; font-weight:600; margin:.25rem 0; }

/* Preguntas de identificación de evidencias (checkboxes múltiples) */
.evidence-options-list { display:flex; flex-direction:column; gap:.5rem; margin-top:.75rem; }
.evidence-option { display:flex; align-items:flex-start; gap:.75rem; padding:.75rem 1rem; border-radius:10px; border:1.5px solid var(--border); background:var(--bg2); cursor:pointer; transition:all .2s; }
.evidence-option:hover { border-color:var(--primary); background:rgba(99,102,241,.05); }
.evidence-option.selected { border-color:var(--primary); background:rgba(99,102,241,.1); }
.evidence-option.correct-ev { border-color:var(--success) !important; background:rgba(16,185,129,.1) !important; }
.evidence-option.wrong-ev { border-color:var(--danger) !important; background:rgba(239,68,68,.08) !important; }
.evidence-checkbox { width:18px; height:18px; border-radius:4px; border:2px solid var(--border); flex-shrink:0; margin-top:2px; display:flex; align-items:center; justify-content:center; font-size:.7rem; }
.evidence-option.selected .evidence-checkbox { background:var(--primary); border-color:var(--primary); color:#fff; }
.evidence-submit-btn { margin-top:1rem; padding:.65rem 1.5rem; background:var(--primary); color:#fff; border:none; border-radius:10px; font-weight:700; cursor:pointer; font-size:.9rem; }

/* Material de estudio previo */
.audit-study-card { background:var(--bg2); border:1px solid var(--border); border-radius:14px; padding:1.25rem; margin-bottom:1rem; }
.audit-study-keypoints { list-style:none; padding:0; margin:.75rem 0 0; }
.audit-study-keypoints li { padding:.3rem 0 .3rem 1.5rem; position:relative; font-size:.88rem; color:var(--text2); }
.audit-study-keypoints li::before { content:"✓"; position:absolute; left:0; color:var(--success); font-weight:700; }
.audit-study-norm { font-size:.78rem; color:var(--text3); margin-top:.5rem; padding:.25rem .6rem; background:rgba(16,185,129,.08); border-radius:6px; display:inline-block; }

/* Cards de nivel de auditoría (en la pantalla de detalle del simulador) */
.audit-level-card { background:var(--bg2); border:1px solid var(--border); border-radius:16px; padding:1.25rem; position:relative; transition:all .2s; }
.audit-level-card:hover { border-color:var(--primary); transform:translateY(-2px); }
.audit-level-card.completed { border-color:var(--success); }
.audit-level-completed-badge { position:absolute; top:.75rem; right:.75rem; background:var(--success); color:#fff; border-radius:20px; padding:.15rem .6rem; font-size:.72rem; font-weight:700; }

/* Stats admin */
.audit-stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:1rem; margin-bottom:1.5rem; }
.audit-stat-card { background:var(--bg2); border-radius:12px; padding:1rem; text-align:center; border:1px solid var(--border); }
.audit-stat-number { font-size:2rem; font-weight:800; color:var(--primary); }
.audit-stat-label { font-size:.78rem; color:var(--text3); margin-top:.25rem; }

/* Widget de auditoría en home */
.audit-home-widget { background:var(--bg2); border:1px solid var(--border); border-radius:14px; padding:1rem 1.25rem; margin:.75rem auto; max-width:700px; cursor:pointer; transition:all .2s; }
.audit-home-widget:hover { border-color:var(--primary); }
.audit-home-widget-title { font-weight:700; font-size:.95rem; margin-bottom:.4rem; }
.audit-home-widget-sub { font-size:.82rem; color:var(--text3); }