/* Base Light Mode (default) */
body.light-mode {
  background-color: #f9f9f9;
  color: #111;
}

body.light-mode .mcq-heading {
  color: #222;
}
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}
body.light-mode .mcq-container {
  background-color: #fff;
  border-color: #ddd;
}
html {
  scroll-behavior: smooth;
}
body.light-mode .question-number {
  background-color: #2196F3;
  color: white;
}

body.light-mode .option {
  background-color: #f0f0f0;
  color: #000;
  border-color: #aaa;
}

body.light-mode .option:hover {
  background-color: #e0e0e0;
  border-color: #888;
}

body.light-mode .option.correct {
  background-color: #c8e6c9;
  border-color: green;
}

body.light-mode .option.wrong {
  background-color: #ffcdd2;
  border-color: rgb(253, 252, 252);
}

body.light-mode .explanation {
  background-color: #eee;
  color: #333;
  border-left-color: #999;
}

body.light-mode .sidebar-btn {
  background-color: #ddd;
  color: #111;
}

body.light-mode .sidebar-btn:hover {
  background-color: #ccc;
}

body.light-mode .theme-toggle {
  background-color: #111;
  color: #fff;
}
.theme-toggle {
  position: static; /* Not fixed or sticky */
  margin: 0 0 20px 20px;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  background-color: #333;  /* Dark background for dark mode */
  color: white;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Light mode styling */
body.light-mode .theme-toggle {
  background-color: #f9f9f9; /* Light background */
  color: #111;              /* Dark text */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Hover effect for all modes */
.theme-toggle:hover {
  background-color: #4caf50; /* Green */
  color: white;
  box-shadow: 0 0 8px #4caf50;
}

/* Focus effect */
.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5); /* Green glow */
}

body {
  background-color: rgb(8, 8, 8);
  color: white;
  font-family: Arial, sans-serif;
  padding: 40px;
}
/* Styling for the main heading */
.mcq-heading {
  font-weight: bold;
  text-decoration: underline;
  font-size: 28px;
  text-align: center;
  margin-bottom: 30px;
  color: #49f106; /* Default dark color for light mode */
  transition: color 0.3s ease; /* Smooth transition for color change */
}

/* Dark Mode Specific Heading Styling */
body.dark-mode .mcq-heading {
  color: white; /* Light color for dark mode */
}
.mcq-container {
  margin: 20px auto; /* Adjust container margin */
  padding: 20px; /* Adjust container padding if necessary */
}
h1 {
  margin-bottom: 30px;
  text-align: center;
}

.mcq-container {
  background-color: #111;
  padding: 30px;
  border-radius: 10px;
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
  border: 1px solid #333;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  font-size: 1rem;
}

.question-number {
  background-color: #4CAF50;
  color: black;
  font-weight: bold;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.question-text {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-top: 5px;
}

.options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  background-color: #222;
  color: white;
  padding: 12px 20px;
  border: 2px solid white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  width: 100%;
  max-width: 100%;
}

.option:hover {
  background-color: #333;
  border-color: #ccc;
}

.option.correct {
  background-color: green;
  border-color: green;
}

.option.wrong {
  background-color: red;
  border-color: red;
}

.option.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.explanation {
  color: #ccc;
  font-size: 18px;
  display: none;
  border-left: 3px solid #555;
  padding-left: 20px;
  font-style: italic;
}

.sidebar {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar-btn {
  padding: 10px 15px;
  border: 1px solid #777;
  border-radius: 8px;
  background: #1e1e1e;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s;
}

.sidebar-btn:hover {
  background-color: #333;
}
#category-select {
  background-color: #222;
  color: white;
}
/* Base styling for theme toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 8px;
  background-color: #333;  /* Dark background for button */
  color: white;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  z-index: 1000;
}

/* Dark Mode Button Styling */
body.dark-mode .theme-toggle {
  background-color: #333;
  color: white;
  border-color: #4CAF50;
}

/* Light Mode Button Styling */
body.light-mode .theme-toggle {
  background-color: #f9f9f9;  /* Light background for button */
  color: #111;  /* Dark text for button */
  border-color: #4CAF50;
}

/* Button Hover Effect */
.theme-toggle:hover {
  background-color: #4CAF50;
  color: white;
  border-color: #333;
}

/* Button Focus Effect */
.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3); /* Light green shadow on focus */
}
/* Styling the Category Filter */
.category-filter {
  max-width: 900px;
  margin: 20px auto;
  text-align: center;
  font-size: 1.1rem;
  animation: fadeIn 0.7s ease-in-out; /* Smooth fade-in effect */
  font-family: 'Arial', sans-serif;
}

/* Light Mode Specific Styles for Category Filter */
body.light-mode .category-filter {
  color: #333; /* Dark text for light mode */
}
/* Style for BOTH modes: shared base */
.category-filter select {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 1rem;
  border: 2px solid #4CAF50;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* 🌞 Light Mode */
body.light-mode .category-filter select {
  background: linear-gradient(145deg, #01ff16, #e0e0e0);
  color: #9e0606;  /* ⬅️ Darker text for better readability */
  font-weight: 600;
}


/* 🌙 Dark Mode */
body.dark-mode .category-filter select {
  background: linear-gradient(145deg, #1f1f1f, #2c2c2c);
  color: #eee;
  box-shadow: 2px 2px 12px rgba(0, 255, 0, 0.08);
}

/* Hover for all modes */
.category-filter select:hover {
  background: linear-gradient(145deg, #66bb6a, #4CAF50);
  color: white;
  transform: scale(1.05);
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
}

/* Focus effect */
.category-filter select:focus {
  background: linear-gradient(145deg, #66bb6a, #4CAF50);
  border-color: #66bb6a;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}


/* Hover Effects */
.category-filter select:hover {
  background: linear-gradient(145deg, #66bb6a, #4CAF50);
  color: white;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Focus Effect */
.category-filter select:focus {
  background: linear-gradient(145deg, #66bb6a, #4CAF50);
  border-color: #66bb6a;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
  outline: none;
}

/* Hover Effects */
.category-filter select:hover {
  background: linear-gradient(145deg, #66bb6a, #4CAF50); /* Hover effect with a brighter green */
  color: white;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow on hover */
  transform: scale(1.05); /* Slightly enlarge the dropdown for emphasis */
}

/* Focus Effect */
.category-filter select:focus {
  background: linear-gradient(145deg, #66bb6a, #4CAF50); /* Green background on focus */
  border-color: #66bb6a; /* Brighter border on focus */
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3); /* Green glow for focus */
  outline: none; /* Remove default outline */
}

/* Animation for Filter Appearance */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive styling for smaller screens */
@media (max-width: 600px) {
  .category-filter {
    padding: 0 20px;
  }

  .category-filter select {
    width: 100%;
    font-size: 1.1rem;
  }
}


.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px auto 60px;
  gap: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

.pagination-controls button {
  background: linear-gradient(145deg, #1f1f1f, #2c2c2c);
  color: #aaf2a3;
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow:
    0 0 5px rgba(76, 175, 80, 0.7),
    inset 0 0 5px rgba(76, 175, 80, 0.4);
}

.pagination-controls button:hover:not(:disabled) {
  background: #4caf50;
  color: #111;
  box-shadow:
    0 0 12px #4caf50,
    inset 0 0 8px #a3f2a3;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  border-color: #666;
  color: #777;
  box-shadow: none;
  background: #222;
}

.pagination-controls span {
  color: #4caf50;
  font-weight: 700;
  font-size: 1.1rem;
  min-width: 140px;
  text-align: center;
  user-select: none;
}

/* Light Mode Adjustments */
body.light-mode .pagination-controls button {
  background: linear-gradient(145deg, #e0e0e0, #ffffff);
  color: #2e7d32;
  border-color: #388e3c;
  box-shadow:
    0 0 5px rgba(56, 142, 60, 0.7),
    inset 0 0 5px rgba(56, 142, 60, 0.4);
}

body.light-mode .pagination-controls button:hover:not(:disabled) {
  background: #388e3c;
  color: #e0ffe0;
  box-shadow:
    0 0 12px #388e3c,
    inset 0 0 8px #a3f2a3;
}

body.light-mode .pagination-controls button:disabled {
  background: #f5f5f5;
  border-color: #bbb;
  color: #999;
  box-shadow: none;
}

body.light-mode .pagination-controls span {
  color: #2e7d32;
}
                     























/* 🔄 Loader Wrapper */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-size: 1.2rem;
  font-family: 'Arial', sans-serif;
}

/* 🌐 Spinner Animation */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #4caf50;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Light Mode Loader */
body.light-mode .loader-wrapper {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}







































.score-tracker-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent; /* wrapper itself is transparent */
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.score-tracker {
  max-width: 900px;       /* same as your MCQ container */
  margin: 0 auto;         /* center horizontally */
  background: #050505;
  border-bottom: 2px solid #ffc107;
  padding: 10px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: Arial, sans-serif;
}

.score-tracker p {
  margin: 0;
  font-size: 1rem;
  color: #333;
  white-space: nowrap;
  user-select: none;
}

#reset-score {
  margin-left: auto;
  background: #ff5722;
  color: rgb(10, 10, 10);
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}






















/* Base Light Mode (default) */
body.light-mode {
  background-color: #f9f9f9;
  color: #da0f0f;
}

body.light-mode .mcq-heading {
  color: #222;
}
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}
body.light-mode .mcq-container {
  background-color: #fff;
  border-color: #ddd;
}
html {
  scroll-behavior: smooth;
}
body.light-mode .question-number {
  background-color: #2196F3;
  color: white;
}

body.light-mode .option {
  background-color: #f0f0f0;
  color: #000;
  border-color: #aaa;
}

body.light-mode .option:hover {
  background-color: #e0e0e0;
  border-color: #888;
}

body.light-mode .option.correct {
  background-color: #c8e6c9;
  border-color: green;
}

body.light-mode .option.wrong {
  background-color: #ffcdd2;
  border-color: rgb(253, 252, 252);
}

body.light-mode .explanation {
  background-color: #eee;
  color: #333;
  border-left-color: #999;
}

body.light-mode .sidebar-btn {
  background-color: #ddd;
  color: #111;
}

body.light-mode .sidebar-btn:hover {
  background-color: #ccc;
}

body.light-mode .theme-toggle {
  background-color: #111;
  color: #fff;
}
.theme-toggle {
  position: static;
  margin: 0 0 20px 20px;
  padding: 10px 16px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  background-color: #333;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

body {
  background-color: rgb(8, 8, 8);
  color: white;
  font-family: Arial, sans-serif;
  padding: 40px;
}

/* Stylish Score Tracker Enhancements */
.score-tracker {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(to right, #1c1c1c, #292929);
  color: #eee;
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease-in-out;
}

.score-tracker h3 {
  margin-right: 20px;
  font-size: 1.1rem;
  color: #4caf50;
}

.score-tracker p {
  margin: 0 10px;
  font-weight: 500;
  position: relative;
  padding-left: 25px;
  font-size: 1rem;
}

.score-tracker p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #4caf50;
  animation: pulse 2s infinite;
}

.score-tracker p:nth-child(2)::before {
  background-color: #4caf50;
}
.score-tracker p:nth-child(3)::before {
  background-color: #f44336;
}
.score-tracker p:nth-child(4)::before {
  background-color: #ff9800;
}

#reset-score {
  background-color: #e91e63;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#reset-score:hover {
  background-color: #c2185b;
  box-shadow: 0 0 10px #f06292;
}

/* Light Mode Score Tracker */
body.light-mode .score-tracker {
  background: linear-gradient(to right, #ffffff, #f1f1f1);
  color: #222;
}

body.light-mode .score-tracker h3 {
  color: #388e3c;
}

body.light-mode .score-tracker p::before {
  opacity: 0.8;
}

body.light-mode #reset-score {
  background-color: #ff5722;
  color: white;
}

body.light-mode #reset-score:hover {
  background-color: #e64a19;
  box-shadow: 0 0 8px #ffccbc;
}

/* Animation for fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse effect for score dots */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}
