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

body {
  font-family: "M PLUS Rounded 1c", "Comic Sans MS", cursive, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  background-color: #f8f3e6;
}

/* Add a subtle texture overlay to the background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Push to back */
  pointer-events: none; /* Prevent blocking clicks */
}

/* Navigation Styles */
.main-nav {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  width: 100%;
  margin-bottom: 2rem;
  position: relative;
  z-index: 50; /* Lower than game elements */
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #557153;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  color: #557153;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #94b49f;
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.9);
  border-top: 3px solid rgba(85, 113, 83, 0.2);
  padding: 2rem;
  margin-top: auto;
  position: relative;
  text-align: center;
  color: #666;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(85, 113, 83, 0.2),
    transparent
  );
}

/* Game Styles */
.cheerleader {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 300px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cheerleader.active {
  opacity: 1;
}

.cheer-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}

.frame1 {
  animation: cheer 1s infinite;
}

.frame2 {
  animation: cheer 1s infinite 0.5s;
}

@keyframes cheer {
  0%,
  49% {
    opacity: 0;
  }
  50%,
  100% {
    opacity: 1;
  }
}

.game-container {
  max-width: 650px;
  margin: 20px auto;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
  z-index: 10;
}

.progress-box {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  min-height: 60px;
  border: 3px dashed #dee2e6;
}

#collected-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Style for collected letters */
.collected-letter {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2.5px solid;
  border-radius: 6px;
  font-size: 2.2rem;
  font-weight: bold;
  color: #2d3a3a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Add different border colors for letters */
.collected-letter:nth-child(5n + 1) {
  border-color: #ff6b6b;
} /* Red */
.collected-letter:nth-child(5n + 2) {
  border-color: #4ecdc4;
} /* Blue */
.collected-letter:nth-child(5n + 3) {
  border-color: #ffd93d;
} /* Yellow */
.collected-letter:nth-child(5n + 4) {
  border-color: #95e1d3;
} /* Mint */
.collected-letter:nth-child(5n) {
  border-color: #ff8b94;
} /* Pink */

/* Add a slight tilt animation on hover */
.collected-letter:hover {
  transform: rotate(5deg);
  transition: transform 0.2s ease;
}

.game-area {
  margin-bottom: 2rem;
}

.prompt {
  margin-bottom: 1.5rem;
}

.prompt p {
  font-size: 1.2rem;
  color: #495057;
  margin-bottom: 1rem;
}

.options {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
  position: relative;
  z-index: 20; /* Higher than container */
}

.option {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: linear-gradient(145deg, #cee5d0, #94b49f);
  font-size: 3.5rem;
  font-weight: bold;
  color: #2d3a3a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 25; /* Higher than options container */
}

.option:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.option:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #94b49f;
}

.option.correct {
  background: linear-gradient(145deg, #557153, #3a4d39);
  border-color: #3a4d39;
  color: white;
}

.option.incorrect {
  background: linear-gradient(145deg, #ff8b94, #ff6b6b);
  border-color: #ff6b6b;
  color: white;
  animation: shake 0.3s;
}

.celebration {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 100; /* Only higher when active */
}

.celebration h2 {
  color: #4a90e2;
  margin-bottom: 1rem;
}

.celebration button {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
}

@media (max-width: 1200px) {
  .cheerleader {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .features {
    padding: 2rem 1rem;
  }

  .feature {
    margin-bottom: 1.5rem;
  }

  .game-container {
    margin: 10px;
    padding: 1.5rem;
  }

  .option {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }

  .options {
    gap: 1rem;
  }

  .collected-letter {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
  }

  #collected-letters {
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .game-container {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

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

/* Add styles for feedback messages */
.feedback-message {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  animation: fadeUp 0.8s ease-out;
  color: #557153;
  font-family: "M PLUS Rounded 1c", sans-serif;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Language Toggle Button */
.lang-toggle {
  background: none;
  border: 2px solid #557153;
  color: #557153;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  transition: all 0.2s;
}

.lang-toggle:hover {
  background: #557153;
  color: white;
}

.lang-icon {
  font-size: 0.9em;
}

/* Ensure the nav-content can accommodate the new button */

@media (max-width: 768px) {
  .nav-content {
    flex-direction: column;
    padding: 1rem;
  }

  .lang-toggle {
    margin-top: 1rem;
  }
}

/* Update icon styles */
.feature h2 i {
  color: #557153;
  margin-right: 0.5rem;
  font-size: 1.5em;
}

/* Update language toggle button */
.lang-toggle i {
  font-size: 1.2em;
}

/* Update collected letters animation */
.collected-letter i {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 0.8rem;
  color: #557153;
  animation: wiggle 2s ease-in-out infinite;
}

/* Update celebration styles */
.celebration i {
  color: #557153;
  margin: 0 0.3rem;
}

/* Construction Page Styles */
.construction-container {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-top: 60px; /* Account for fixed nav */
}

.construction-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
}

.construction-icon {
  font-size: 4rem;
  color: #557153;
  margin-bottom: 1.5rem;
  animation: bounce 2s infinite;
}

.construction-content h1 {
  color: #557153;
  margin-bottom: 1rem;
  font-family: "M PLUS Rounded 1c", sans-serif;
}

.construction-content p {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #557153;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #445d48;
  transform: translateY(-2px);
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Faster shake animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Add these styles for the modals */
.game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100; /* Only higher when active */
  align-items: center;
  justify-content: center;
}

.game-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h2 {
  color: #557153;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.modal-content p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.modal-content .score {
  font-size: 1.5rem;
  color: #557153;
  font-weight: bold;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.modal-button {
  background: #557153;
  color: white;
}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.modal-button.secondary {
  background: #e9ecef;
  color: #495057;
}

.modal-button i {
  font-size: 0.9em;
}

/* Add these new styles for the homepage */
.top-banner {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(238, 238, 238, 0.5);
}

.title-section {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 10px;
  backdrop-filter: blur(5px);
}

/* Add this new style for the title text container */
.title-section h1 {
  margin: 0;
  font-size: 2.5rem;
  background-color: #557153; /* Using your theme's green color */
  display: inline-block; /* Makes background only as wide as the text */
  padding: 0.5rem 2rem;
  border-radius: 5px;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 3rem;
  margin-bottom: 4rem;
}

.sidebar {
  flex: 0 0 300px;
}

.profile-box {
  border: 3px solid #557153;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-box img {
  width: 100%;
  height: auto;
  display: block;
}

.links-box {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.links-box h2 {
  margin: 0 0 1rem 0;
  color: #333;
}

.link {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.link.youtube {
  color: #ff0000;
}

.link.quizlet {
  color: #4257b2;
}

.content {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 1rem;
}

.content h3 {
  color: #666;
  margin-bottom: 1rem;
}

.content p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    flex: none;
  }
}

.banner {
  width: 100%;
  height: 200px;
  background-image: url("../images/yo2.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
}

.banner-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(47, 79, 47, 0.9);
  padding: 1rem 2rem;
  border-radius: 10px;
  text-align: center;
  color: white;
}

.banner-content h1 {
  margin: 0;
  font-size: 2rem;
}

.banner-content p {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}

.title-section {
  background: #557153;
  color: white;
  text-align: center;
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 10px;
  margin-inline: auto;
}

.title-section h2 {
  margin: 0;
  font-size: 2rem;
}

.sidebar {
  flex: 0 0 300px;
}

.profile-box {
  border: 3px solid #557153;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  background: white;
}

.profile-box img {
  width: 100%;
  height: auto;
  display: block;
}

.links-box {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.links-box h2 {
  margin: 0 0 1rem 0;
  color: #333;
}

.link {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
}

.link.youtube {
  color: #ff0000;
}

.link.quizlet {
  color: #4257b2;
}

.content {
  flex: 1;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 1rem;
}

.content h3 {
  color: #666;
  margin-bottom: 1rem;
}

.content p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    flex: none;
  }
}

/* Add styles for the translation button */
.translate-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  z-index: 90; /* Lower than modals */
}

.translate-btn:hover {
  transform: translateY(-2px);
}

/* High Scores */
.high-scores-container {
  margin-top: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
}

#high-scores {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

#high-scores li {
  padding: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  font-size: 1.1rem;
}
