 @import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

 /* Light Theme (Default) */
 :root {
     --primary: #16a34a;
     /* Green */
     --primary-glow: rgba(22, 163, 74, 0.4);
     --bg-black: #ffffff;
     --glass-bg: rgba(255, 255, 255, 0.7);
     --glass-border: rgba(0, 0, 0, 0.1);
     --font-head: 'Space Grotesk', sans-serif;
     --font-body: 'Outfit', sans-serif;
 }

 /* Dark Theme */
 [data-theme="dark"] {
     --primary: #00ff9d;
     /* Neon Green */
     --primary-glow: rgba(0, 255, 157, 0.6);
     --bg-black: #000000;
     --glass-bg: rgba(20, 20, 20, 0.7);
     --glass-border: rgba(255, 255, 255, 0.1);
 }

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

 body {
     min-height: 100vh;
     color: hsl(var(--foreground, 240 10% 4%));
     background: var(--bg-black);
     font-family: var(--font-body);
     overflow-x: hidden;
     display: flex;
     flex-direction: column;
 }

 [data-theme="dark"] body {
     color: white;
 }

 /* --- VIDEO BACKGROUND --- */
 .video-bg-container {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: -10;
 }

 .back-video {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 /* UPDATED OVERLAY FOR BETTER VISIBILITY */
 .video-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: linear-gradient(135deg,
             rgba(255, 255, 255, 0.7) 0%,
             rgba(240, 250, 245, 0.65) 50%,
             rgba(255, 255, 255, 0.75) 100%);
     backdrop-filter: blur(2px);
     z-index: -5;
 }

 [data-theme="dark"] .video-overlay {
     background: rgba(0, 0, 0, 0.65);
     backdrop-filter: blur(4px);
 }

 /* --- ANIMATIONS --- */
 @keyframes textReveal {
     0% {
         opacity: 0;
         transform: translateY(30px);
         filter: blur(10px);
     }

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

 @keyframes gradientFlow {
     0% {
         background-position: 0% 50%;
     }

     50% {
         background-position: 100% 50%;
     }

     100% {
         background-position: 0% 50%;
     }
 }

 .neon-text {
     font-family: var(--font-head);
     font-weight: 800;
     background: linear-gradient(270deg, #ffffff, var(--primary), #ffffff);
     background-size: 200% 200%;
     -webkit-background-clip: text;
     background-clip: text;
     -webkit-text-fill-color: transparent;
     animation: gradientFlow 3s ease infinite, textReveal 1s ease-out forwards;
     filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.3));
 }

 /* --- NAVBAR --- */
 .navbar {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 1.5rem 4rem;
     position: sticky;
     top: 0;
     z-index: 100;
     background: rgba(0, 0, 0, 0.4);
     backdrop-filter: blur(10px);
     border-bottom: 1px solid rgba(255, 255, 255, 0.05);
 }

 .brand {
     font-family: var(--font-head);
     font-size: 1.8rem;
     font-weight: 700;
     color: white;
     text-transform: uppercase;
     letter-spacing: -1px;
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .glow-brand {
     color: #000;
     background: var(--primary);
     padding: 4px 10px;
     border-radius: 4px;
     font-size: 0.9rem;
     letter-spacing: 1px;
     box-shadow: 0 0 15px var(--primary-glow);
 }

 .glow-btn {
     background: transparent;
     border: 1px solid var(--primary);
     color: var(--primary);
     padding: 10px 24px;
     border-radius: 50px;
     font-family: var(--font-head);
     font-weight: 700;
     text-transform: uppercase;
     font-size: 0.8rem;
     letter-spacing: 1px;
     text-decoration: none;
     transition: 0.3s;
     box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
     cursor: pointer;
 }

 .glow-btn:hover {
     background: var(--primary);
     color: black;
     box-shadow: 0 0 30px var(--primary-glow);
     transform: translateY(-2px);
 }

 /* --- LAYOUTS --- */
 .main-container {
     flex: 1;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 2rem 5%;
     width: 100%;
 }

 .glass-panel {
     background: var(--glass-bg);
     border: 1px solid var(--glass-border);
     backdrop-filter: blur(20px);
     border-radius: 24px;
     padding: 2rem;
     text-align: center;
     transition: 0.4s;
     animation: textReveal 0.8s backwards;
 }

 /* --- FORMS --- */
 .input-group {
     margin-bottom: 1.5rem;
     text-align: left;
 }

 label {
     display: block;
     margin-bottom: 8px;
     color: var(--primary);
     font-family: var(--font-head);
     font-size: 0.8rem;
     font-weight: 600;
     letter-spacing: 1px;
     text-transform: uppercase;
 }

 input,
 select,
 textarea {
     width: 100%;
     padding: 16px;
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid rgba(255, 255, 255, 0.1);
     border-radius: 12px;
     color: white;
     font-family: var(--font-body);
     font-size: 1rem;
     transition: 0.3s;
 }

 input:focus,
 select:focus,
 textarea:focus {
     outline: none;
     border-color: var(--primary);
     background: rgba(0, 0, 0, 0.8);
 }

 /* --- SCORE BADGE --- */
 .score-badge {
     background: rgba(255, 255, 255, 0.1);
     border: 1px solid var(--primary);
     padding: 10px 20px;
     border-radius: 12px;
     font-size: 1.2rem;
     font-weight: bold;
     color: var(--primary);
     box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
     min-width: 120px;
     text-align: center;
     position: relative;
 }

 /* --- FLOATING SCORE ANIMATION --- */
 .float-score {
     position: absolute;
     top: -20px;
     right: 10px;
     font-size: 1.5rem;
     font-weight: bold;
     pointer-events: none;
     animation: floatUp 1s ease-out forwards;
 }

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

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

 @keyframes shake {

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

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

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

 .shake {
     animation: shake 0.3s ease-in-out;
 }

 /* =========================================
   UPDATED QUIZ CARD LAYOUT (Liquid Glass)
   ========================================= */

 .quiz-container {
     width: 100%;
     max-width: 800px;
     height: 100%;
     display: flex;
     flex-direction: column;
     position: relative;
 }

 .quiz-card {
     background: rgba(20, 20, 20, 0.6);
     border: 1px solid rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(24px);
     -webkit-backdrop-filter: blur(24px);
     border-radius: 24px;
     display: flex;
     flex-direction: column;
     overflow: hidden;
     box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
     height: 100%;
     max-height: 800px;
     animation: cardEntry 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
 }

 @keyframes cardEntry {
     from {
         opacity: 0;
         transform: translateY(20px) scale(0.98);
     }

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

 /* --- HEADER --- */
 .quiz-header {
     padding: 1.5rem 2rem;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-bottom: 1px solid rgba(255, 255, 255, 0.08);
     background: rgba(0, 0, 0, 0.2);
 }

 .quiz-category {
     color: #888;
     font-size: 0.85rem;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 2px;
 }

 .quiz-progress {
     font-family: var(--font-head);
     font-size: 1.25rem;
     color: #666;
     font-weight: 500;
 }

 /* --- SCROLL AREA --- */
 .quiz-scroll-area {
     flex: 1;
     overflow-y: auto;
     padding: 2rem 2.5rem;
     display: flex;
     flex-direction: column;
     gap: 2rem;
 }

 /* Custom Scrollbar */
 .quiz-scroll-area::-webkit-scrollbar {
     width: 6px;
 }

 .quiz-scroll-area::-webkit-scrollbar-track {
     background: rgba(255, 255, 255, 0.02);
 }

 .quiz-scroll-area::-webkit-scrollbar-thumb {
     background: rgba(255, 255, 255, 0.1);
     border-radius: 10px;
 }

 .quiz-scroll-area::-webkit-scrollbar-thumb:hover {
     background: rgba(255, 255, 255, 0.2);
 }

 /* --- QUESTION --- */
 .quiz-question {
     font-size: 1.5rem;
     line-height: 1.4;
     font-weight: 600;
     color: rgba(255, 255, 255, 0.95);
     margin-bottom: 0.5rem;
 }

 /* --- OPTIONS GRID --- */
 .quiz-options {
     display: grid;
     grid-template-columns: 1fr;
     gap: 1rem;
 }

 .option-btn {
     width: 100%;
     padding: 1.25rem 1.5rem;
     text-align: left;
     background: rgba(255, 255, 255, 0.03);
     border: 1px solid rgba(255, 255, 255, 0.08);
     border-radius: 16px;
     color: rgba(255, 255, 255, 0.8);
     font-size: 1rem;
     font-family: var(--font-body);
     cursor: pointer;
     transition: all 0.2s ease;
     position: relative;
     overflow: hidden;
 }

 .option-btn:hover:not(:disabled) {
     background: rgba(255, 255, 255, 0.08);
     border-color: rgba(255, 255, 255, 0.2);
     transform: translateY(-2px);
 }

 .option-btn:active:not(:disabled) {
     transform: scale(0.98);
 }

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

 .option-btn.correct {
     background: rgba(0, 255, 157, 0.1) !important;
     border-color: var(--primary) !important;
     color: var(--primary) !important;
     font-weight: 600;
     box-shadow: 0 0 20px rgba(0, 255, 157, 0.15);
 }

 .option-btn.wrong {
     background: rgba(255, 70, 70, 0.1) !important;
     border-color: #ff4646 !important;
     color: #ff4646 !important;
 }

 .option-btn:disabled {
     cursor: default;
     opacity: 0.8;
 }

 /* --- INSIGHT PANEL --- */
 .insight-panel {
     overflow: hidden;
     max-height: 0;
     /* Collapsed */
     opacity: 0;
     background: rgba(0, 0, 0, 0.3);
     border-radius: 16px;
     border: 1px solid rgba(255, 255, 255, 0.05);
     transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
 }

 .insight-panel.open {
     max-height: 500px;
     opacity: 1;
     margin-top: 1rem;
 }

 .insight-content {
     padding: 1.5rem;
 }

 .insight-title {
     color: var(--primary);
     font-size: 0.9rem;
     text-transform: uppercase;
     letter-spacing: 1px;
     margin-bottom: 0.5rem;
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .insight-text {
     color: #ccc;
     font-size: 0.95rem;
     line-height: 1.6;
 }

 /* --- FOOTER ACTIONS --- */
 .quiz-footer {
     padding: 1.5rem 2rem;
     border-top: 1px solid rgba(255, 255, 255, 0.08);
     background: rgba(0, 0, 0, 0.2);
     display: flex;
     justify-content: flex-end;
     gap: 1rem;
     min-height: 80px;
     /* Prevent layout shift */
 }

 .btn-glass {
     background: transparent;
     border: 1px solid rgba(255, 255, 255, 0.2);
     color: rgba(255, 255, 255, 0.7);
     padding: 0.8rem 1.5rem;
     border-radius: 50px;
     cursor: pointer;
     font-weight: 500;
     transition: 0.2s;
 }

 .btn-glass:hover:not(:disabled) {
     border-color: white;
     color: white;
     background: rgba(255, 255, 255, 0.05);
 }

 .btn-glass:disabled {
     opacity: 0.3;
     border-color: rgba(255, 255, 255, 0.1);
     cursor: not-allowed;
 }

 /* RESPONSIVE */
 @media (max-width: 768px) {
     .quiz-card {
         border-radius: 0;
     }

     .quiz-header {
         padding: 1rem 1.5rem;
     }

     .quiz-question {
         font-size: 1.15rem;
     }

     .quiz-scroll-area {
         padding: 1rem;
     }

     .option-btn {
         padding: 1rem;
     }

     .quiz-footer {
         padding: 1rem 1.5rem;
     }
 }

 /* --- DASHBOARD SPECIFIC STYLES --- */

 .dashboard-split {
     display: grid;
     grid-template-columns: 0.8fr 1.2fr;
     /* Text takes less space, Stats take more */
     gap: 4rem;
     width: 100%;
     max-width: 1200px;
     align-items: center;
 }

 .hero-content {
     text-align: left;
 }

 .hero-title {
     font-size: 5rem;
     line-height: 1;
     margin-bottom: 1.5rem;
 }

 .hero-desc {
     font-size: 1.1rem;
     color: #ccc;
     line-height: 1.6;
     max-width: 400px;
 }

 /* THE BENTO GRID (Right Side) */
 .stats-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     /* 2 Columns */
     gap: 1.5rem;
     width: 100%;
 }

 .stat-card {
     padding: 2rem;
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     min-height: 180px;
 }

 .full-width {
     grid-column: span 2;
     /* Make these cards stretch across */
     text-align: left;
     min-height: 200px;
     display: flex;
     flex-direction: column;
 }

 /* LEADERBOARD & LIST STYLING */
 .list-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 15px;
     padding-bottom: 10px;
     border-bottom: 1px solid rgba(255, 255, 255, 0.1);
     width: 100%;
 }

 .leader-item {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 12px 15px;
     background: rgba(255, 255, 255, 0.03);
     border-radius: 10px;
     margin-bottom: 8px;
     transition: 0.2s;
 }

 .leader-item:hover {
     background: rgba(255, 255, 255, 0.08);
     transform: translateX(5px);
 }

 .rank-badge {
     background: var(--primary);
     color: black;
     font-weight: bold;
     width: 24px;
     height: 24px;
     border-radius: 50%;
     display: inline-flex;
     justify-content: center;
     align-items: center;
     margin-right: 12px;
     font-size: 0.8rem;
 }

 .scrollable-list {
     max-height: 150px;
     overflow-y: auto;
     width: 100%;
     padding-right: 5px;
 }

 /* Custom Scrollbar for the list */
 .scrollable-list::-webkit-scrollbar {
     width: 4px;
 }

 .scrollable-list::-webkit-scrollbar-track {
     background: rgba(0, 0, 0, 0.2);
 }

 .scrollable-list::-webkit-scrollbar-thumb {
     background: var(--primary);
     border-radius: 4px;
 }

 /* Pulsing Dot Animation */
 .pulsing-dot {
     width: 10px;
     height: 10px;
     background-color: var(--primary);
     border-radius: 50%;
     box-shadow: 0 0 0 rgba(0, 255, 157, 0.4);
     animation: pulse 2s infinite;
 }

 @keyframes pulse {
     0% {
         box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7);
     }

     70% {
         box-shadow: 0 0 0 10px rgba(0, 255, 157, 0);
     }

     100% {
         box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
     }
 }

 /* Responsive Mobile */
 @media (max-width: 900px) {
     .dashboard-split {
         grid-template-columns: 1fr;
         gap: 3rem;
         text-align: center;
     }

     .hero-content {
         text-align: center;
         display: flex;
         flex-direction: column;
         align-items: center;
     }

     .stats-grid {
         grid-template-columns: 1fr;
         /* Stack cards on mobile */
     }

     .full-width {
         grid-column: span 1;
     }
 }

 /* =========================================
   SUCCESS SCREEN OVERLAY
   ========================================= */

 .success-overlay {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.9);
     backdrop-filter: blur(10px);
     z-index: 1000;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 2rem;
     animation: fadeIn 0.3s ease;
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
     }

     to {
         opacity: 1;
     }
 }

 .success-content {
     max-width: 500px;
     width: 100%;
     padding: 3rem 2.5rem;
     text-align: center;
     animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
 }

 @keyframes scaleIn {
     from {
         opacity: 0;
         transform: scale(0.8) translateY(20px);
     }

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

 .success-icon {
     width: 80px;
     height: 80px;
     margin: 0 auto 1.5rem;
     background: linear-gradient(135deg, var(--primary), #00cc7d);
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: 0 0 40px var(--primary-glow);
     animation: successPulse 2s ease infinite;
 }

 @keyframes successPulse {

     0%,
     100% {
         box-shadow: 0 0 40px var(--primary-glow);
     }

     50% {
         box-shadow: 0 0 60px var(--primary-glow), 0 0 80px rgba(0, 255, 157, 0.3);
     }
 }

 .success-icon svg {
     width: 40px;
     height: 40px;
     stroke: #000;
     stroke-width: 3;
     animation: checkDraw 0.6s ease 0.3s both;
 }

 @keyframes checkDraw {
     from {
         stroke-dasharray: 100;
         stroke-dashoffset: 100;
     }

     to {
         stroke-dasharray: 100;
         stroke-dashoffset: 0;
     }
 }

 .success-title {
     font-family: var(--font-head);
     font-size: 1.8rem;
     font-weight: 700;
     color: white;
     margin-bottom: 0.5rem;
 }

 .success-subtitle {
     color: #888;
     font-size: 1rem;
     margin-bottom: 2rem;
 }

 .success-score-card {
     background: rgba(0, 255, 157, 0.1);
     border: 1px solid rgba(0, 255, 157, 0.3);
     border-radius: 16px;
     padding: 1.5rem 2rem;
     margin-bottom: 2rem;
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 0.5rem;
 }

 .score-label {
     font-size: 0.8rem;
     color: #888;
     text-transform: uppercase;
     letter-spacing: 2px;
 }

 .score-value {
     font-family: var(--font-head);
     font-size: 4rem;
     font-weight: 700;
     color: var(--primary);
     line-height: 1;
     text-shadow: 0 0 20px var(--primary-glow);
 }

 .score-max {
     font-size: 1.2rem;
     color: #666;
 }

 .success-actions {
     display: flex;
     flex-direction: column;
     gap: 1rem;
 }

 .success-btn-primary {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.5rem;
     background: var(--primary);
     color: #000;
     font-weight: 700;
 }

 .success-btn-primary:hover {
     background: #00ff9d;
     color: #000;
 }

 .success-btn-secondary {
     background: transparent;
     border-color: rgba(255, 255, 255, 0.3);
     color: #aaa;
 }

 .success-btn-secondary:hover {
     border-color: var(--primary);
     color: var(--primary);
     background: transparent;
 }

 /* =========================================
   LOADING OVERLAY
   ========================================= */

 .loading-overlay {
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.85);
     backdrop-filter: blur(8px);
     z-index: 999;
     display: flex;
     align-items: center;
     justify-content: center;
     animation: fadeIn 0.2s ease;
 }

 .loading-content {
     text-align: center;
     color: white;
 }

 .loading-content p {
     margin-top: 1.5rem;
     color: #aaa;
     font-size: 1rem;
 }

 .loading-spinner {
     width: 60px;
     height: 60px;
     border: 3px solid rgba(255, 255, 255, 0.1);
     border-top-color: var(--primary);
     border-radius: 50%;
     animation: spin 1s linear infinite;
     margin: 0 auto;
 }

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

 /* =========================================
   ERROR TOAST
   ========================================= */

 .error-toast {
     position: fixed;
     bottom: 2rem;
     left: 50%;
     transform: translateX(-50%) translateY(100px);
     z-index: 1001;
     animation: slideUp 0.3s ease forwards;
 }

 @keyframes slideUp {
     to {
         transform: translateX(-50%) translateY(0);
     }
 }

 .error-toast-content {
     display: flex;
     align-items: center;
     gap: 0.75rem;
     background: #ff4646;
     color: white;
     padding: 1rem 1.5rem;
     border-radius: 12px;
     font-weight: 500;
     box-shadow: 0 10px 40px rgba(255, 70, 70, 0.4);
 }

 .error-toast-content svg {
     flex-shrink: 0;
 }

 /* =========================================
   BUTTON STATES
   ========================================= */

 .glow-btn:disabled {
     opacity: 0.5;
     cursor: not-allowed;
     pointer-events: none;
 }

 .glow-btn.loading {
     position: relative;
     color: transparent !important;
     pointer-events: none;
 }

 .glow-btn.loading::after {
     content: '';
     position: absolute;
     width: 20px;
     height: 20px;
     top: 50%;
     left: 50%;
     margin-left: -10px;
     margin-top: -10px;
     border: 2px solid transparent;
     border-top-color: var(--primary);
     border-radius: 50%;
     animation: spin 0.8s linear infinite;
 }

 .glow-btn.loading:hover {
     transform: none;
 }

 /* =========================================
   DEPARTMENT SELECTION OVERLAY
   ========================================= */

 .dept-selection-overlay {
     position: absolute;
     inset: 0;
     background: rgba(255, 255, 255, 0.96);
     z-index: 20;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     backdrop-filter: blur(10px);
 }

 .dept-selection-title {
     color: hsl(var(--foreground, 240 10% 4%));
     margin-bottom: 0.5rem;
     font-family: var(--font-head);
     font-size: 2rem;
 }

 .dept-selection-subtitle {
     color: hsl(var(--muted-foreground, 240 4% 46%));
     margin-bottom: 2rem;
 }

 [data-theme="dark"] .dept-selection-overlay {
     background: rgba(15, 15, 15, 0.96);
 }

 [data-theme="dark"] .dept-selection-title {
     color: white;
 }

 [data-theme="dark"] .dept-selection-subtitle {
     color: #888;
 }

 /* =========================================
   QUIZ LIGHT THEME OVERRIDES
   ========================================= */

 /* Quiz card - light theme */
 .quiz-card {
     background: rgba(255, 255, 255, 0.7);
     border: 1px solid rgba(0, 0, 0, 0.1);
     box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
 }

 [data-theme="dark"] .quiz-card {
     background: rgba(20, 20, 20, 0.6);
     border: 1px solid rgba(255, 255, 255, 0.1);
     box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
 }

 /* Quiz header - light theme */
 .quiz-header {
     border-bottom: 1px solid rgba(0, 0, 0, 0.08);
     background: rgba(255, 255, 255, 0.5);
 }

 [data-theme="dark"] .quiz-header {
     border-bottom: 1px solid rgba(255, 255, 255, 0.08);
     background: rgba(0, 0, 0, 0.2);
 }

 .quiz-category {
     color: hsl(var(--muted-foreground, 240 4% 46%));
 }

 .quiz-progress {
     color: hsl(var(--muted-foreground, 240 4% 46%));
 }

 /* Quiz question - light theme */
 .quiz-question {
     color: hsl(var(--foreground, 240 10% 4%));
 }

 [data-theme="dark"] .quiz-question {
     color: rgba(255, 255, 255, 0.95);
 }

 /* Option buttons - light theme */
 .option-btn {
     background: rgba(0, 0, 0, 0.03);
     border: 1px solid rgba(0, 0, 0, 0.1);
     color: hsl(var(--foreground, 240 10% 4%));
 }

 .option-btn:hover:not(:disabled) {
     background: rgba(0, 0, 0, 0.06);
     border-color: rgba(0, 0, 0, 0.2);
 }

 .option-btn.selected {
     background: rgba(22, 163, 74, 0.1);
     border-color: var(--primary);
     color: hsl(var(--foreground, 240 10% 4%));
 }

 [data-theme="dark"] .option-btn {
     background: rgba(255, 255, 255, 0.03);
     border: 1px solid rgba(255, 255, 255, 0.08);
     color: rgba(255, 255, 255, 0.8);
 }

 [data-theme="dark"] .option-btn:hover:not(:disabled) {
     background: rgba(255, 255, 255, 0.08);
     border-color: rgba(255, 255, 255, 0.2);
 }

 [data-theme="dark"] .option-btn.selected {
     background: rgba(255, 255, 255, 0.1);
     color: white;
 }

 /* Insight panel - light theme */
 .insight-panel {
     background: rgba(0, 0, 0, 0.05);
     border: 1px solid rgba(0, 0, 0, 0.08);
 }

 .insight-text {
     color: hsl(var(--foreground, 240 10% 4%));
 }

 [data-theme="dark"] .insight-panel {
     background: rgba(0, 0, 0, 0.3);
     border: 1px solid rgba(255, 255, 255, 0.05);
 }

 [data-theme="dark"] .insight-text {
     color: #ccc;
 }

 /* Quiz footer - light theme */
 .quiz-footer {
     border-top: 1px solid rgba(0, 0, 0, 0.08);
     background: rgba(255, 255, 255, 0.5);
 }

 [data-theme="dark"] .quiz-footer {
     border-top: 1px solid rgba(255, 255, 255, 0.08);
     background: rgba(0, 0, 0, 0.2);
 }

 /* Glass button - light theme */
 .btn-glass {
     border: 1px solid rgba(0, 0, 0, 0.2);
     color: hsl(var(--foreground, 240 10% 4%));
 }

 .btn-glass:hover:not(:disabled) {
     border-color: hsl(var(--foreground, 240 10% 4%));
     background: rgba(0, 0, 0, 0.05);
 }

 [data-theme="dark"] .btn-glass {
     border: 1px solid rgba(255, 255, 255, 0.2);
     color: rgba(255, 255, 255, 0.7);
 }

 [data-theme="dark"] .btn-glass:hover:not(:disabled) {
     border-color: white;
     color: white;
     background: rgba(255, 255, 255, 0.05);
 }

 /* Scrollbar - light theme */
 .quiz-scroll-area::-webkit-scrollbar-track {
     background: rgba(0, 0, 0, 0.02);
 }

 .quiz-scroll-area::-webkit-scrollbar-thumb {
     background: rgba(0, 0, 0, 0.15);
 }

 .quiz-scroll-area::-webkit-scrollbar-thumb:hover {
     background: rgba(0, 0, 0, 0.25);
 }

 [data-theme="dark"] .quiz-scroll-area::-webkit-scrollbar-track {
     background: rgba(255, 255, 255, 0.02);
 }

 [data-theme="dark"] .quiz-scroll-area::-webkit-scrollbar-thumb {
     background: rgba(255, 255, 255, 0.1);
 }

 [data-theme="dark"] .quiz-scroll-area::-webkit-scrollbar-thumb:hover {
     background: rgba(255, 255, 255, 0.2);
 }

 /* Score badge - light theme */
 .score-badge {
     color: hsl(var(--foreground, 240 10% 4%));
     border-color: rgba(0, 0, 0, 0.15);
 }

 [data-theme="dark"] .score-badge {
     color: white;
     border-color: rgba(255, 255, 255, 0.2);
 }

 /* Navbar brand - light theme */
 .brand {
     color: hsl(var(--foreground, 240 10% 4%));
 }

 [data-theme="dark"] .brand {
     color: white;
 }

 /* =========================================
   NAV ACTIONS (quiz page right-side items)
   ========================================= */

 .nav-actions {
     display: flex;
     align-items: center;
     gap: 12px;
 }

 /* =========================================
   HAMBURGER MENU TOGGLE
   ========================================= */

 .menu-toggle {
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     gap: 5px;
     width: 40px;
     height: 40px;
     background: rgba(255, 255, 255, 0.06);
     border: 1px solid rgba(255, 255, 255, 0.12);
     border-radius: 10px;
     cursor: pointer;
     padding: 8px;
     transition: all 0.3s ease;
     position: relative;
     z-index: 201;
 }

 .menu-toggle:hover {
     background: rgba(255, 255, 255, 0.12);
     border-color: var(--primary);
 }

 .menu-toggle__bar {
     width: 20px;
     height: 2px;
     background: var(--primary);
     border-radius: 2px;
     transition: all 0.3s ease;
     transform-origin: center;
 }

 .menu-toggle--open .menu-toggle__bar:nth-child(1) {
     transform: translateY(7px) rotate(45deg);
 }

 .menu-toggle--open .menu-toggle__bar:nth-child(2) {
     opacity: 0;
     transform: scaleX(0);
 }

 .menu-toggle--open .menu-toggle__bar:nth-child(3) {
     transform: translateY(-7px) rotate(-45deg);
 }

 /* =========================================
   NAV DROPDOWN MENU
   ========================================= */

 .nav-menu {
     position: absolute;
     top: 100%;
     right: 1rem;
     background: rgba(20, 20, 20, 0.95);
     border: 1px solid rgba(255, 255, 255, 0.1);
     backdrop-filter: blur(20px);
     -webkit-backdrop-filter: blur(20px);
     border-radius: 14px;
     padding: 0.75rem;
     display: flex;
     flex-direction: column;
     gap: 0.4rem;
     min-width: 180px;
     opacity: 0;
     visibility: hidden;
     transform: translateY(-8px) scale(0.96);
     transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
     z-index: 200;
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
 }

 .nav-menu--open {
     opacity: 1;
     visibility: visible;
     transform: translateY(4px) scale(1);
 }

 .nav-menu__link {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     padding: 0.65rem 1rem;
     border-radius: 10px;
     color: rgba(255, 255, 255, 0.85);
     font-family: var(--font-head);
     font-size: 0.8rem;
     font-weight: 600;
     letter-spacing: 0.5px;
     text-decoration: none;
     text-transform: uppercase;
     background: transparent;
     border: none;
     cursor: pointer;
     transition: all 0.2s ease;
     width: 100%;
     text-align: left;
 }

 .nav-menu__link:hover {
     background: rgba(255, 255, 255, 0.08);
     color: var(--primary);
 }

 .nav-menu__link--danger:hover {
     color: #ff4646;
     background: rgba(255, 70, 70, 0.1);
 }

 /* Light theme overrides for menu */
 .nav-menu {
     background: rgba(255, 255, 255, 0.95);
     border-color: rgba(0, 0, 0, 0.1);
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
 }

 .nav-menu__link {
     color: hsl(var(--foreground, 240 10% 4%));
 }

 .nav-menu__link:hover {
     background: rgba(0, 0, 0, 0.05);
 }

 [data-theme="dark"] .nav-menu {
     background: rgba(20, 20, 20, 0.95);
     border-color: rgba(255, 255, 255, 0.1);
     box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
 }

 [data-theme="dark"] .nav-menu__link {
     color: rgba(255, 255, 255, 0.85);
 }

 [data-theme="dark"] .nav-menu__link:hover {
     background: rgba(255, 255, 255, 0.08);
 }

 .menu-toggle {
     background: rgba(0, 0, 0, 0.05);
     border-color: rgba(0, 0, 0, 0.12);
 }

 .menu-toggle__bar {
     background: var(--primary);
 }

 [data-theme="dark"] .menu-toggle {
     background: rgba(255, 255, 255, 0.06);
     border-color: rgba(255, 255, 255, 0.12);
 }

 /* =========================================
   NEXT BUTTON MIN-WIDTH (moved from inline)
   ========================================= */

 #nextBtn {
     min-width: 120px;
 }

 /* =========================================
   POPUP TOAST (answer feedback)
   ========================================= */

 .popup-toast {
     position: fixed;
     bottom: 2rem;
     left: 50%;
     transform: translateX(-50%) translateY(100px);
     z-index: 1002;
     padding: 0.9rem 1.8rem;
     border-radius: 12px;
     font-family: var(--font-head);
     font-weight: 600;
     font-size: 0.95rem;
     color: #fff;
     pointer-events: none;
     opacity: 0;
     transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
     max-width: 90vw;
     text-align: center;
     box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
 }

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

 .popup-toast.popup-correct {
     background: linear-gradient(135deg, #16a34a, #22c55e);
     box-shadow: 0 8px 32px rgba(22, 163, 74, 0.4);
 }

 .popup-toast.popup-wrong {
     background: linear-gradient(135deg, #dc2626, #ef4444);
     box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4);
 }

 .popup-toast.popup-skip {
     background: linear-gradient(135deg, #6b7280, #9ca3af);
     box-shadow: 0 8px 32px rgba(107, 114, 128, 0.4);
 }

 /* =========================================
   MOBILE RESPONSIVENESS — 768px
   ========================================= */

 @media (max-width: 768px) {
     /* --- Navbar --- */
     .navbar {
         padding: 0.6rem 1rem;
     }

     .brand {
         font-size: 1.2rem;
     }

     .glow-brand {
         font-size: 0.7rem;
         padding: 2px 6px;
     }

     .nav-actions {
         gap: 8px;
     }

     .score-badge {
         min-width: auto;
         padding: 5px 10px;
         font-size: 0.8rem;
     }

     /* --- Main Container --- */
     .main-container {
         padding: 0.25rem;
     }

     /* --- Quiz Card --- */
     .quiz-card {
         height: calc(100dvh - 56px);
         max-height: calc(100dvh - 56px);
     }

     /* --- Quiz Scroll Area --- */
     .quiz-scroll-area {
         padding: 1rem;
         gap: 1.25rem;
     }

     /* --- Question --- */
     .quiz-question {
         font-size: 1.15rem;
         line-height: 1.45;
         overflow-wrap: break-word;
         word-break: break-word;
         min-width: 0;
     }

     /* --- Option Buttons --- */
     .option-btn {
         min-height: 48px;
         overflow-wrap: break-word;
         word-break: break-word;
         min-width: 0;
     }

     /* --- Next Button --- */
     #nextBtn {
         min-width: 100px;
     }

     /* --- Department Selection --- */
     .dept-selection-title {
         font-size: 1.4rem;
     }

     .dept-selection-subtitle {
         font-size: 0.9rem;
     }

     #dept-selection > div {
         padding: 1rem !important;
         max-width: 100% !important;
     }

     /* --- Success Overlay --- */
     .success-content {
         padding: 1.5rem 1rem;
     }

     .success-icon {
         width: 60px;
         height: 60px;
         margin-bottom: 1rem;
     }

     .success-icon svg {
         width: 30px;
         height: 30px;
     }

     .success-title {
         font-size: 1.3rem;
     }

     .success-subtitle {
         font-size: 0.9rem;
         margin-bottom: 1.5rem;
     }

     .score-value {
         font-size: 2.5rem;
     }

     .score-max {
         font-size: 1rem;
     }

     .success-score-card {
         padding: 1rem 1.5rem;
     }

     /* --- Error Toast --- */
     .error-toast {
         max-width: 90vw;
     }

     .error-toast-content {
         word-break: break-word;
     }

     /* --- Loading Overlay --- */
     .loading-spinner {
         width: 45px;
         height: 45px;
     }
 }

 /* =========================================
   MOBILE RESPONSIVENESS — 400px (small phones)
   ========================================= */

 @media (max-width: 400px) {
     .navbar {
         padding: 0.75rem 0.75rem;
     }

     .brand {
         font-size: 1.1rem;
         gap: 6px;
     }

     .glow-brand {
         font-size: 0.65rem;
         padding: 2px 5px;
     }

     .nav-actions {
         gap: 6px;
     }

     .score-badge {
         padding: 4px 8px;
         font-size: 0.8rem;
     }

     .quiz-header {
         padding: 0.75rem 1rem;
     }

     .quiz-scroll-area {
         padding: 0.75rem;
         gap: 1rem;
     }

     .quiz-question {
         font-size: 1rem;
     }

     .option-btn {
         padding: 0.8rem;
         font-size: 0.9rem;
     }

     .quiz-footer {
         padding: 0.75rem 1rem;
         min-height: 60px;
         gap: 0.5rem;
     }

     .dept-selection-title {
         font-size: 1.2rem;
     }

     .success-title {
         font-size: 1.1rem;
     }

     .score-value {
         font-size: 2rem;
     }

     #nextBtn {
         min-width: auto;
         padding: 0.6rem 1.2rem;
     }

     .glow-btn {
         padding: 8px 14px;
         font-size: 0.65rem;
     }
 }