/* Math Wizards Arena - Main Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: white;
  overflow-x: hidden;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header styles */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Button styles */
.btn {
  min-height: 44px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  touch-action: manipulation;
}

.btn-primary {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.btn-secondary {
  background: linear-gradient(45deg, #74b9ff, #0984e3);
  color: white;
}

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

.btn-danger {
  background: linear-gradient(45deg, #e17055, #d63031);
  color: white;
}

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

/* Play button animation */
.btn-primary.play-cta {
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.8);
    transform: scale(1.02);
  }
}

/* Welcome section */
.welcome-screen {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* Game section */
.game-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px;
}

.game-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
}

/* Monster collection */
.monster-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.monster-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.monster-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.monster-avatar {
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.3);
  width: clamp(60px, 15vw, 80px);
  height: clamp(60px, 15vw, 80px);
  font-size: clamp(2rem, 6vw, 3rem);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Element colors */
.element-fire {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.element-water {
  background: linear-gradient(45deg, #74b9ff, #0984e3);
}

.element-earth {
  background: linear-gradient(45deg, #8B4513, #228B22);
}

.element-air {
  background: linear-gradient(45deg, #E6E6FA, #B0C4DE);
}

/* Stat bars */
.stat-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin: 4px 0;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(45deg, #00b894, #00cec9);
  transition: width 0.3s ease;
}

/* Battle arena */
.battle-arena {
  position: relative;
  transition: background 0.5s ease;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.battle-arena.forest {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 80%, #2d5016 100%);
}

.battle-arena.volcano {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 70%, #8B0000 100%);
}

.battle-arena.space {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 70%, #0c0c0c 100%);
}

.battle-arena.ocean {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 70%, #006994 100%);
}

/* Background particles for each arena */
.battle-arena::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  pointer-events: none;
}

.battle-arena.forest::before {
  background-image: radial-gradient(circle, #90EE90 1px, transparent 1px);
  background-size: 50px 50px;
  animation: forestParticles 10s linear infinite;
}

.battle-arena.volcano::before {
  background-image: radial-gradient(circle, #FF6347 2px, transparent 2px);
  background-size: 30px 30px;
  animation: volcanoParticles 8s linear infinite;
}

.battle-arena.space::before {
  background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
  background-size: 100px 100px;
  animation: spaceParticles 15s linear infinite;
}

.battle-monsters {
  margin-bottom: 2rem;
}

.monster-sprite {
  background: rgba(255, 255, 255, 0.2);
  border: 4px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

/* Math problem section */
.math-problem {
  background: white;
  color: #2d3436;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  margin: 20px 0;
  min-height: 200px; /* Fixed minimum height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.answer-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.answer-btn {
  min-height: 48px;
  background: linear-gradient(45deg, #74b9ff, #0984e3);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  touch-action: manipulation;
}

.answer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
}

.answer-btn.correct {
  background: linear-gradient(45deg, #00b894, #00cec9);
}

.answer-btn.incorrect {
  background: linear-gradient(45deg, #e17055, #d63031);
}

.answer-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Feedback styles */
.feedback {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  min-height: 80px; /* Fixed minimum height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.feedback.success {
  background: linear-gradient(45deg, #00b894, #00cec9);
  color: white;
}

.feedback.error {
  background: linear-gradient(45deg, #e17055, #d63031);
  color: white;
}

/* Timer styles */
.timer-display {
  text-align: center;
  margin-bottom: 20px;
}

.timer-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, #74b9ff, #0984e3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4);
  transition: all 0.3s ease;
}

.timer-circle.timer-warning {
  background: linear-gradient(45deg, #fdcb6e, #e17055);
  animation: pulse 1s infinite;
}

.timer-circle.timer-critical {
  background: linear-gradient(45deg, #e17055, #d63031);
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.timer-text {
  text-align: center;
  color: white;
}

.timer-number {
  font-size: 1.5rem;
  font-weight: bold;
  display: block;
}

.timer-label {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Utility classes */
.hidden { display: none !important; }
.block { display: block !important; }
.text-center { text-align: center; }

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .monster-collection {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .answer-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .answer-btn {
    min-height: 50px;
    font-size: 1.1rem;
    padding: 15px;
  }
  
  .game-header {
    padding: 15px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .monster-card,
  .answer-btn,
  .btn {
    transition: none;
    animation: none;
  }
  
  .monster-card:hover {
    transform: none;
  }
}

/* Ad banners */
.ad-banner, .ad-banner-bottom {
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  min-height: 60px; /* Mobile default */
}

/* Tablet and up */
@media (min-width: 768px) {
  .ad-banner, .ad-banner-bottom {
    min-height: 100px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .ad-banner, .ad-banner-bottom {
    min-height: 120px;
  }
}

/* Large desktop - allow for bigger ads */
@media (min-width: 1200px) {
  .ad-banner, .ad-banner-bottom {
    min-height: 250px;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }
  
  .monster-collection {
    grid-template-columns: 1fr;
  }
  
  .battle-monsters {
    flex-direction: column;
  }
  
  .answer-options {
    grid-template-columns: 1fr;
  }
}

/* Tablet specific (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    padding: 20px;
    max-width: 95%;
  }
  
  .monster-collection {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .battle-monsters {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .answer-options {
    grid-template-columns: repeat(2, 1fr);
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-full { border-radius: 50%; }

.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }

.flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.text-red-400 { color: #f87171; }
.text-orange-400 { color: #fb923c; }
.text-yellow-400 { color: #facc15; }
.text-green-400 { color: #4ade80; }

.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.block { display: block; }
.hidden { display: none; }

.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-28 { width: 7rem; }
.h-28 { height: 7rem; }

.max-w-sm { max-width: 24rem; }
.max-w-xl { max-width: 36rem; }

.bg-red-500 { background-color: #ef4444; }
.bg-white { background-color: white; }

.text-gray-800 { color: #1f2937; }

.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px; }
.focus\:ring-blue-400:focus { box-shadow: 0 0 0 2px #60a5fa; }

.grayscale { filter: grayscale(100%); }

.mx-auto { margin-left: auto; margin-right: auto; }
.mx-8 { margin-left: 2rem; margin-right: 2rem; }

.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:mb-0 { margin-bottom: 0; }
}

/* Fun animations for kids */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes rainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Interactive monster cards */
.monster-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.monster-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.monster-card:hover .monster-avatar {
  animation: bounce 0.6s ease;
}

/* Monster ability animations */
.ability-glow {
  animation: abilityPulse 1s ease;
  box-shadow: 0 0 30px #4ecdc4, 0 0 60px #4ecdc4;
}

@keyframes abilityPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); filter: brightness(1.5); }
}

/* Streak effects */
.streak-fire {
  animation: streakRainbow 2s infinite;
  box-shadow: 0 0 40px #ff6b6b;
}

@keyframes streakRainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Achievement effects */
.achievement-glow {
  animation: achievementPulse 3s ease;
  box-shadow: 0 0 50px gold, 0 0 100px gold;
}

@keyframes achievementPulse {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.02); filter: brightness(1.3); }
  75% { transform: scale(1.02); filter: brightness(1.3); }
}

.achievement-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: gold;
  border-radius: 50%;
  animation: achievementFloat 4s ease-out forwards;
  pointer-events: none;
}

@keyframes achievementFloat {
  0% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
  100% { 
    opacity: 0; 
    transform: translateY(-200px) scale(0.5); 
  }
}

/* Monster hit animations */
.battle-hit {
  animation: monsterHit 0.5s ease;
}

@keyframes monsterHit {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px) scale(0.95); }
  75% { transform: translateX(10px) scale(1.05); }
}

/* Battle effects */
.battle-hit {
  animation: wiggle 0.5s ease;
}

.victory-celebration {
  animation: bounce 1s ease infinite;
}

/* Answer button hover effects */
.answer-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(116, 185, 255, 0.5);
}

/* Floating particles effect */
.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  animation: float 3s infinite ease-in-out;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10px) rotate(360deg); opacity: 0; }
}

/* Power-up effects */
.power-up-glow {
  position: relative;
}

.power-up-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  border-radius: inherit;
  z-index: -1;
  animation: rainbow 2s infinite;
}

/* Timer Display */
.timer-display {
  display: flex;
  justify-content: center;
  align-items: center;
}

.timer-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.timer-circle.timer-warning {
  background: linear-gradient(45deg, #f39c12, #e67e22);
  animation: timerPulse 1s infinite;
}

.timer-circle.timer-critical {
  background: linear-gradient(45deg, #e74c3c, #c0392b);
  animation: timerShake 0.5s infinite;
}

.timer-text {
  text-align: center;
  color: white;
}

.timer-number {
  display: block;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
}

.timer-label {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes timerShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Monster idle animations - be more specific */
.battle-arena .monster-sprite {
  animation: monsterIdle 3s ease-in-out infinite;
}

@keyframes monsterIdle {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

/* Monster attack animations */
.monster-attack {
  animation: monsterAttack 0.8s ease !important;
}

@keyframes monsterAttack {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-10px) scale(1.1); }
  50% { transform: translateX(10px) scale(1.15) rotate(5deg); }
  75% { transform: translateX(-5px) scale(1.05) rotate(-2deg); }
  100% { transform: translateX(0) scale(1) rotate(0deg); }
}

/* Don't animate collection monsters */
.monster-collection .monster-avatar {
  animation: none !important;
}

/* Only animate battle monsters */
.battle-arena .battle-monster .monster-sprite {
  animation: monsterIdle 3s ease-in-out infinite;
}

/* Remove any CSS that might be hiding elements */
.monster-sprite {
  /* Remove any problematic properties */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
}

/* Only animate battle monsters - be very specific */
.battle-arena .battle-monster .monster-sprite {
  animation: monsterIdle 3s ease-in-out infinite;
}

/* Ensure collection monsters don't get animated */
.monster-collection .monster-avatar {
  animation: none !important;
}

/* Make sure battle monster elements are visible */
.battle-monster {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

.battle-monster .font-bold,
.battle-monster .text-xl {
  display: block !important;
  visibility: visible !important;
}

/* Monster idle animations - be more specific */
.battle-arena .monster-sprite {
  animation: monsterIdle 3s ease-in-out infinite;
}

@keyframes monsterIdle {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

/* Monster attack animations */
.monster-attack {
  animation: monsterAttack 0.8s ease !important;
}

@keyframes monsterAttack {
  0% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-10px) scale(1.1); }
  50% { transform: translateX(10px) scale(1.15) rotate(5deg); }
  75% { transform: translateX(-5px) scale(1.05) rotate(-2deg); }
  100% { transform: translateX(0) scale(1) rotate(0deg); }
}

/* Don't animate collection monsters */
.monster-collection .monster-avatar {
  animation: none !important;
}

/* Only animate battle monsters */
.battle-arena .battle-monster .monster-sprite {
  animation: monsterIdle 3s ease-in-out infinite;
}

/* Rarity-based monster card styles */
.monster-card.rarity-common {
  border: 2px solid #9CA3AF;
  box-shadow: 0 4px 15px rgba(156, 163, 175, 0.3);
}

.monster-card.rarity-rare {
  border: 2px solid #3B82F6;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.1));
}

.monster-card.rarity-legendary {
  border: 2px solid #F59E0B;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(255, 255, 255, 0.1));
  animation: legendaryGlow 3s ease-in-out infinite;
}

@keyframes legendaryGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 6px 25px rgba(245, 158, 11, 0.8); }
}

/* Rarity badges */
.rarity-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.rarity-badge.common {
  background: #9CA3AF;
  color: white;
}

.rarity-badge.rare {
  background: #3B82F6;
  color: white;
}

.rarity-badge.legendary {
  background: linear-gradient(45deg, #F59E0B, #FBBF24);
  color: white;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Rarity Unlock Modal */
.rarity-unlock-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.5s ease;
}

.rarity-unlock-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  position: relative;
  overflow: hidden;
  animation: rarityReveal 1s ease;
}

.rarity-unlock-content.rarity-rare {
  background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.5);
}

.rarity-unlock-content.rarity-legendary {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 0 80px rgba(245, 158, 11, 0.8);
  animation: rarityReveal 1s ease, legendaryPulse 2s ease infinite;
}

.rarity-unlock-title {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: titleGlow 2s ease infinite;
}

.monster-reveal {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.5);
  animation: monsterReveal 1.5s ease;
}

.monster-emoji {
  font-size: 4rem;
  animation: emojiSpin 2s ease;
}

.monster-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.monster-description {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.rarity-unlock-btn {
  background: linear-gradient(45deg, #00b894, #55a3ff);
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 25px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: buttonGlow 2s ease infinite;
}

.rarity-unlock-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 184, 148, 0.5);
}

/* Rarity Particles */
.rarity-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.rarity-particles::before,
.rarity-particles::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: gold;
  border-radius: 50%;
  animation: particleFloat 3s infinite ease-in-out;
}

.rarity-particles::before {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.rarity-particles::after {
  top: 60%;
  right: 15%;
  animation-delay: 1s;
}

/* Rarity Indicator */
.rarity-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rarity-gem {
  font-size: 1.2rem;
  animation: gemSparkle 2s ease infinite;
}

.rarity-gem.legendary {
  animation: gemSparkle 1s ease infinite, legendaryShimmer 3s ease infinite;
}

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

@keyframes rarityReveal {
  0% { transform: scale(0.5) rotate(-180deg); opacity: 0; }
  50% { transform: scale(1.1) rotate(-90deg); opacity: 0.8; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes legendaryPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); filter: brightness(1.2); }
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
  50% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.5); }
}

@keyframes monsterReveal {
  0% { transform: scale(0) rotate(360deg); opacity: 0; }
  70% { transform: scale(1.1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes emojiSpin {
  0% { transform: rotate(0deg) scale(0.5); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes buttonGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3); }
  50% { box-shadow: 0 6px 25px rgba(0, 184, 148, 0.6); }
}

@keyframes particleFloat {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

@keyframes gemSparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); filter: brightness(1.5); }
}

@keyframes legendaryShimmer {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Evolution Modal */
.evolution-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.5s ease;
}

.evolution-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: evolutionPulse 2s infinite;
}

.evolution-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #FFD700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
  animation: titleGlow 1.5s infinite alternate;
}

.evolution-transformation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

.evolution-before, .evolution-after {
  text-align: center;
}

.monster-sprite {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: bounce 1s infinite;
}

.monster-sprite.evolved {
  animation: evolutionGlow 2s infinite;
  filter: drop-shadow(0 0 20px #FFD700);
}

.evolution-arrow .arrow-animation {
  font-size: 3rem;
  animation: arrowPulse 1s infinite;
}

.evolution-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.stat-boost {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: bold;
  animation: statBoost 0.8s ease;
}

/* Evolution Animations */
@keyframes evolutionPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes titleGlow {
  0% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); }
  100% { text-shadow: 2px 2px 20px #FFD700, 0 0 30px #FFD700; }
}

@keyframes evolutionGlow {
  0%, 100% { 
    filter: drop-shadow(0 0 20px #FFD700);
    transform: scale(1);
  }
  50% { 
    filter: drop-shadow(0 0 40px #FFD700) drop-shadow(0 0 60px #FF6B6B);
    transform: scale(1.1);
  }
}

@keyframes arrowPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes statBoost {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Achievement Styles */
.achievement-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.achievement-icon-large {
  font-size: 4rem;
  animation: bounceIn 0.6s ease-out;
}

.achievements-view {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(5px) !important;
  z-index: 9999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  overflow-y: auto !important;
  animation: modalFadeIn 0.3s ease-out !important;
}

.achievements-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  border-radius: 20px !important;
  padding: 40px !important;
  max-width: 900px !important;
  width: 90% !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 2px #ffd700 !important;
  border: 3px solid #ffd700 !important;
  animation: modalPopIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

.achievements-content h2 {
  background: linear-gradient(45deg, 
    #ffd700 0%, 
    #ffed4e 25%, 
    #ff6b6b 50%, 
    #4ecdc4 75%, 
    #45b7d1 100%);
  background-size: 300% 300%;
  animation: rainbowText 4s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  font-weight: 900;
  letter-spacing: 1px;
  position: relative;
}

.achievements-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 15px !important;
}

.achievement-card {
  background: linear-gradient(135deg, #2a2a3e 0%, #1e1e2e 100%) !important;
  border: 2px solid transparent !important;
  border-radius: 15px !important;
  padding: 20px !important;
  text-align: center !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
}

.achievement-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
  transition: left 0.5s ease !important;
}

.achievement-card:hover::before {
  left: 100% !important;
}

.achievement-card.bg-green-900 {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3) !important;
}

.achievement-card:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.achievement-card .text-4xl {
  animation: bounceIcon 2s ease-in-out infinite !important;
  display: inline-block !important;
}

/* XP Progress Bar Glow */
.glow-effect {
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5) !important;
}

/* Enhanced Button Styling */
.btn-achievement {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%) !important;
  color: #1a1a2e !important;
  border: none !important;
  font-weight: bold !important;
  text-shadow: none !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn-achievement:hover {
  background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4) !important;
}

.achievement-icon {
  animation: bounceIcon 2s ease-in-out infinite !important;
  display: inline-block !important;
}

/* Game Header Enhancements */
.game-header {
  position: relative !important;
  overflow: hidden !important;
}

.game-header::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent) !important;
  animation: headerShine 3s ease-in-out infinite !important;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  backdrop-filter: blur(5px) !important;
}

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

@keyframes modalPopIn {
  0% { 
    opacity: 0; 
    transform: scale(0.8) translateY(-50px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

@keyframes goldShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

@keyframes headerShine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* Game Intro Styling */
.game-intro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    rgba(139, 69, 19, 0.1) 0%,
    rgba(75, 0, 130, 0.2) 25%,
    rgba(25, 25, 112, 0.2) 50%,
    rgba(72, 61, 139, 0.2) 75%,
    rgba(138, 43, 226, 0.1) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(138, 43, 226, 0.2);
  animation: introGlow 3s ease-in-out infinite alternate;
}

.game-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 215, 0, 0.1), 
    rgba(255, 255, 255, 0.05), 
    rgba(138, 43, 226, 0.1), 
    transparent);
  animation: magicalShine 6s ease-in-out infinite;
}

.game-intro::after {
  content: '✨';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  animation: sparkle 2s ease-in-out infinite;
  opacity: 0.7;
}

/* Enhanced Title Styling */
.game-intro h2 {
  background: linear-gradient(45deg, 
    #ffd700 0%, 
    #ffed4e 25%, 
    #ff6b6b 50%, 
    #4ecdc4 75%, 
    #45b7d1 100%);
  background-size: 300% 300%;
  animation: rainbowText 4s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  font-weight: 900;
  letter-spacing: 1px;
  position: relative;
}

.game-intro h2::before {
  content: '🧙‍♂️';
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  animation: wizardFloat 3s ease-in-out infinite;
}

.game-intro h2::after {
  content: '⚡';
  position: absolute;
  right: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  animation: lightningPulse 1.5s ease-in-out infinite;
}

/* Enhanced Description */
.game-intro p {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

.game-intro p::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1);
  border-radius: 17px;
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 3s ease-in-out infinite;
}

/* Enhanced How to Play Button */
.btn-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
  background-size: 200% 200%;
  color: white;
  border: 2px solid transparent;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 8px 25px rgba(102, 126, 234, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: buttonPulse 2s ease-in-out infinite;
}

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

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

.btn-info:hover {
  background-position: 100% 0;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 12px 35px rgba(102, 126, 234, 0.6),
    0 0 30px rgba(118, 75, 162, 0.4);
}

/* Enhanced How to Play Content */
.how-to-play-content {
  background: linear-gradient(135deg, 
    rgba(30, 58, 138, 0.2) 0%,
    rgba(67, 56, 202, 0.3) 25%,
    rgba(99, 102, 241, 0.2) 50%,
    rgba(139, 92, 246, 0.3) 75%,
    rgba(168, 85, 247, 0.2) 100%);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(15px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(139, 92, 246, 0.3);
  position: relative;
  overflow: hidden;
  animation: formGlow 4s ease-in-out infinite alternate;
}

.new-game-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    rgba(139, 92, 246, 0.1), 
    transparent);
  animation: formShine 5s ease-in-out infinite;
}

.new-game-form::after {
  content: '🌟';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  animation: starTwinkle 3s ease-in-out infinite;
  opacity: 0.8;
}

/* Form Group Styling */
.form-group {
  position: relative;
  margin-bottom: 30px;
}

.form-group label {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(45deg, #ffd700, #ffed4e, #4ecdc4);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: labelGlow 3s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  position: relative;
}

.form-group label::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
}

/* Donation Modal Styles - Complete */
.donation-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.85) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
  backdrop-filter: blur(10px) !important;
  animation: modalFadeIn 0.4s ease-out !important;
  padding: 20px !important;
}

.donation-content {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
  border-radius: 25px !important;
  padding: 2rem !important;
  max-width: 520px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  border: 3px solid rgba(139, 92, 246, 0.4) !important;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  text-align: center !important;
  position: relative !important;
  animation: modalSlideUp 0.5s ease-out !important;
}

.donation-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.donation-title {
  color: #4ecdc4 !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  text-shadow: 0 0 20px rgba(78, 205, 196, 0.4) !important;
}

.close-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  color: #fff !important;
  font-size: 1.5rem !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1) !important;
}

.donation-message {
  color: #e2e8f0;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.donation-message p {
  margin: 0.5rem 0;
}

.donation-message strong {
  color: #ffd700;
}

.donation-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.donation-option {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.donation-option:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
}

.donation-option h4 {
  color: #4ecdc4;
  margin: 0 0 1.5rem 0;
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.donation-btn {
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.donation-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Fix container to prevent overflow */
.container {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Prevent body scroll during animations */
body.battle-active {
  overflow-y: auto;
  height: auto;
}
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 15px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.kofi-btn {
  background: linear-gradient(45deg, #ff5f5f, #ff8a80) !important;
  color: white !important;
  box-shadow: 0 6px 20px rgba(255, 95, 95, 0.3);
}

.kofi-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 95, 95, 0.4);
  background: linear-gradient(45deg, #ff4444, #ff6b6b) !important;
}

.gcash-btn {
  background: linear-gradient(45deg, #007cff, #0099ff) !important;
  color: white !important;
  box-shadow: 0 6px 20px rgba(0, 124, 255, 0.3);
}

.gcash-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 124, 255, 0.4);
  background: linear-gradient(45deg, #0066cc, #007cff) !important;
}

.option-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0;
  font-style: italic;
  line-height: 1.4;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .donation-modal {
    padding: 15px !important;
  }
  
  .donation-content {
    padding: 1.5rem;
    max-width: 100%;
    border-radius: 20px;
  }
  
  .donation-title {
    font-size: 1.4rem;
  }
  
  .donation-message {
    font-size: 1rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
  }
  
  .donation-options {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .donation-option {
    padding: 1.5rem 1rem;
    min-height: 150px;
  }
  
  .donation-option h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
  
  .donation-btn {
    font-size: 1rem;
    padding: 12px 20px;
    gap: 0.6rem;
  }
  
  .option-desc {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .donation-modal {
    padding: 10px !important;
  }
  
  .donation-content {
    padding: 1rem;
    border-radius: 15px;
  }
  
  .donation-header {
    margin-bottom: 1.5rem;
  }
  
  .donation-title {
    font-size: 1.2rem;
  }
  
  .donation-message {
    font-size: 0.9rem;
    padding: 1rem;
  }
  
  .donation-option {
    padding: 1.2rem 0.8rem;
    min-height: 130px;
  }
  
  .donation-option h4 {
    font-size: 1.1rem;
  }
  
  .donation-btn {
    font-size: 0.95rem;
    padding: 10px 15px;
  }
}/* Enhanced Footer Styles */
.game-footer {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(51, 65, 85, 0.95) 50%, 
    rgba(30, 41, 59, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(139, 92, 246, 0.3);
  margin-top: 3rem;
  padding: 2rem 0 1rem;
  color: #e2e8f0;
  position: relative;
  overflow: hidden;
}

.game-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(139, 92, 246, 0.6) 50%, 
    transparent 100%);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section {
  padding: 1rem;
}

.footer-brand {
  text-align: center;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, #ffd700, #ff6b6b, #4ecdc4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.footer-tagline {
  font-style: italic;
  color: #cbd5e1;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.creator-info p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.copyright {
  color: #94a3b8;
  font-size: 0.8rem;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #ffd700;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 0.5rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

.footer-link {
  color: #4ecdc4;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-link:hover {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.footer-text {
  color: #cbd5e1;
  font-size: 0.85rem;
}

.contact-info {
  space-y: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.contact-icon {
  font-size: 1.1rem;
}

.contact-link {
  color: #4ecdc4;
  font-size: 0.9rem;
}

.support-link {
  color: #51cf66;
  font-weight: 600;
}

.support-link:hover {
  color: #69db7c;
  text-shadow: 0 0 8px rgba(105, 219, 124, 0.5);
}

/* Footer Bottom */
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.footer-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.privacy-note {
  color: #4ade80;
  font-weight: 500;
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  background: linear-gradient(45deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #e2e8f0;
  backdrop-filter: blur(5px);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  
  .footer-section {
    padding: 0.5rem;
  }
  
  .footer-badges {
    gap: 0.5rem;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-brand {
    text-align: left;
  }
}

/* Fix Game Intro Overflow */
.game-intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%; /* Reduced from -100% */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 215, 0, 0.1), 
    rgba(255, 255, 255, 0.05), 
    rgba(138, 43, 226, 0.1), 
    transparent);
  animation: magicalShine 6s ease-in-out infinite;
}

/* Fix Play Step Hover Effects */
.play-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%; /* Reduced from -100% */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.play-step:hover::before {
  left: 50%; /* Reduced from 100% */
}

/* Fix Button Shine Effects */
.btn-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%; /* Reduced from -100% */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-info:hover::before {
  left: 50%; /* Reduced from 100% */
}

.new-game-form .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%; /* Reduced from -100% */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left 0.6s ease;
}

.new-game-form .btn-primary:hover::before {
  left: 50%; /* Reduced from 100% */
}

/* Fix Form Input Focus Issues on Mobile */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ffd700;
  background: linear-gradient(135deg, 
    rgba(0, 0, 0, 0.5) 0%, 
    rgba(30, 58, 138, 0.3) 50%, 
    rgba(0, 0, 0, 0.5) 100%);
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(255, 215, 0, 0.4),
    0 8px 25px rgba(139, 92, 246, 0.3);
  transform: none; /* Remove transform on mobile to prevent scrolling */
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
  .new-game-form {
    padding: 20px 15px; /* Further reduced padding */
    margin: 0 10px;
    border-radius: 15px;
  }
  
  .new-game-form::after {
    display: none; /* Hide decorative star on mobile */
  }
  
  .form-group {
    margin-bottom: 25px; /* Reduced spacing */
  }
  
  .form-group label {
    font-size: 1.1rem; /* Slightly smaller */
    margin-bottom: 10px;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 24px;
  }
  
  .monster-collection {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .monster-card,
  .answer-btn,
  .btn {
    transition: none;
    animation: none;
  }
  
  .monster-card:hover {
    transform: none;
  }
}

/* Performance optimization for high DPI */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .monster-avatar,
  .monster-sprite {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .monster-card:hover {
    transform: none;
  }
  
  .monster-card:active {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
  }
  
  .answer-btn:active {
    transform: scale(0.95);
  }
  
  .btn:active {
    transform: scale(0.95);
  }
}
  .form-group input,
  .form-group select {
    max-width: 100%;
    font-size: 1rem;
    padding: 15px 20px;
    border-radius: 12px;
  }
  
  /* Remove transforms on mobile to prevent scrolling issues */
}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
  .battle-monsters {
    flex-direction: row;
    gap: 16px;
  }
  
  .monster-sprite {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }
  
  .math-problem {
    padding: 16px;
  }
  
  .header h1 {
    font-size: 2rem;
  }
}
  .form-group input:focus,
  .form-group select:focus {
    transform: none !important;
  }
  
  .new-game-form .btn-primary {
    font-size: 1.1rem;
    padding: 16px 30px; /* Reduced padding */
    letter-spacing: 1px;
    border-radius: 20px;
    width: 100%; /* Full width on mobile */
    max-width: 300px; /* But not too wide */
    margin: 0 auto;
    display: block;
  }
  
  .new-game-form .btn-primary:hover {
    transform: none !important; /* Remove hover transform on mobile */
  }
  
  /* Disable problematic animations on mobile */
  .game-intro h2::before,
  .game-intro h2::after {
    display: none;
  }
  
  .play-step:hover {
    transform: none !important; /* Remove hover transform */
  }
  
  /* Fix container overflow */
  .welcome-screen {
    overflow-x: hidden;
    width: 100%;
  }
  
  .container {
    overflow-x: hidden;
    width: 100%;
  }
}

/* Fix Animation Keyframes to Prevent Overflow */
@keyframes formShine {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Mobile-first responsive fixes */
@media (max-width: 768px) {
  .monster-collection {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 10px;
  }
  
  .battle-monsters {
    flex-direction: column;
    gap: 20px;
  }
  
  .answer-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .answer-btn {
    min-height: 50px;
    font-size: 1.1rem;
    padding: 15px;
  }
}

/* GCash Modal Styles */
.gcash-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.85) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 9999 !important;
  backdrop-filter: blur(10px) !important;
  animation: modalFadeIn 0.4s ease-out !important;
  padding: 20px !important;
}

.gcash-content {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
  border-radius: 25px !important;
  padding: 2rem !important;
  max-width: 450px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  border: 3px solid rgba(0, 124, 255, 0.4) !important;
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(0, 124, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  text-align: center !important;
  position: relative !important;
  animation: modalSlideUp 0.5s ease-out !important;
}

.gcash-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 2rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.gcash-title {
  color: #007cff !important;
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  margin: 0 !important;
  text-shadow: 0 0 20px rgba(0, 124, 255, 0.4) !important;
}

.qr-container {
  margin: 2rem 0 !important;
  padding: 1.5rem !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  text-align: center !important;
}

.qr-image {
  max-width: 250px !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 10px !important;
  margin: 0 auto 1rem auto !important;
  border: 2px solid rgba(0, 124, 255, 0.3) !important;
  display: block !important;
}

.gcash-details {
  color: #e2e8f0 !important;
  margin-top: 1rem !important;
  text-align: center !important;
}

.gcash-number {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #007cff !important;
  margin: 0.5rem 0 !important;
  text-align: center !important;
}

.gcash-name {
  font-size: 1rem !important;
  color: #94a3b8 !important;
  margin: 0.5rem 0 !important;
  text-align: center !important;
}

.appreciation-message {
  background: rgba(255, 255, 255, 0.05) !important;
  padding: 1.5rem !important;
  border-radius: 15px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  margin: 2rem 0 !important;
}

.thanks-text {
  color: #e2e8f0 !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  margin: 0.5rem 0 !important;
}

.thanks-text strong {
  color: #ffd700 !important;
}

.impact-text {
  color: #94a3b8 !important;
  font-size: 0.9rem !important;
  font-style: italic !important;
  margin: 0.5rem 0 !important;
}

.gcash-close-btn {
  background: linear-gradient(45deg, #007cff, #0099ff) !important;
  color: white !important;
  border: none !important;
  padding: 12px 30px !important;
  border-radius: 25px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  margin-top: 1rem !important;
}

.gcash-close-btn:hover {
  background: linear-gradient(45deg, #0066cc, #007cff) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 124, 255, 0.4) !important;
}

/* Mobile responsive for GCash modal */
@media (max-width: 768px) {
  .gcash-content {
    padding: 1.5rem !important;
    max-width: 100% !important;
  }
  
  .gcash-title {
    font-size: 1.4rem !important;
  }
  
  .qr-image {
    max-width: 180px !important;
  }
}

@media (max-width: 480px) {
  .gcash-content {
    padding: 1rem !important;
  }
  
  .gcash-title {
    font-size: 1.2rem !important;
  }
  
  .qr-image {
    max-width: 160px !important;
  }
}
  color: rgba(255, 215, 0, 0.7);
}

/* Enhanced Select Dropdown */
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px;
  padding-right: 60px;
}

.form-group select option {
  background: #1a1a2e;
  color: white;
  padding: 10px;
  font-weight: 600;
}

.form-group select option:hover {
  background: #16213e;
}

/* Enhanced Start Button */
.new-game-form .btn-primary {
  background: linear-gradient(135deg, 
    #ff6b6b 0%, 
    #ee5a24 25%, 
    #ff6b6b 50%, 
    #fd79a8 75%, 
    #ff6b6b 100%);
  background-size: 300% 300%;
  border: 3px solid rgba(255, 107, 107, 0.5);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 20px 40px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 15px 35px rgba(255, 107, 107, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  animation: startButtonPulse 2s ease-in-out infinite;
}

.new-game-form .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left 0.6s ease;
}

.new-game-form .btn-primary:hover::before {
  left: 100%;
}

.new-game-form .btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 20px 45px rgba(255, 107, 107, 0.6),
    0 0 40px rgba(253, 121, 168, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 215, 0, 0.8);
}

/* Back Button Styling */
.new-game-form .text-gray-400 {
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.new-game-form .text-gray-400:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Input Animation Effects */
.form-group input:valid {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(16, 185, 129, 0.3);
}

.form-group select:valid {
  border-color: rgba(16, 185, 129, 0.6);
}

/* Floating Label Effect */
.form-group {
  position: relative;
}

.form-group input:focus + .floating-icon,
.form-group select:focus + .floating-icon
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes starTwinkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 0.8; 
  }
  50% { 
    transform: scale(1.3) rotate(180deg); 
    opacity: 1; 
  }
}

@keyframes labelGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes labelUnderline {
  0%, 100% { width: 0; }
  50% { width: 100%; }
}

@keyframes startButtonPulse {
  0%, 100% { 
    transform: scale(1);
    background-position: 0% 50%;
  }
  50% { 
    transform: scale(1.02);
    background-position: 100% 50%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .new-game-form {
    padding: 25px;
    margin: 0 10px;
  }
  
  .form-group input,
  .form-group select {
    max-width: 100%;
    font-size: 1rem;
    padding: 15px 20px;
  }
  
  .new-game-form .btn-primary {
    font-size: 1.1rem;
    padding: 18px 35px;
    letter-spacing: 1px;
  }
}
    rgba(0, 0, 0, 0.4) 0%, 
    rgba(25, 25, 112, 0.3) 50%, 
    rgba(0, 0, 0, 0.4) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideDown 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.how-to-play-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1);
  animation: topBorderFlow 3s ease-in-out infinite;
}

/* Enhanced Play Steps */
.play-step {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(255, 255, 255, 0.02) 100%);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.play-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%; /* Reduced from -100% */
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.play-step:hover::before {
  left: 50%; /* Reduced from 100% */
}

/* Add missing modal animations */
@keyframes modalFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes modalSlideUp {
  0% { transform: translateY(50px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Close button styles */
.close-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: scale(1.1);
}

/* Button icon and text styles */
.btn-icon {
  font-size: 1.2rem;
}

.btn-text {
  font-weight: 700;
}
  0% { left: -50%; }
  50% { left: 50%; }
  100% { left: 50%; }
}

@keyframes magicalShine {
  0% { left: -50%; }
  50% { left: 50%; }
  100% { left: 50%; }
}

/* Ensure body doesn't scroll horizontally */
body {
  overflow-x: hidden;
  width: 100%;
}

#app {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* Fix viewport issues */
@media (max-width: 768px) {
  * {
    box-sizing: border-box;
  }
  
  .container {
    padding: 0 10px;
    max-width: 100vw;
  }
}
  color: rgba(255, 215, 0, 0.7);
}

/* Enhanced Select Dropdown */
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 20px;
  padding-right: 60px;
}

.form-group select option {
  background: #1a1a2e;
  color: white;
  padding: 10px;
  font-weight: 600;
}

.form-group select option:hover {
  background: #16213e;
}

/* Enhanced Start Button */
.new-game-form .btn-primary {
  background: linear-gradient(135deg, 
    #ff6b6b 0%, 
    #ee5a24 25%, 
    #ff6b6b 50%, 
    #fd79a8 75%, 
    #ff6b6b 100%);
  background-size: 300% 300%;
  border: 3px solid rgba(255, 107, 107, 0.5);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 20px 40px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 15px 35px rgba(255, 107, 107, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
  animation: startButtonPulse 2s ease-in-out infinite;
}

.new-game-form .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  transition: left 0.6s ease;
}

.new-game-form .btn-primary:hover::before {
  left: 100%;
}

.new-game-form .btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 20px 45px rgba(255, 107, 107, 0.6),
    0 0 40px rgba(253, 121, 168, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 215, 0, 0.8);
}

/* Back Button Styling */
.new-game-form .text-gray-400 {
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.new-game-form .text-gray-400:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Input Animation Effects */
.form-group input:valid {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(16, 185, 129, 0.3);
}

.form-group select:valid {
  border-color: rgba(16, 185, 129, 0.6);
}

/* Floating Label Effect */
.form-group {
  position: relative;
}

.form-group input:focus + .floating-icon,
.form-group select:focus + .floating-icon
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

@keyframes starTwinkle {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
    opacity: 0.8; 
  }
  50% { 
    transform: scale(1.3) rotate(180deg); 
    opacity: 1; 
  }
}

@keyframes labelGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes labelUnderline {
  0%, 100% { width: 0; }
  50% { width: 100%; }
}

@keyframes startButtonPulse {
  0%, 100% { 
    transform: scale(1);
    background-position: 0% 50%;
  }
  50% { 
    transform: scale(1.02);
    background-position: 100% 50%;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .new-game-form {
    padding: 25px;
    margin: 0 10px;
  }
  
  .form-group input,
  .form-group select {
    max-width: 100%;
    font-size: 1rem;
    padding: 15px 20px;
  }
  
  .new-game-form .btn-primary {
    font-size: 1.1rem;
    padding: 18px 35px;
    letter-spacing: 1px;
  }
}
    rgba(0, 0, 0, 0.4) 0%, 
    rgba(25, 25, 112, 0.3) 50%, 
    rgba(0, 0, 0, 0.4) 100%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: slideDown 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.how-to-play-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #45b7d1);
  animation: topBorderFlow 3s ease-in-out infinite;
}

/* Enhanced Play Steps */
.play-step {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.05) 0%, 
    rgba(255, 255, 255, 0.02) 100%);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 


