@import url("https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Poppins:wght@300;400;600;700&display=swap");

/* Flag Game Modal Overlay */
.flag-game-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  overflow-y: auto;
  padding: 10px;
}

.flag-game-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

/* Modal Content Container */
.flag-modal-content {
  background: linear-gradient(
    145deg,
    rgba(46, 125, 50, 0.95),
    rgba(27, 94, 32, 0.95)
  );

  padding: 25px;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 2px solid rgba(144, 238, 144, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  animation: slideUp 0.4s ease;
}

/* Modal Title */
.flag-modal-title {
  font-family: "Fredoka One", cursive;
  color: #90ee90;
  font-size: 2rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modal Description */
.flag-modal-description {
  color: #b8e6b8;
  margin-bottom: 20px;
  line-height: 1.4;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
}

/* Game Info Section */
.flag-game-info {
  margin: 20px 0;
  text-align: left;
}

/* Difficulty Levels - Compact Layout */
.difficulty-level {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 5px 0;
  font-size: 0.9rem;
}

.difficulty-level.locked {
  opacity: 0.6;
}

.difficulty-name {
  color: #90ee90;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
}

.difficulty-stats {
  color: #b8e6b8;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
}

/* Info Boxes - Compact */
.info-box {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid;
}

.info-box.ad-system {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.info-box.game-features {
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
}

/* ✅ NEW: Timer Challenge Info Box */
.info-box.timer-challenge {
  background: rgba(255, 152, 0, 0.1);
  border-color: rgba(255, 152, 0, 0.3);
}

.info-box-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
}

.info-box.ad-system .info-box-title {
  color: #ffd700;
}

.info-box.game-features .info-box-title {
  color: #4caf50;
}

/* ✅ NEW: Timer Challenge Title Color */
.info-box.timer-challenge .info-box-title {
  color: #ff9800;
}

.info-box-content {
  color: #b8e6b8;
  font-size: 0.8rem;
  line-height: 1.3;
  font-family: "Poppins", sans-serif;
}

/* Modal Buttons */
.flag-modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.flag-modal-btn {
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  font-family: "Fredoka One", cursive;
  min-width: 120px;
  color: white;
}

.flag-modal-btn.primary {
  background: linear-gradient(145deg, #4caf50, #45a049);
}

.flag-modal-btn.secondary {
  background: linear-gradient(145deg, #666, #555);
}

.flag-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .flag-modal-content {
    padding: 20px 15px;
    margin: 5px;
    max-width: none;
    width: 95%;
    max-height: 95vh;
  }

  .flag-modal-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
  }

  .flag-modal-description {
    font-size: 0.9rem;
    margin-bottom: 15px;
  }

  .difficulty-level {
    flex-direction: row;
    align-items: flex-start;
    gap: 3px;
    margin-bottom: 8px;
    font-size: 0.85rem;
  }

  .flag-modal-buttons {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .flag-modal-btn {
    width: 100%;
    max-width: 200px;
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .info-box {
    padding: 10px;
    margin-bottom: 12px;
  }

  .info-box-content {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .flag-game-modal {
    padding: 5px;
  }

  .flag-modal-content {
    padding: 15px 12px;
    margin: 0;
    width: 100%;
    max-height: 98vh;
    border-radius: 10px;
  }

  .flag-modal-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .difficulty-name,
  .difficulty-stats {
    font-size: 0.8rem;
  }

  .info-box-title {
    font-size: 0.85rem;
  }

  .info-box-content {
    font-size: 0.7rem;
  }

  .flag-modal-btn {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

/* Scrollbar styling for modal content */
.flag-modal-content::-webkit-scrollbar {
  width: 6px;
}

.flag-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.flag-modal-content::-webkit-scrollbar-thumb {
  background: rgba(144, 238, 144, 0.5);
  border-radius: 3px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .flag-game-modal,
  .flag-modal-content,
  .flag-modal-btn {
    animation: none;
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .flag-modal-content {
    background: #ffffff;
    color: #000000;
    border: 3px solid #000000;
  }

  .flag-modal-title,
  .difficulty-name,
  .info-box-title {
    color: #000000;
  }

  .flag-modal-description,
  .difficulty-stats,
  .info-box-content {
    color: #333333;
  }
}

/* ✅ NEW: Streak System Info Box */
.info-box.streak-system {
  background: rgba(255, 107, 53, 0.15);
  border-color: rgba(255, 107, 53, 0.4);
  border-width: 2px;
}

.info-box.streak-system .info-box-title {
  color: #ff6b35;
  font-size: 1rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.info-box.streak-system .info-box-content {
  color: #ffcab0;
  font-weight: 500;
}

/* ✅ NEW: Score Example Info Box */
.info-box.score-example {
  background: rgba(156, 39, 176, 0.15);
  border-color: rgba(156, 39, 176, 0.4);
  border-width: 2px;
}

.info-box.score-example .info-box-title {
  color: #9c27b0;
  font-size: 1rem;
}

.info-box.score-example .info-box-content {
  color: #e1bee7;
  font-weight: 500;
}

.info-box.score-example strong {
  color: #ce93d8;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ✅ UPDATED: Difficulty Stats Enhancement */
.difficulty-stats {
  color: #b8e6b8;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ✅ NEW: Enhanced Info Box Hover Effects */
.info-box {
  transition: all 0.3s ease;
  cursor: help;
}

.info-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.info-box.streak-system:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.6);
}

.info-box.score-example:hover {
  background: rgba(156, 39, 176, 0.2);
  border-color: rgba(156, 39, 176, 0.6);
}

.info-box.ad-system:hover {
  background: rgba(255, 215, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.5);
}

.info-box.game-features:hover {
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.5);
}

/* ✅ NEW: Enhanced Button Styling */
.flag-modal-btn {
  position: relative;
  overflow: hidden;
}

.flag-modal-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.flag-modal-btn:hover::before {
  left: 100%;
}

.flag-modal-btn.primary {
  background: linear-gradient(145deg, #ff6b35, #ff8c42);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.flag-modal-btn.primary:hover {
  background: linear-gradient(145deg, #ff8c42, #ff6b35);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.flag-modal-btn.secondary {
  background: linear-gradient(145deg, #954949, #7d6e0b);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* ✅ NEW: Responsive Enhancements */
@media (max-width: 768px) {
  .info-box.streak-system .info-box-content,
  .info-box.score-example .info-box-content {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .difficulty-stats {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .info-box {
    padding: 8px;
    margin-bottom: 10px;
  }

  .info-box-title {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .info-box-content {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .difficulty-level {
    margin-bottom: 6px;
    font-size: 0.8rem;
  }
}

/* ✅ NEW: Animation for Info Boxes */
@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
  }
}

.info-box.streak-system {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ✅ NEW: Timer Benefits Info Box */
.info-box.timer-benefits {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.4);
  border-width: 2px;
}

.info-box.timer-benefits .info-box-title {
  color: #2196f3;
  font-size: 1rem;
}

.info-box.timer-benefits .info-box-content {
  color: #bbdefb;
  font-weight: 500;
}

.info-box.timer-benefits:hover {
  background: rgba(33, 150, 243, 0.2);
  border-color: rgba(33, 150, 243, 0.6);
}
