* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #1f1c2c, #928dab);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

/* Container for game */
.container {
  background: rgba(0, 0, 0, 0.85);
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
  padding: 2.5rem;
  text-align: center;
  width: 500px;
  position: relative;
  animation: glow 2s infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
  to {
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
  }
}

/* Heading */
.heading {
  margin-bottom: 1.5rem;
  color: #fff;
  font-size: 2rem;
  text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff;
  animation: slideIn 1s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Game Board */
.game-board {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  grid-gap: 15px;
  justify-content: center;
  margin: 0 auto 1.5rem;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Tic Tac Toe Cells */
.cell {
  width: 110px;
  height: 110px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid #fff;
  border-radius: 10px;
  font-size: 4rem;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.cell:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Move animation */
.cell.filled {
  animation: pop 0.3s ease;
}

@keyframes pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

/* Particle effect on click */
.cell::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 10%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease;
}

.cell.filled::after {
  transform: translate(-50%, -50%) scale(1);
}

/* Message */
.message {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 10px;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Restart button */
.restart-button {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
  border: none;
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.restart-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.restart-button:active {
  transform: scale(0.95);
}

/* Win animation */
.win-animation {
  animation: winFlash 0.5s ease;
}

@keyframes winFlash {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
  }
}

/* Responsive design */
@media (max-width: 500px) {
  .container {
    width: 90%;
    padding: 1.5rem;
  }
  .game-board {
    grid-template-columns: repeat(3, 90px);
    grid-gap: 10px;
  }
  .cell {
    width: 90px;
    height: 90px;
    font-size: 3rem;
  }
}