/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #6C63FF;
    --primary-dark: #5A52E0;
    --primary-light: #8B85FF;
    --secondary: #FF6B6B;
    --accent: #4ECDC4;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --dark: #1A1A2E;
    --dark-2: #16213E;
    --dark-3: #0F3460;
    --text: #E8E8E8;
    --text-secondary: #B0B0C0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --gradient-1: linear-gradient(135deg, #6C63FF 0%, #4ECDC4 100%);
    --gradient-2: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    --gradient-3: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===== Animated Particles Background ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ===== Page Transitions ===== */
.page {
    display: none;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.5s ease-out;
}

.page.active {
    display: block;
}

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

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

/* ===== Glass Card Effect ===== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px var(--glass-shadow);
}

/* ===== LANDING PAGE ===== */
.hero-header {
    text-align: center;
    padding: 2.5rem 1rem 0.5rem;
}

.logo-container {
    animation: slideUp 0.8s ease-out;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

.logo-emoji {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.title-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.site-tagline {
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 0.3rem;
    opacity: 0.8;
}

.landing-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2rem;
}

/* Today Badge Center */
.today-badge-center {
    text-align: center;
    margin-bottom: 1.5rem;
}

.today-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.loading-content {
    text-align: center;
    padding: 3rem 2.5rem;
    max-width: 400px;
    width: 100%;
    animation: scaleIn 0.3s ease-out;
}

.loading-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.3rem;
}

.loading-exam {
    color: var(--primary-light);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== EXAM CARDS GRID - 3 COLUMNS ===== */
.test-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.test-select-card {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: scaleIn 0.6s ease-out both;
}

.test-select-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Card Ribbon */
.card-ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    transform: rotate(45deg);
    color: white;
    padding: 3px 40px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.card-icon-large {
    font-size: 2.5rem;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.1rem;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Card Stats */
.card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.card-stat {
    padding: 0.5rem 0.3rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.card-stat-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Card Topics/Tags */
.card-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.card-tag {
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.6rem;
    font-weight: 500;
    border: 1px solid;
}

/* Card Buttons */
.btn-exam {
    font-size: 0.85rem;
    padding: 12px 24px;
    width: 100%;
}

.btn-exam:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Instructions Card ===== */
.instructions-card {
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    animation: slideUp 0.6s ease-out 0.5s both;
}

.instructions-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    text-align: center;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.instruction-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    animation: glowRotate 3s linear infinite;
}

@keyframes glowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-clear {
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-clear:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-danger {
    background: var(--gradient-2) !important;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-card {
    padding: 1.3rem;
    text-align: center;
    transition: var(--transition);
    animation: slideUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.6s; }
.feature-card:nth-child(2) { animation-delay: 0.7s; }
.feature-card:nth-child(3) { animation-delay: 0.8s; }
.feature-card:nth-child(4) { animation-delay: 0.9s; }

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 99, 255, 0.3);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #fff;
}

.feature-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
}

/* ===== TEST PAGE ===== */
.test-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.test-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.question-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.test-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary-light);
    min-width: 130px;
    justify-content: center;
}

.timer-box.warning {
    background: rgba(243, 156, 18, 0.15);
    border-color: rgba(243, 156, 18, 0.3);
    color: var(--warning);
    animation: pulse 1s ease-in-out infinite;
}

.timer-box.danger {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.3);
    color: var(--danger);
    animation: pulse 0.5s ease-in-out infinite;
}

.btn-submit-top {
    padding: 8px 20px;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-submit-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

/* Test Body Layout */
.test-body {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Question Navigation Sidebar */
.question-nav-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
}

.question-nav-sidebar h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.nav-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-dot.answered { background: var(--success); }
.legend-dot.not-answered { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.2); }
.legend-dot.current { background: var(--primary); }

.question-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
}

.q-nav-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.q-nav-btn:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.3);
}

.q-nav-btn.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.4);
}

.q-nav-btn.answered {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.4);
    color: var(--success);
}

/* Question Area */
.question-area {
    flex: 1;
    min-width: 0;
}

.question-card {
    padding: 2rem;
    margin-bottom: 1rem;
}

.question-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.25);
    color: var(--accent);
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #fff;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.option-item:hover {
    border-color: rgba(108, 99, 255, 0.3);
    background: rgba(108, 99, 255, 0.05);
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.12);
}

.option-letter {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: white;
}

.option-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    padding-top: 4px;
}

/* Question Actions */
.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(108, 99, 255, 0.4);
    z-index: 200;
    font-family: 'Inter', sans-serif;
}

/* ===== RESULT PAGE ===== */
.result-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.result-hero {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.6s ease-out;
}

.result-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.result-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-exam-badge {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: var(--primary-light);
    margin-bottom: 1.5rem;
}

/* Score Circle */
.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
}

.score-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 8;
}

.score-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-total {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Result Stats */
.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-stat-card {
    padding: 1.5rem 1rem;
    text-align: center;
    animation: slideUp 0.5s ease-out both;
}

.result-stat-card:nth-child(1) { animation-delay: 0.2s; }
.result-stat-card:nth-child(2) { animation-delay: 0.3s; }
.result-stat-card:nth-child(3) { animation-delay: 0.4s; }
.result-stat-card:nth-child(4) { animation-delay: 0.5s; }

.result-stat-card.correct { border-color: rgba(46, 204, 113, 0.3); }
.result-stat-card.wrong { border-color: rgba(231, 76, 60, 0.3); }
.result-stat-card.skipped { border-color: rgba(243, 156, 18, 0.3); }
.result-stat-card.time-taken { border-color: rgba(108, 99, 255, 0.3); }

.result-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.result-stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* Category Breakdown */
.result-category-breakdown {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    animation: slideUp 0.5s ease-out 0.6s both;
}

.result-category-breakdown h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.category-bar-item {
    margin-bottom: 1rem;
}

.category-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.category-bar-name {
    font-weight: 600;
    color: var(--text);
}

.category-bar-score {
    color: var(--text-secondary);
}

.category-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--gradient-1);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Answer Review */
.review-section {
    margin-top: 1rem;
}

.review-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.review-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.review-item.correct-review { border-left: 4px solid var(--success); }
.review-item.wrong-review { border-left: 4px solid var(--danger); }
.review-item.skipped-review { border-left: 4px solid var(--warning); }

.review-q-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.review-q-number {
    font-weight: 700;
    font-size: 0.9rem;
}

.review-q-status {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.review-q-status.correct-status { background: rgba(46, 204, 113, 0.15); color: var(--success); }
.review-q-status.wrong-status { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.review-q-status.skipped-status { background: rgba(243, 156, 18, 0.15); color: var(--warning); }

.review-question-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #fff;
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.review-option {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
}

.review-option.correct-option {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
    color: var(--success);
}

.review-option.wrong-option {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    color: var(--danger);
}

.review-option-letter { font-weight: 700; min-width: 20px; }

.review-explanation {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.2);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.review-explanation strong { color: var(--primary-light); }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    padding: 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    animation: scaleIn 0.3s ease-out;
}

.modal-icon { font-size: 3rem; margin-bottom: 1rem; }
.modal h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 0.9rem; }
.modal-actions { display: flex; gap: 0.8rem; justify-content: center; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .test-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .site-title { font-size: 1.8rem; }
    .test-cards-grid { grid-template-columns: 1fr; }
    .instructions-grid { grid-template-columns: 1fr 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }

    .test-body {
        flex-direction: column;
        padding: 1rem;
    }

    .question-nav-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 500;
        border-radius: 0;
        max-height: 100vh;
        padding: 2rem 1.5rem;
        background: rgba(26, 26, 46, 0.98);
    }

    .question-nav-sidebar.mobile-open { display: block; }
    .mobile-nav-toggle { display: block; }

    .test-header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
    }

    .test-header-left, .test-header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .question-card { padding: 1.2rem; }
    .question-text { font-size: 1rem; }
    .question-actions { flex-wrap: wrap; }
    .result-stats { grid-template-columns: repeat(2, 1fr); }
    .result-hero { padding: 2rem 1.5rem; }
    .score-circle { width: 130px; height: 130px; }
    .score-value { font-size: 2rem; }

    .api-key-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .site-title { font-size: 1.5rem; }
    .card-title { font-size: 1.05rem; }
    .card-stats { grid-template-columns: repeat(2, 1fr); }
    .instructions-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }

    .btn-primary {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .timer-box {
        font-size: 1rem;
        min-width: 110px;
    }
}
