@import "https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&display=swap";
body {
  font-family: IM Fell English,serif;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  color: #333;
}

.game-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 100%;
}

h1 {
  margin: 0 0 20px;
  font-size: 2.2em;
  color: #1c1c29;
}

.status {
  margin-bottom: 20px;
  font-size: 1.3em;
  font-weight: bold;
  color: #1c1c29;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 8px;
  margin: 0 auto 25px;
  width: fit-content;
}

.cell {
  background: #f7fafc;
  border: 3px solid #e2e8f0;
  border-radius: 12px;
  font-size: 2.5em;
  font-weight: bold;
  color: #4a5568;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cell:hover {
  background: #edf2f7;
  transform: scale(1.03);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cell.x {
  color: #e53e3e;
}

.cell.o {
  color: #3182ce;
}

.cell.winner {
  background: #c6f6d5 !important;
  animation: pulse 1s infinite;
}

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

button {
  background: #1c1c29;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 1.1em;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: bold;
}

button:hover {
  background: white;
  color: #1c1c29;
  border: 2px solid #1c1c29;
}

.turn-indicator {
  margin: 15px 0;
  font-size: 1.1em;
}

.x-turn { color: #e53e3e; }
.o-turn { color: #3182ce; }

#fireworks-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.firework {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 1;
  animation: firework-explode 1.2s ease-out forwards;
}

@keyframes firework-explode {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.firework::before {
  content: '';
  position: absolute;
}