:root {
  --bg: #0c0a15;
  --text: #f0e6d2;
  --accent: #d4a574;
  --correct: #6effb5;
  --incorrect: #ff8888;
  --track-bg: #2a253d;
  --glow-color: #ff9e6d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg) url("../assets/chap8bg.webp") no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", serif;
  line-height: 1.6;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-toggle-button {
    position: fixed;
    top: 20px;
    right:-15px;
    z-index: 1000;
    background-color: transparent; 
    color: transparent; 
    font-size: 0;
    width: 100px;
    height: 50px;
    border: none;
    border-radius: 5px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.nav-toggle-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nav-toggle-button:hover {
    transform: scale(1.05);
}

.nav-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(30, 30, 30, 0.5); 
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1); 
    z-index: 999;
    transform: translateX(300px); 
    transition: transform 0.4s ease-in-out;
    padding-top: 80px; /* Space for the top toggle button */
}

/* State to show the menu */
.nav-wrapper.open {
    transform: translateX(0); 
}

.bookmark {
    width: 100%;
    padding: 10px 15px; 
    border-radius: 4px;
    text-align: left;
    display: block; 
    text-decoration: none; 
    color: #ffcc70; 
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Create the Bullet Point (using pseudo-element) */
.bookmark span::before {
    content: '�'; /* The bullet character */
    color: #ffcc70; /* Bullet color */
    font-size: 1.2em;
    margin-right: 15px; /* Space between bullet and text */
    display: inline-block;
    width: 15px; /* Give it a fixed width for alignment */
}

.bookmark:hover {
    background-color: rgba(255, 204, 112, 0.25);
    transform: scale(1.05);
}

.bookmark span {
    opacity: 1; 
    color: #f7e2b3;
    font-weight: normal;
    font-size: 13px;
    display: inline; 
}


.screen {
  display: none;
  text-align: center;
  max-width: 700px;
  width: 100%;
}

.active {
  display: block;
}

h1 {
  font-size: 28px;
  margin: 20px 0;
  color: var(--accent);
}

input {
  padding: 12px;
  width: 80%;
  max-width: 300px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #1a1726;
  color: white;
  font-size: 16px;
  margin: 20px 0;
}

button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 30px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  margin: 15px 0;
}

button:hover {
  background: #e8b88a;
}

.music-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 24px;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
}

.music-btn:hover {
  transform: scale(1.1);
}

.music-btn img {
  display: block;
  width: 24px;
  height: 24px;
}

/* ✨ Heroic Progress Track */
.progress-track {
  width: 100%;
  max-width: 500px;
  height: 6px;
  background: var(--track-bg);
  border-radius: 3px;
  margin: 40px auto;
  position: relative;
  overflow: visible;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--glow-color);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
  z-index: 1;
}

.progress-glow {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, var(--glow-color), transparent 70%);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 158, 109, 0.8);
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
              width 0.4s, height 0.4s;
  z-index: 2;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 158, 109, 0.8),
                0 0 30px rgba(255, 158, 109, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 158, 109, 1),
                0 0 40px rgba(255, 158, 109, 0.6);
  }
}

/* Quiz */
.question {
  font-size: 20px;
  margin: 25px 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.option {
  padding: 14px;
  background: #1e1b2e;
  border: 2px solid #3a3650;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.option:hover {
  border-color: var(--accent);
}

.option.selected {
  border-color: var(--accent);
  background: #2a273e;
}

.option.correct {
  background: rgba(110, 255, 181, 0.15) !important;
  border-color: var(--correct) !important;
}

.option.incorrect {
  background: rgba(255, 136, 136, 0.15) !important;
  border-color: var(--incorrect) !important;
}

#resultsScreen .badge-img {
  width: 400px;       
  height: auto;       
  margin: 20px 0;
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* 🏆 Dashboard Screen */
#dashboardScreen {
  min-height: 500px;
  background-color: var(--bg);
  padding: 30px !important;
}

#dashboardScreen h1 {
  color: #e8d0a9;
  margin-bottom: 10px;
}

#dashboardScreen p {
  color: #d4c1a8;
  margin-bottom: 25px;
  font-style: italic;
}

/* 🧹 Clear History Button */
#clearHistoryBtn {
  background: #c0392b;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#clearHistoryBtn:hover {
  background: #e74c3c;
  transform: translateY(-2px);
}

/* 🏅 Badge Board */
.badge-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin: 20px auto;
  max-width: 1200px;
  padding: 25px;
  overflow: visible;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
� � width: 120px;
� � height: 170px; /* **INCREASED HEIGHT** */
� � background: rgba(3, 25, 45, 0.4);
� � border-radius: 12px;
� � padding: 16px 10px 10px; /* **ADJUSTED PADDING** */
� � box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
� � border: 1px solid rgba(100, 90, 120, 0.3);
� � overflow: visible;
� � transition: transform 0.3s ease;
}

.badge-item:hover {
  transform: translateY(-5px);
}

/* Pin effect */
.badge-item::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #c24d2f;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.badge-item img {
  width: 75px;
  height: 75px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.badge-item:hover img {
  transform: scale(1.15) translateY(-6px);
  filter: drop-shadow(0 6px 12px rgba(255, 158, 109, 0.6));
}

.badge-item .hero-name {
  margin-top: 12px;
  font-size: 15px;
  color: #f0e6d2;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* New styles for Score and Date */
.hero-score-date {
� � margin-top: 8px;
� � text-align: center;
� � font-size: 11px;
� � line-height: 1.3;
� � color: #c0b89a; /* Softer text color for details */
}

.score-text {
� � font-weight: bold;
� � color: #ffebcc; /* Highlight the score */
}

.date-text {
� � font-style: italic;
}

/* Dashboard Buttons */
#dashboardScreen button:not(#clearHistoryBtn) {
  background: #8b5e3c;
  color: #f8f0e0;
  border: 2px solid #6b4a2e;
  padding: 10px 24px;
  font-size: 17px;
  border-radius: 8px;
  margin-top: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

#dashboardScreen button:not(#clearHistoryBtn):hover {
  background: #9c6b47;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 600px) {
  .badge-board {
    gap: 16px;
  }
  .badge-item {
    width: 90px;
    padding: 14px 10px 40px;
  }
  .badge-item img {
    width: 60px;
    height: 60px;
  }
}