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

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  min-height: 100vh;
  padding: 10px;
}

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

header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #2d3436;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

header p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: #636e72;
  font-weight: 600;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.draw-button, .restart-button {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 700;
  padding: 15px 30px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  min-width: 180px;
}

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

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

.restart-button {
  background: linear-gradient(45deg, #fd79a8, #fdcb6e);
  color: white;
}

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

.current-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border: 4px solid #fd79a8;
}

.current-card-content {
  text-align: center;
}

.current-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.current-card h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: #2d3436;
  margin-bottom: 10px;
}

.current-card p {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #636e72;
  font-weight: 600;
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.bingo-square {
  background: white;
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 3px solid transparent;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.bingo-square:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.bingo-square.selected {
  background: linear-gradient(135deg, #00b894, #00cec9);
  border-color: #00a085;
  color: white;
}

.bingo-square.selected .word {
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.bingo-square img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.bingo-square .word {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #2d3436;
  font-weight: 400;
  text-align: center;
  line-height: 1.2;
}

.bingo-message {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.bingo-content {
  background: white;
  padding: 40px;
  border-radius: 25px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: bingoWin 0.5s ease-out;
  max-width: 90%;
}

.bingo-content h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2rem, 6vw, 3rem);
  color: #00b894;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.bingo-content p {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: #636e72;
  font-weight: 600;
}

@keyframes bingoWin {
  0% {
      transform: scale(0.3) rotate(-10deg);
      opacity: 0;
  }
  50% {
      transform: scale(1.1) rotate(5deg);
  }
  100% {
      transform: scale(1) rotate(0deg);
      opacity: 1;
  }
}

.instructions {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin-top: 30px;
}

.instructions h3 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #2d3436;
  margin-bottom: 15px;
  text-align: center;
}

.instructions ol {
  list-style: none;
  counter-reset: step-counter;
}

.instructions li {
  counter-increment: step-counter;
  margin-bottom: 10px;
  padding-left: 40px;
  position: relative;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  line-height: 1.5;
  color: #2d3436;
  font-weight: 600;
}

.instructions li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(45deg, #fd79a8, #fdcb6e);
  color: white;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
      padding: 15px;
  }

  .bingo-board {
      gap: 10px;
  }

  .bingo-square {
      padding: 15px;
      min-height: 150px;
  }

  .bingo-square img {
      width: 60px;
      height: 60px;
  }

  .current-card img {
      width: 120px;
      height: 120px;
  }

  .game-controls {
      gap: 15px;
  }
}

@media (max-width: 480px) {
  .bingo-square {
      padding: 10px;
      min-height: 130px;
  }

  .bingo-square img {
      width: 50px;
      height: 50px;
  }

  .current-card {
      padding: 20px;
  }

  .current-card img {
      width: 100px;
      height: 100px;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .bingo-square, .draw-button, .restart-button {
      min-height: 60px;
      padding: 20px;
  }

  .bingo-square {
      min-height: 160px;
  }
}
