body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to right, #1e3c72, #2a5298);
  color: #fff;
  text-align: center;
  margin: 0;
  margin-top: 100px;
  padding: 0;
}

/* ✅ Top Bar Buttons Fix */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px ;
  position: fixed;
  width: 100%;
  top: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.top-left {
  display: flex;
  gap: 10px;
}
.top-right {
  display: flex;
  gap: 10px;
  padding-right: 20px;
}

.top-btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.chat-btn { background: #00e6ff; color: #000; }
.sound-btn { background: linear-gradient(to right, #0072ff, #00c6ff); color: #fff; }
.logout-btn { background: #ff4d4d; color: #fff; margin-left: 10px; }

.top-btn:hover {
  transform: scale(1.05);
}

/* Score Container */
#score-container-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1opx;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-top: 70px;
  flex-wrap: wrap;
}

#timer {
  color: #ffeb3b;
}

/* ✅ Mobile Fix */
@media (max-width: 600px) {
  .top-bar {
    flex-direction: horizontal;
    align-items: center;
    gap: 10px;
  }
  .top-left, .top-right {
    flex-direction: horizontal;
    align-items: center;
    width: 80%;
    padding-left: 25px;
    justify-content: space-between;
  }
  .top-right {
    justify-content: flex-end;
    padding-right: 10px;
    flex-direction: horizontal;
    padding-left: 30px;
  }
  .top-btn {
    width: 90%;
    max-width: 100px;
  }
  #score-container-top {
    flex-direction: horizontal;
    justify-content: space-between;
    gap: 10px;
    margin-top: 120px;
  }
  .title {
    font-size: 24px;
  }
  .main-wrapper {
    margin-top: 0;
  }
  .top-left {
    width: 100%;
    justify-content: space-between;
  }
}


/* ✅ Game Mode Selection */
#game-mode-selection {
  margin: 30px auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

#game-mode-selection h2 {
  color: #f1c40f;
  font-size: 24px;
}

#game-mode-selection button {
  display: block;
  width: 90%;
  max-width: 250px;
  margin: 10px auto;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  background: #ff9800;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#game-mode-selection button:hover {
  background: #e67e22;
  transform: scale(1.05);
}

/* ✅ Quiz Container */
.quiz-container {
  width: 60%;
  background: rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  margin: 50px auto;
  transition: transform 0.3s ease-in-out;
  animation: fadeIn 1s ease-in;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quiz-container:hover {
  transform: scale(1.02);
}

#quiz-image {
  max-width: 90%;
  margin: 15px auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

#quiz-image:hover {
  transform: scale(1.05);
  cursor: zoom-in;
}

/* ✅ Fade-In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ✅ Question Styling */
#question-container {
  font-size: 22px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  width: 90%;
  text-align: center;
  font-weight: bold;
  min-height: 80px;
}

/* ✅ Answer Buttons */
.quiz-option {
  display: block;
  width: 90%;
  padding: 14px;
  margin: 10px auto;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #3498db;
  color: white;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.quiz-option:hover {
  background: #2980b9;
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
}

.quiz-option.correct {
  background-color: #27ae60 !important;
  animation: correctAnswer 0.5s ease-in-out;
}

.quiz-option.incorrect {
  background-color: #c0392b !important;
  animation: wrongAnswer 0.5s ease-in-out;
}

/* ✅ Correct & Incorrect Answer Animations */
@keyframes correctAnswer {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@keyframes wrongAnswer {
  from { transform: scale(1); }
  to { transform: scale(0.95); }
}

/* ✅ AI-Generated Image & Video */
.quiz-image, .quiz-video, #quiz-iframe {
  width: 90%;
  max-width: 500px;
  height: auto;
  margin: 15px 0;
  border-radius: 12px;
  display: block;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease-in-out;
}

.quiz-image:hover, .quiz-video:hover, #quiz-iframe:hover {
  transform: scale(1.05);
}

/* ✅ AI Hints */
#hint-container {
  font-size: 16px;
  padding: 10px;
  background: rgba(241, 196, 15, 0.8);
  color: #000;
  border-radius: 8px;
  margin-top: 15px;
  width: 90%;
  text-align: center;
  font-weight: bold;
  display: none;
}

/* ✅ Score & Lives */
#score-container {
  font-size: 18px;
  margin-top: 20px;
  font-weight: bold;
  color: #f1c40f;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-around;
  width: 90%;
}

#score, #lives {
  font-size: 22px;
}

/* ✅ Improved Button Styles */
button {
  background: #f39c12;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
  width: 90%;
  max-width: 250px;
  text-align: center;
}

button:hover {
  background: #e67e22;
}

/* ✅ Mobile-Friendly Adjustments */
@media (max-width: 768px) {
  .quiz-container {
    width: 95%;
    margin: 30px auto;
  }

  .quiz-option, button {
    width: 100%;
    font-size: 16px;
  }

  #game-mode-selection {
    width: 95%;
  }

  #question-container {
    font-size: 18px;
  }

  .quiz-image, .quiz-video, #quiz-iframe {
    max-width: 100%;
  }

  #score-container {
    flex-direction: column;
    gap: 5px;
  }
}


  
