/* common.css */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f172a; /* dark background */
  color: #fff;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center; /* Center the main container */
}

.container {
  max-width: 400px;
  width: 100%;
  padding: 20px;
  background-color: #03242e; /* Darker container background */
}

.coin_set {
  color: #facc15; /* gold */
  font-weight: bold;
  font-size: 24px; /* Adjust if needed for different contexts */
}

.start-quiz-btn {
  background-color: #f59e0b; /* Orange glow button */
  color: #000;
  border: none;
  padding: 14px 30px;
  font-size: 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
}

.start-quiz-btn:hover {
  background-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6);
}

/* index.css */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quiz-title {
  font-size: 24px;
  font-weight: bold;
  color: #f8fafc;
}

.score-box {
  font-size: 20px;
  font-weight: 600;
  color: #fbbf24;
}

.question-box {
  background-color: #1e293b;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  text-align: center;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
}

.question-box h3 {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: white;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  border: 2px solid #1e293b;
}

.question-box p {
  font-size: 16px;
  margin-bottom: 20px;
  margin-top: 20px;
}

#options-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option {
  background-color: #0f172a;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-weight: bold;
  text-align: center;
  border: 1px solid #334155;
  color: white;
}

.option:hover {
  background-color: #1e293b;
  transform: scale(1.02);
}

.option.correct {
  background-color: #28a745 !important;
  color: white;
}

.option.wrong {
  background-color: #dc3545 !important;
  color: white;
}

.option.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #1e293b;
  color: #f8fafc;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid #475569;
}

.modal-content button {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #f59e0b;
  color: black;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.fun-fact-box {
  background-color: #475569;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.fun-fact-box strong {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.info-box {
  background-color: transparent;
  text-align: center;
}

.info-box h3 {
  font-size: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid #64748b;
  padding-bottom: 6px;
}

.info-box ul {
  list-style: disc;
  text-align: left;
  padding-left: 20px;
  color: #e2e8f0;
}

.info-box li {
  margin-bottom: 8px;
}

.reward-modal-content {
  background-color: #1e293b;
  color: white;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  position: relative;
  border: 1px solid #475569;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  max-width: 400px;
}

.reward-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.reward-subtitle {
  color: #fbbf24;
  font-size: 16px;
  margin-bottom: 8px;
}

.reward-title {
  font-size: 24px;
  margin: 0;
}

.reward-text {
  color: #94a3b8;
  font-size: 14px;
  margin: 10px 0 20px;
}

.claim-btn {
  background-color: #fbbf24;
  color: black;
  padding: 12px 24px;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.claim-btn:hover {
  background-color: #facc15;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 20px;
  cursor: pointer;
}

.quiz-promo {
  background-color: #334155;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  text-align: left;
  color: #cbd5e1;
}

.quiz-promo h2 {
  color: #facc15;
  margin-bottom: 15px;
  font-size: 18px;
}

.features-list {
  list-style-type: none;
  padding-left: 0;
}

.features-list li {
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}

.features-list li:before {
  content: "•";
  color: #f59e0b;
  font-size: 20px;
  position: absolute;
  left: 0;
  top: -2px;
}

.winner_img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 20px;
  display: block;
}

.result_box {
  background-color: #1e293b;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
  margin-bottom: 30px;
}

.result_box h3 {
  font-size: 22px;
  color: #f8fafc;
  margin-bottom: 10px;
}

/* result.css */
.result_box {
  background-color: #ffffff; /* Light background for result box */
}

.result_box h3 {
  color: #000000; /* Black text for result title */
}

/* game.css */
.tabs-carousel-container {
  background-color: #1e293b;
  border-radius: 8px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  /* padding: 0 30px; Space for buttons */
}

.tabs-list-carousel {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  display: flex;
  white-space: nowrap;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother ease-out */
}

.tab-carousel {
  background-color: transparent;
  color: #e2e8f0;
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  margin: 0 5px;
  cursor: pointer;
  font-size: 0.9em;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease; /* Added transform */
  transform: scale(1);
}

.tab-carousel.active {
  background-color: #facc15;
  color: #0f172a;
  transform: scale(1.05); /* Subtle highlight */
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.3); /* Subtle shadow */
}

.tab-carousel:hover {
  background-color: #334155;
  color: #cbd5e1;
  transform: scale(1.02);
}

.carousel-button {
  background-color: rgba(0, 0, 0, 0.5); /* Darker background */
  color: #fff;
  border: none;
  padding: 10px; /* Slightly larger */
  margin: 0; /* Adjusted margin */
  border-radius: 50%;
  cursor: pointer;
  font-size: 1em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0.8; /* Slightly more visible */
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.carousel-button:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
  left: 5px;
}

.carousel-button.next {
  right: 5px;
}

.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.quiz-item {
  background-color: #1e293b;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-info {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: space-between;
  margin-right: 15px;
}

.category {
  display: flex;
  align-items: center;
}

.category img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 5px;
  background-color: #475569;
}

.category .text p {
  margin: 0 0 5px 0;
  font-size: 0.8em;
  color: #94a3b8;
}

.category .text h3 {
  margin: 0;
  font-size: 1em;
  font-weight: bold;
  color: #f8fafc;
}

.entry-fee {
  display: flex;
  align-items: center;
  font-size: 0.8em;
  color: #facc15;
}

.entry-fee img {
  width: 18px;
  height: 18px;
  margin-right: 5px;
}

.entry-fee span {
  color: #e2e8f0;
  margin-right: 3px;
}

.fee-amount {
  font-weight: bold;
}

.play-button {
  background-color: #facc15;
  color: #0f172a;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.play-button:hover {
  background-color: #f59e0b;
}

.play-button svg {
  width: 20px;
  height: 20px;
}

/* Responsive fixes for mobile */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 16px;
  }

  .quiz-title {
    font-size: 20px;
  }

  .score-box {
    font-size: 18px;
  }

  .question-box p {
    font-size: 14px;
  }

  .question-box h3 {
    font-size: 12px;
    padding: 4px 12px;
  }

  #options-container {
    grid-template-columns: 1fr;
  }

  .option {
    font-size: 14px;
    padding: 10px;
  }

  .start-quiz-btn {
    font-size: 14px;
    padding: 12px 20px;
  }

  .reward-modal-content {
    padding: 20px;
  }

  .reward-title {
    font-size: 20px;
  }

  .reward-subtitle {
    font-size: 14px;
  }

  .carousel-button {
    padding: 8px;
    font-size: 0.9em;
  }

  .quiz-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .quiz-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-right: 0;
  }

  .category {
    flex-direction: row;
    align-items: center;
  }

  .entry-fee {
    font-size: 0.75em;
  }

  .play-button {
    width: 36px;
    height: 36px;
  }

  .play-button svg {
    width: 18px;
    height: 18px;
  }

  .fun-fact-box {
    padding: 12px;
    font-size: 14px;
  }

  .modal-content,
  .reward-modal-content {
    width: 90%;
  }

  .info-box h3 {
    font-size: 16px;
  }

  .features-list li {
    font-size: 13px;
  }
}
