:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #ede9fe;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
  
    /* Light mode specific variables */
    --background: #ffffff;
    --card-background: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-hover: rgba(0, 0, 0, 0.15);
  }
  
  .dark {
    --background: #111827;
    --card-background: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-color-hover: rgba(0, 0, 0, 0.4);
  }
  
  html,
  body {
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
  }
  
  body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
      "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  /* Sửa đổi: Loại bỏ việc ngăn cuộn trang khi ở trang chủ */
  /* body.home-active {
      overflow: hidden;
  } */
  
  /* Custom animations */
  @keyframes float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  @keyframes gradientFlow {
    0% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0% 50%;
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes slideIn {
    from {
      transform: translateY(-50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes slideInRight {
    from {
      transform: translateX(50px);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes slideInLeft {
    from {
      transform: translateX(-50px);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  @keyframes pulse {
    0%,
    100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
  }
  
  @keyframes bounce {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  .float-animation {
    animation: float 3s ease-in-out infinite;
  }
  
  .pulse-animation {
    animation: pulse 2s ease-in-out infinite;
  }
  
  .bounce-animation {
    animation: bounce 2s ease-in-out infinite;
  }
  
  .gradient-flow {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary-dark));
    background-size: 300% 300%;
    animation: gradientFlow 12s ease infinite;
  }
  
  .fade-in {
    animation: fadeIn 1s ease-in-out;
  }
  
  .slide-in {
    animation: slideIn 0.5s ease-in-out;
  }
  
  .slide-in-right {
    animation: slideInRight 0.5s ease-in-out;
  }
  
  .slide-in-left {
    animation: slideInLeft 0.5s ease-in-out;
  }
  
  /* Glass effect */
  .glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }
  
  .dark .glass {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
  
  /* Nav-specific styles */
  .nav-item {
    position: relative;
    padding: 8px 16px;
    border-radius: 9999px;
    transition: all 0.3s ease;
  }
  
  .nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }
  
  /* Improved hamburger button */
  .hamburger-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
  }
  
  .hamburger-btn:active {
    transform: scale(0.95);
  }
  
  .hamburger-btn i {
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
  }
  
  /* Mobile Menu Animation */
  #mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
  }
  
  #mobileMenu.active {
    display: block;
    max-height: 200px;
  }
  
  /* Question Navigation Styles */
  .question-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border-radius: 50%;
    font-weight: bold;
    color: #4b5563;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
  }
  
  .dark .question-nav-btn {
    background-color: #374151;
    color: #e5e7eb;
  }
  
  .question-nav-btn:hover {
    background-color: #e5e7eb;
    transform: scale(1.1);
    box-shadow: 0 4px 8px var(--shadow-color-hover);
  }
  
  .dark .question-nav-btn:hover {
    background-color: #4b5563;
  }
  
  .question-nav-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
  }
  
  .question-nav-btn.answered {
    background-color: #bbf7d0;
    color: #166534;
    box-shadow: 0 2px 4px rgba(22, 101, 52, 0.2);
  }
  
  .dark .question-nav-btn.answered {
    background-color: #065f46;
    color: #d1fae5;
    box-shadow: 0 2px 4px rgba(6, 95, 70, 0.3);
  }
  
  /* Button Styles */
  .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow-color);
  }
  
  .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--shadow-color-hover);
  }
  
  .prev-btn {
    background-color: #f3f4f6;
    color: #374151;
  }
  
  .dark .prev-btn {
    background-color: #374151;
    color: #f3f4f6;
  }
  
  .prev-btn:hover {
    background-color: #e5e7eb;
  }
  
  .dark .prev-btn:hover {
    background-color: #4b5563;
  }
  
  .next-btn {
    background-color: var(--primary);
    color: white;
  }
  
  .next-btn:hover {
    background-color: var(--primary-dark);
  }
  
  .next-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  
  .dark .next-btn:disabled {
    background-color: #4b5563;
  }
  
  .reset-btn {
    background-color: var(--danger);
    color: white;
  }
  
  .reset-btn:hover {
    background-color: #dc2626;
  }
  
  .back-btn {
    background-color: #6b7280;
    color: white;
  }
  
  .back-btn:hover {
    background-color: #4b5563;
  }
  
  /* Custom Modal Styles */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .modal-content {
    background: var(--card-background);
    padding: 32px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color);
    animation: slideIn 0.3s ease-in-out;
  }
  
  .modal-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 16px;
  }
  
  .modal-message {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1.1rem;
  }
  
  .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
  }
  
  .modal-btn {
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .modal-btn.confirm {
    background-color: var(--primary);
    color: white;
  }
  
  .modal-btn.confirm:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
  }
  
  .modal-btn.cancel {
    background-color: var(--danger);
    color: white;
  }
  
  .modal-btn.cancel:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
  }
  
  /* Quiz card styles */
  .quiz-card {
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    background-color: var(--card-background);
  }
  
  .quiz-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px var(--shadow-color-hover), 0 10px 10px -5px var(--shadow-color-hover);
  }
  
  .quiz-card-header {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  
  .quiz-card-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
  }
  
  .quiz-card-icon {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .quiz-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--warning);
    color: white;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .quiz-card-body {
    padding: 20px;
  }
  
  .quiz-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
  }
  
  .quiz-card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .quiz-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
  }
  
  .quiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color-hover);
  }
  
  .quiz-btn-normal {
    background-color: var(--primary);
    color: white;
  }
  
  .quiz-btn-normal:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.5);
  }
  
  .quiz-btn-random {
    background-color: var(--accent);
    color: white;
  }
  
  .quiz-btn-random:hover {
    background-color: #0891b2;
    box-shadow: 0 4px 6px -1px rgba(6, 182, 212, 0.5);
  }
  
  .quiz-btn-reset {
    background-color: var(--danger);
    color: white;
  }
  
  .quiz-btn-reset:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.5);
  }
  
  /* Option styles */
  .option-card {
    padding: 16px;
    border-radius: 12px;
    background-color: #f9fafb;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px var(--shadow-color);
    color: #1f2937;
  }
  
  .dark .option-card {
    background-color: #374151;
    color: #f3f4f6;
  }
  
  .option-card:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color-hover);
  }
  
  .dark .option-card:hover {
    background-color: #4b5563;
  }
  
  .option-card.selected {
    background-color: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3);
    color: #4b5563;
  }
  
  .dark .option-card.selected {
    background-color: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: #f3f4f6;
  }
  
  .option-card.selected::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary);
  }
  
  /* Progress bar */
  .progress-container {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: inset 0 1px 2px var(--shadow-color);
  }
  
  .dark .progress-container {
    background-color: #374151;
  }
  
  .progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
  }
  
  /* Timer display */
  .timer-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f3f4f6;
    border-radius: 9999px;
    font-weight: 600;
    color: #4b5563;
    box-shadow: 0 2px 4px var(--shadow-color);
  }
  
  .dark .timer-display {
    background-color: #374151;
    color: #e5e7eb;
  }
  
  /* Result styles */
  .result-container {
    background-color: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px var(--shadow-color), 0 10px 10px -5px var(--shadow-color);
    padding: 32px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .result-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
  }
  
  .result-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
  }
  
  .result-score {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
  }
  
  .result-time {
    font-size: 1.1rem;
    color: var(--text-muted);
  }
  
  .wrong-answer-item {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px var(--shadow-color);
  }
  
  .dark .wrong-answer-item {
    background-color: #374151;
  }
  
  .wrong-answer-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
  }
  
  .wrong-answer-user {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
  }
  
  .dark .wrong-answer-user {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
  }
  
  .wrong-answer-correct {
    background-color: #dcfce7;
    color: #166534;
    padding: 10px 16px;
    border-radius: 8px;
  }
  
  .dark .wrong-answer-correct {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
  }
  
  .result-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
  }
  
  .result-btn {
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
  }
  
  .result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px var(--shadow-color-hover);
  }
  
  .result-btn-restart {
    background-color: var(--primary);
    color: white;
  }
  
  .result-btn-restart:hover {
    background-color: var(--primary-dark);
  }
  
  .result-btn-review {
    background-color: var(--accent);
    color: white;
  }
  
  .result-btn-review:hover {
    background-color: #0891b2;
  }
  
  .result-btn-home {
    background-color: #6b7280;
    color: white;
  }
  
  .result-btn-home:hover {
    background-color: #4b5563;
  }
  
  /* Home container styles */
  .home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 32px; /* Thêm padding-top để tránh bị che bởi header */
    text-align: center;
    position: relative;
  }
  
  .home-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    z-index: -1;
  }
  
  .dark .home-background {
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  }
  
  .home-icon {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 24px;
    text-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
  }
  
  .home-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    background: linear-gradient(45deg, #6366f1, #8b5cf6, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 300% 300%;
    animation: gradientFlow 6s ease infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .home-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
  }
  
  .home-btn {
    padding: 14px 32px;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
  }
  
  .home-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(139, 92, 246, 0.4);
  }
  
  /* Floating particles */
  .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
  }
  
  .particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation-name: float-particle;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  
  @keyframes float-particle {
    0% {
      transform: translateY(0) rotate(0deg);
    }
    100% {
      transform: translateY(-100vh) rotate(360deg);
    }
  }
  
  /* Dark mode toggle */
  .theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  }
  
  .theme-toggle i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
  }
  
  /* Confetti animation for correct answers */
  .confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
  }
  
  .confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
  }
  
  /* Tooltip styles */
  .tooltip {
    position: relative;
    display: inline-block;
  }
  
  .tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
  }
  
  /* Loading spinner */
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
  }
  
  .dark .loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* Accessibility improvements */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
  
  /* Focus styles for better accessibility */
  :focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
  }
  
  /* Animations for quiz transitions */
  .quiz-transition {
    transition: all 0.5s ease;
  }
  
  .quiz-transition.hidden {
    opacity: 0;
    transform: translateY(20px);
  }
  
  /* Light mode specific enhancements */
  .feature-card {
    background-color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }
  
  .dark .feature-card {
    background-color: #1f2937;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }
  
  .dark .feature-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }
  
  /* Responsive improvements */
  @media (max-width: 640px) {
    .home-title {
      font-size: 2rem;
    }
  
    .home-description {
      font-size: 1rem;
    }
  
    .modal-content {
      padding: 24px;
    }
  
    .result-title {
      font-size: 1.5rem;
    }
  
    .result-buttons {
      flex-direction: column;
      align-items: center;
    }
  
    .result-btn {
      width: 100%;
      justify-content: center;
    }
  }
  
  /* Fix for light mode text visibility */
  .header-nav {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary-dark));
    background-size: 300% 300%;
    animation: gradientFlow 12s ease infinite;
  }
  
  .mobile-menu-link {
    color: #1f2937;
    font-weight: 600;
  }
  
  .dark .mobile-menu-link {
    color: white;
  }
  
  .feature-card-text {
    color: #1f2937;
  }
  
  .dark .feature-card-text {
    color: white;
  }
  
  .feature-card-subtext {
    color: #4b5563;
  }
  
  .dark .feature-card-subtext {
    color: #d1d5db;
  }
  
  /* Fix for quiz list text colors */
  .quiz-card-description {
    color: #4b5563;
  }
  
  .dark .quiz-card-description {
    color: #d1d5db;
  }
  
  .quiz-card-info {
    color: #6b7280;
  }
  
  .dark .quiz-card-info {
    color: #9ca3af;
  }
  
  /* Fix for question text in light mode */
  .question-text {
    color: #1f2937;
  }
  
  .dark .question-text {
    color: #f9fafb;
  }
  
  /* Fix for quiz description text in light mode */
  .quiz-description {
    color: #4b5563;
  }
  
  .dark .quiz-description {
    color: #d1d5db;
  }
  
  /* Stats card styles */
  .stats-card {
    background-color: var(--card-background);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    transition: all 0.3s ease;
  }
  
  .stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px var(--shadow-color-hover), 0 10px 10px -5px var(--shadow-color-hover);
  }
  
  .stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
  }
  
  .stats-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
  }
  
  .stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  
  .stats-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    margin-top: 8px;
  }
  
  .stats-trend.up {
    color: var(--success);
  }
  
  .stats-trend.down {
    color: var(--danger);
  }
  
  /* Chart container */
  .chart-container {
    background-color: var(--card-background);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    margin-top: 24px;
  }
  
  .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }
  
  .chart-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  
  .chart-legend {
    display: flex;
    gap: 16px;
  }
  
  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
  }
  
  .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }
  
  /* Responsive navbar improvements */
  @media (max-width: 768px) {
    .header-nav .container {
      padding-left: 1rem;
      padding-right: 1rem;
    }
  }
  
  /* Ensure icons maintain proper size */
  .nav-item i {
    flex-shrink: 0;
  }
  
  /* Prevent text from wrapping in navbar */
  .nav-item {
    white-space: nowrap;
  }
  
  