/* ============================
   TEMARIUS REX TESTS - CSS
   ============================ */

:root {
    --primary: #1a2332;
    --primary-light: #2a3a52;
    --accent: #2E86AB;
    --accent-light: #4da8cc;
    --gold: #FFD700;
    --gold-dark: #e6c200;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --text: #333;
    --text-light: #666;
    --bg: #f5f7fa;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}
a { text-decoration: none; color: var(--accent); }

/* ============================
   ANIMATED DINO BACKGROUND
   ============================ */
.dino-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.dino-footprint {
    position: absolute;
    width: 30px; height: 30px;
    opacity: 0;
    background: radial-gradient(circle, rgba(26,35,50,0.04) 0%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: footprintAppear 8s infinite;
}
.fp1 { top: 20%; left: 10%; animation-delay: 0s; }
.fp2 { top: 40%; left: 30%; animation-delay: 1.5s; }
.fp3 { top: 60%; left: 50%; animation-delay: 3s; }
.fp4 { top: 30%; left: 70%; animation-delay: 4.5s; }
.fp5 { top: 70%; left: 85%; animation-delay: 6s; }

@keyframes footprintAppear {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 1; transform: scale(1); }
    80% { opacity: 0.5; transform: scale(1.1); }
}

/* ============================
   NAVBAR
   ============================ */
.navbar {
    background: var(--primary);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}
.nav-logo img {
    height: 45px;
    border-radius: 8px;
}
.logo-text { display: flex; flex-direction: column; }
.logo-title {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 2px;
    color: white;
}
.logo-badge {
    background: var(--gold);
    color: var(--primary);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 4px;
    letter-spacing: 3px;
    text-align: center;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-cta {
    background: var(--accent) !important;
    color: white !important;
}
.nav-cta:hover { background: var(--accent-light) !important; }
.nav-cta-main {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,215,0,0.3); }
    50% { box-shadow: 0 0 20px rgba(255,215,0,0.6); }
}
.nav-user { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-user-name { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.nav-logout { color: rgba(255,255,255,0.5) !important; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: white; }
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--primary);
    font-weight: 700;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(255,215,0,0.4); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }
.btn-xs { padding: 4px 12px; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================
   HERO SECTION
   ============================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem;
}
.hero-particles {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    animation: float 15s infinite;
}
.p1 { width: 300px; height: 300px; top: -50px; right: -50px; animation-delay: 0s; }
.p2 { width: 200px; height: 200px; bottom: -30px; left: -30px; animation-delay: 5s; }
.p3 { width: 150px; height: 150px; top: 40%; left: 60%; animation-delay: 10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
}
.hero-badge-container {
    margin-bottom: 2rem;
    animation: slideUp 0.8s ease-out;
}
.hero-logo-badge {
    background: var(--gold);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: 20px;
    letter-spacing: 3px;
    animation: badgePulse 2s ease-in-out infinite;
}

.hero-title { color: white; margin-bottom: 1.5rem; }
.hero-title-line1 {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 1px;
    opacity: 0.9;
    animation: slideUp 0.8s ease-out 0.1s both;
}
.hero-title-line2 {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--gold), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.8s ease-out 0.2s both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: slideUp 0.8s ease-out 0.4s both;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: slideUp 0.8s ease-out 0.6s both;
}
.hero-buttons .btn-primary { background: var(--gold); color: var(--primary); font-weight: 700; }
.hero-buttons .btn-primary:hover { box-shadow: 0 5px 30px rgba(255,215,0,0.5); }
.hero-buttons .btn-outline { border-color: white; color: white; }
.hero-buttons .btn-outline:hover { background: white; color: var(--primary); }

.hero-trust {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease-out 0.8s both;
}
.hero-trust-item {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}
.hero-trust-item i { color: var(--gold); }

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
}
.scroll-arrow {
    width: 30px; height: 30px;
    border-right: 3px solid rgba(255,255,255,0.4);
    border-bottom: 3px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================
   FEATURES SECTION
   ============================ */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 3rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}
.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
    position: relative;
}
.feature-step {
    position: absolute;
    top: -5px; right: -5px;
    width: 24px; height: 24px;
    background: var(--gold);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-card h3 { margin-bottom: 0.5rem; color: var(--primary); }
.feature-card p { color: var(--text-light); font-size: 0.9rem; }

/* ============================
   PROMO SECTION
   ============================ */
.promo-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}
.promo-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}
.promo-container h2 { color: white; font-size: 2rem; margin-bottom: 1rem; }
.promo-container p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 2rem; }
.crown-icon { color: var(--gold); animation: crownBounce 2s ease-in-out infinite; }
@keyframes crownBounce {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}
.promo-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.promo-feat {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.promo-feat i { color: var(--gold); }

.promo-dino {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}
.promo-dino-svg {
    animation: dinoRoar 3s ease-in-out infinite;
}
@keyframes dinoRoar {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1) rotate(-5deg); }
    20% { transform: scale(1.05) rotate(3deg); }
    30% { transform: scale(1); }
}
.roar-lines { position: absolute; top: 20px; right: -30px; }
.roar-line {
    display: block;
    width: 20px; height: 2px;
    background: rgba(255,215,0,0.6);
    margin: 4px 0;
    border-radius: 2px;
    animation: roarPulse 1.5s ease-in-out infinite;
}
.rl1 { animation-delay: 0s; width: 15px; }
.rl2 { animation-delay: 0.2s; width: 22px; }
.rl3 { animation-delay: 0.4s; width: 12px; }
@keyframes roarPulse {
    0%, 100% { opacity: 0; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(10px); }
}

/* ============================
   AUTH PAGES
   ============================ */
.auth-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.auth-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-dino { animation: dinoWalk 3s ease-in-out infinite; margin-bottom: 1rem; }
.auth-header h2 { color: var(--primary); margin-bottom: 0.3rem; }
.auth-header p { color: var(--text-light); font-size: 0.9rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}
.form-group label i { color: var(--accent); margin-right: 4px; }
.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 2px solid #e0e5ec;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46,134,171,0.1);
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}
.auth-footer a { font-weight: 600; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-error { background: #fde8e8; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-success { background: #e8fde8; color: var(--success); border: 1px solid #c6f5c6; }

/* ============================
   DASHBOARD
   ============================ */
.dashboard, .history-section, .stats-section, .choose-test, .admin-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dashboard-header h1 { font-size: 1.8rem; color: var(--primary); }
.dino-emoji { animation: dinoWalk 2s ease-in-out infinite; display: inline-block; }

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}
.section-header h1 { color: var(--primary); font-size: 2rem; }
.section-header p { color: var(--text-light); }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.stat-icon.success { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.stat-icon.correct { background: linear-gradient(135deg, var(--success), #219a52); }
.stat-icon.wrong { background: linear-gradient(135deg, var(--danger), #c0392b); }
.stat-number { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: block; }
.stat-label { font-size: 0.8rem; color: var(--text-light); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}
.dashboard-panel {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.dashboard-panel h3 { color: var(--primary); margin-bottom: 1rem; font-size: 1.1rem; }

/* Test list */
.test-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1rem; }
.test-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg);
    transition: var(--transition);
    color: var(--text);
}
.test-item:hover { background: #e8edf3; }
.test-item-date { font-size: 0.8rem; color: var(--text-light); display: block; }
.test-item-temas { font-size: 0.85rem; font-weight: 500; }
.test-item-score {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 4px 12px;
    border-radius: 8px;
}
.test-item-score.pass { background: #e8fde8; color: var(--success); }
.test-item-score.fail { background: #fde8e8; color: var(--danger); }

/* Empty state */
.empty-state, .empty-state-full {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}
.empty-state-full { padding: 4rem 2rem; }
.empty-dino, .empty-dino-lg { animation: dinoWalk 3s ease-in-out infinite; margin-bottom: 1rem; }

/* Promo panel */
.promo-panel {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    color: white;
    position: relative;
    overflow: hidden;
}
.promo-panel h3 { color: var(--gold) !important; }
.promo-panel p { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 1rem; }
.promo-panel-dino {
    position: absolute;
    top: -10px; right: -10px;
    opacity: 0.15;
    animation: dinoWalk 4s ease-in-out infinite;
}
.promo-list {
    list-style: none;
    margin-bottom: 1.5rem;
}
.promo-list li {
    color: rgba(255,255,255,0.9);
    padding: 4px 0;
    font-size: 0.85rem;
}
.promo-list li i { color: var(--gold); margin-right: 8px; }

/* ============================
   TEST SELECTION
   ============================ */
.tema-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}
.temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.tema-card {
    cursor: pointer;
    position: relative;
}
.tema-card input { display: none; }
.tema-card-inner {
    background: white;
    border: 2px solid #e0e5ec;
    border-radius: var(--radius);
    padding: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.tema-card:hover .tema-card-inner { border-color: var(--accent); }
.tema-card.selected .tema-card-inner {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(46,134,171,0.05), rgba(46,134,171,0.1));
}
.tema-numero { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.tema-nombre { font-weight: 600; color: var(--primary); margin: 4px 0; }
.tema-count { font-size: 0.8rem; color: var(--text-light); }
.tema-check {
    position: absolute;
    top: 10px; right: 10px;
    width: 28px; height: 28px;
    background: var(--accent);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}
.tema-card.selected .tema-check { opacity: 1; transform: scale(1); }

.test-options {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.test-submit { text-align: center; }
.test-submit-info { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-light); }

/* ============================
   ACTIVE TEST
   ============================ */
.test-active {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 1;
}
.test-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius);
    padding: 12px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    position: sticky;
    top: 72px;
    z-index: 10;
}
.test-progress { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.test-timer { color: var(--accent); font-weight: 600; font-size: 1rem; }

.question-card {
    display: none;
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}
.question-card.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.question-tema { color: var(--accent); font-weight: 600; }
.question-num { color: var(--text-light); }
.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.question-options { display: flex; flex-direction: column; gap: 10px; }
.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e0e5ec;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.option-label:hover { border-color: var(--accent); background: rgba(46,134,171,0.03); }
.option-label input { display: none; }
.option-label input:checked + .option-letter {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.option-label:has(input:checked) {
    border-color: var(--accent);
    background: rgba(46,134,171,0.05);
}
.option-letter {
    width: 36px; height: 36px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-shrink: 0;
    transition: var(--transition);
}
.option-text { font-size: 0.95rem; }

.test-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}
.question-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}
.q-dot {
    width: 32px; height: 32px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
}
.q-dot.current { border-color: var(--accent); color: var(--accent); }
.q-dot.answered { background: var(--accent); color: white; border-color: var(--accent); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.modal-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease;
}
.modal-dino { animation: dinoWalk 2s ease-in-out infinite; margin-bottom: 1rem; }
.modal-card h3 { color: var(--primary); margin-bottom: 0.5rem; }
.modal-card p { color: var(--text-light); margin-bottom: 1.5rem; }
.modal-buttons { display: flex; gap: 1rem; justify-content: center; }

/* ============================
   RESULTS PAGE
   ============================ */
.test-result {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}
.result-header {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.result-header.pass {
    background: linear-gradient(135deg, var(--success), #219a52);
    color: white;
}
.result-header.fail {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}
.result-dino { margin-bottom: 1rem; position: relative; display: inline-block; }
.dino-celebration { animation: dinoJump 1s ease-in-out infinite; }
@keyframes dinoJump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.dino-sad { animation: dinoSad 3s ease-in-out infinite; }
@keyframes dinoSad {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(-3deg) translateY(3px); }
}
.result-stars { position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.star-anim {
    color: var(--gold);
    font-size: 1.2rem;
    position: absolute;
    animation: starBurst 1.5s ease-out infinite;
}
.s1 { animation-delay: 0s; left: -30px; }
.s2 { animation-delay: 0.3s; left: 0; }
.s3 { animation-delay: 0.6s; left: 30px; }
@keyframes starBurst {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

.score-circle { position: relative; display: inline-block; margin-bottom: 1rem; }
.score-ring { width: 120px; height: 120px; }
.score-progress {
    transition: stroke-dasharray 1s ease;
}
.score-value {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
}
.result-summary {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.rs-item {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

/* Review cards */
.result-review { margin-bottom: 2rem; }
.result-review h3 { color: var(--primary); margin-bottom: 1rem; }
.review-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid #ddd;
}
.review-card.correct { border-left-color: var(--success); }
.review-card.wrong { border-left-color: var(--danger); }
.review-card.blank { border-left-color: var(--warning); }
.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
}
.review-num {
    width: 30px; height: 30px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}
.review-tema { color: var(--accent); font-weight: 500; }
.review-status { margin-left: auto; font-weight: 600; }
.review-card.correct .review-status { color: var(--success); }
.review-card.wrong .review-status { color: var(--danger); }
.review-card.blank .review-status { color: var(--warning); }
.review-question { font-weight: 600; margin-bottom: 1rem; color: var(--primary); }
.review-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0.8rem; }
.review-option {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
}
.review-option.is-correct { background: #e8fde8; color: var(--success); font-weight: 600; }
.review-option.is-wrong { background: #fde8e8; color: var(--danger); }
.ro-letter { font-weight: 700; min-width: 20px; }
.review-option i { margin-left: auto; }
.review-explanation {
    background: #fff8e1;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #856404;
}
.review-explanation i { color: var(--gold); margin-right: 6px; }

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

/* ============================
   HISTORY TABLE
   ============================ */
.history-table-container { overflow-x: auto; }
.history-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-collapse: collapse;
}
.history-table th {
    background: var(--primary);
    color: white;
    padding: 12px 16px;
    font-size: 0.85rem;
    text-align: left;
}
.history-table td {
    padding: 12px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}
.history-table tr:hover td { background: var(--bg); }
.nota-badge {
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}
.nota-badge.pass { background: #e8fde8; color: var(--success); }
.nota-badge.fail { background: #fde8e8; color: var(--danger); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-light); }

/* ============================
   STATISTICS
   ============================ */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-big-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.stat-big-card:hover { transform: translateY(-3px); }
.stat-big-card.highlight {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}
.stat-big-icon { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--accent); }
.stat-big-card.highlight .stat-big-icon { color: var(--gold); }
.stat-big-number { font-size: 2.5rem; font-weight: 800; }
.stat-big-label { font-size: 0.85rem; opacity: 0.8; }

.stats-panel {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}
.stats-panel h3 { color: var(--primary); margin-bottom: 1rem; }
.chart-container { height: 300px; position: relative; }

.tema-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.tema-stat-card {
    background: var(--bg);
    border-radius: 10px;
    padding: 1rem;
}
.tema-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.tema-stat-num { font-weight: 600; color: var(--accent); font-size: 0.85rem; }
.tema-stat-pct { font-weight: 700; font-size: 1.1rem; }
.tema-stat-pct.good { color: var(--success); }
.tema-stat-pct.ok { color: var(--warning); }
.tema-stat-pct.bad { color: var(--danger); }
.tema-stat-name { font-weight: 500; font-size: 0.9rem; margin-bottom: 8px; }
.tema-stat-bar {
    height: 6px;
    background: #e0e5ec;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.tema-stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 3px;
    transition: width 1s ease;
}
.tema-stat-detail {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.stats-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    color: white;
}
.stats-cta-dino { font-size: 3rem; animation: dinoWalk 2s ease-in-out infinite; display: inline-block; }
.stats-cta h3 { color: var(--gold); margin: 0.5rem 0; }
.stats-cta p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }

/* ============================
   ADMIN
   ============================ */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.admin-panel {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.admin-panel h3 { color: var(--primary); margin-bottom: 1rem; }
.admin-stat { font-size: 1.1rem; margin-bottom: 1rem; }
.upload-form { margin-top: 1rem; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}
.admin-table th { background: var(--bg); font-weight: 600; }

/* ============================
   CTA BANNER
   ============================ */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-dino {
    position: absolute;
    bottom: 10px;
    left: 5%;
    animation: dinoWalkAcross 20s linear infinite;
}
@keyframes dinoWalkAcross {
    from { left: -100px; }
    to { left: calc(100% + 100px); }
}
.dino-walk { animation: dinoStep 0.5s ease-in-out infinite alternate; }
@keyframes dinoStep {
    from { transform: translateY(0) rotate(-2deg); }
    to { transform: translateY(-5px) rotate(2deg); }
}
.cta-content { position: relative; z-index: 1; }
.cta-content h3 { color: white; font-size: 1.5rem; margin-bottom: 0.5rem; }
.cta-content h3 i { color: var(--gold); }
.cta-content p { color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; }
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.5);
    color: var(--primary);
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 3rem 2rem 1rem;
}
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-logo {
    height: 50px;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.footer-col h4 { color: white; margin-bottom: 1rem; font-size: 1rem; }
.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    padding: 3px 0;
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-col a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { font-size: 1.3rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    position: relative;
}
.footer-dinos {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}
.mini-dino { animation: miniWalk 3s ease-in-out infinite; display: inline-block; }
.md1 { animation-delay: 0s; }
.md2 { animation-delay: 0.5s; }
.md3 { animation-delay: 1s; }
@keyframes miniWalk {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ============================
   WELCOME MODAL
   ============================ */
.welcome-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.welcome-modal {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}
.welcome-modal h2 { color: var(--primary); margin-bottom: 0.5rem; }
.welcome-modal p { color: var(--text-light); margin-bottom: 1.5rem; }
.dino-dance {
    animation: dance 1s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes dance {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    25% { transform: rotate(-5deg) scaleY(0.95); }
    50% { transform: rotate(0deg) scaleY(1.05); }
    75% { transform: rotate(5deg) scaleY(0.95); }
}
.confetti-container { position: relative; height: 0; }
.confetti {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 2px;
    animation: confettiFall 2s ease-out infinite;
}
.c1 { left: 10%; background: var(--gold); animation-delay: 0s; }
.c2 { left: 30%; background: var(--accent); animation-delay: 0.3s; }
.c3 { left: 50%; background: var(--danger); animation-delay: 0.6s; }
.c4 { left: 70%; background: var(--success); animation-delay: 0.9s; }
.c5 { left: 85%; background: var(--gold); animation-delay: 1.2s; }
.c6 { left: 45%; background: var(--accent); animation-delay: 1.5s; }
@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
    100% { opacity: 0; transform: translateY(100px) rotate(720deg); }
}

/* ============================
   MAIN CONTENT
   ============================ */
.main-content {
    min-height: calc(100vh - 70px);
    position: relative;
    z-index: 1;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px; left: 0; right: 0;
        background: var(--primary);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }
    .nav-menu.active { display: flex; }
    .nav-link { padding: 12px 16px; }

    .hero-title-line1 { font-size: 1.5rem; }
    .hero-title-line2 { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }

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

    .question-dots { display: none; }
    .test-navigation { justify-content: space-between; }

    .result-summary { flex-direction: column; align-items: center; }
    .footer-dinos { display: none; }
}

@media (max-width: 480px) {
    .stats-cards { grid-template-columns: 1fr 1fr; }
    .hero-trust { flex-direction: column; align-items: center; }
    .hero-title-line1 { font-size: 1.1rem; }
    .hero-title-line2 { font-size: 1.5rem; }
}

/* ============================
   PROFILE PAGE
   ============================ */
.profile-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}
.profile-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: start;
}
.profile-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.profile-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}
.profile-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--bg);
    font-size: 1.15rem;
}
.profile-card h3 i {
    color: var(--accent);
    margin-right: 8px;
}
.profile-card .auth-form {
    gap: 1.2rem;
}
.profile-card .form-group input,
.profile-card .form-group select {
    padding: 12px 16px;
}
.profile-card .form-group input:disabled {
    background: var(--bg);
    color: var(--text-light);
    cursor: not-allowed;
}
.profile-card .btn {
    margin-top: 0.5rem;
}
.profile-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--bg);
}
.profile-info h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.profile-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 6px 0;
    display: flex;
    align-items: center;
}
.profile-info p i {
    color: var(--accent);
    margin-right: 10px;
    width: 18px;
    text-align: center;
}
.nav-user-name {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: var(--transition);
}
.nav-user-name:hover { color: var(--gold); }

@media (max-width: 768px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-card { padding: 1.5rem; }
    .profile-section { padding: 2rem 1rem; }
}
