body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: #111;
  text-align: center;
}

.header {
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 2px solid #e5e5e5;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 8px;
  }

  .header h1 {
    font-size: 24px;
    margin: 5px 0;
  }

  .home-link {
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }
}

.header .logo {
  width: 77px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.home-link,
.home-link:visited {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.level-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 15px;
}

@media (max-width: 480px) {
  .level-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }
}

.level-card {
  background: white;
  border-radius: 10px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.level-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.level-card img {
  width: 100%;
  max-width: 491px;
  height: 224px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px 10px 0 0;
  display: block;
}

.level-card h2 {
  margin: 10px 0 6px;
  font-size: 19px;
}

.chars {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 8px auto 0;
}

.chars img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.leaderboard-box {
  margin: 40px auto;
  padding: 40px;
  background: #fff;
  border-radius: 14px;
  max-width: 900px;
}

.leaderboard-box h2 {
  color: rgb(59, 130, 246);
}

.leaderboard-btn {
  background: rgb(239, 68, 68);
  color: white;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
}

.leaderboard-btn:hover {
  background: #c62828;
}
.text-blue {
  color: rgb(59, 130, 246);
}

.text-red {
  color: rgb(239, 68, 68);
}
/* ===== FINAL POPUP ===== */
.final-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.final-popup-box {
  background: #fff;
  padding: 25px;
  width: 90%;
  max-width: 420px;
  border-radius: 10px;
  text-align: center;
  animation: pop 0.25s ease-out;
}

.final-popup-box h2 {
  margin-top: 0;
  font-size: 22px;
}

#final-comment {
  width: 100%;
  height: 85px;
  margin: 12px 0;
  padding: 10px;
  font-size: 14px;
  resize: none;
  border-radius: 6px;
  border: 1px solid #aaa;
}

.final-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.final-actions button {
  padding: 10px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 15px;
}

#final-submit-btn {
  background: #3b82f6;
  color: #fff;
}

#final-leaderboard-btn {
  background: #10b981;
  color: #fff;
}

#final-restart-btn {
  background: #ef4444;
  color: #fff;
}

@keyframes pop {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Game Intro Content */
.game-intro {
  max-width: 900px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 14px;
  text-align: left;
  line-height: 1.6;
  color: #333;
}

.game-intro h2 {
  color: #111;
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 24px;
}

.game-intro h2:first-child {
  margin-top: 0;
}

.game-intro p {
  margin-bottom: 20px;
  font-size: 16px;
}

.game-intro ol {
  margin-bottom: 25px;
  padding-left: 25px;
}

.game-intro li {
  margin-bottom: 10px;
  font-size: 16px;
}

.pro-tip {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 30px;
}

.play-now-btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 14px 30px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.play-now-btn:hover {
  background: #1d4ed8;
}

@media (min-width: 600px) {
  .play-now-btn {
    width: auto;
    min-width: 200px;
  }
}

/* FAQ Specifics */
.faq-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.faq-question {
  font-size: 18px;
  color: #000; /* Black as requested */
  font-weight: bold; /* Bold as requested */
  margin: 0;
  padding: 15px 0;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-size: 24px;
  color: #2563eb;
  font-weight: normal;
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  display: none;
  padding-bottom: 15px;
  color: #4b5563;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-section p {
  margin-bottom: 15px;
}

/* Navigation Links */
.nav-links {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 14px;
}
.nav-links a {
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: #ef4444;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .nav-links {
    gap: 10px;
    font-size: 12px;
  }
}

/* Hamburger Menu Logic */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s linear;
}

/* Mobile Nav State */
@media (max-width: 600px) {
  .menu-toggle {
    display: flex; /* Show Burger */
  }

  .nav-links {
    display: none; /* Hide Menu */
    flex-direction: column;
    width: 100%;
    gap: 15px;
    background: #fff;
    padding: 20px 0;
    border-bottom: 2px solid #eee;
  }

  .nav-links.active {
    display: flex; /* Show Menu when Active */
  }
}

/* Footer Navigation Links */
.footer-nav {
  background-color: #f8f8f8;
  border-top: 1px solid #e5e5e5;
  padding: 30px 20px;
  margin-top: 60px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.footer-nav .links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.footer-nav a {
  color: #555;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.footer-nav a:hover {
  color: #ef4444; /* Waldo Red */
  text-decoration: underline;
}

.footer-copyright {
  color: #000;
  font-size: 12px;
  margin-top: 10px;
}
