/* Background and layout */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #2a003f, #3e0b5f, #b189f5, #120018);
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin-top: -50px;
  overflow: hidden;
  
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Bubble animation for background */
.bubble {
  position: absolute;
  bottom: -100px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: float 15s infinite;
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) scale(1.5);
    opacity: 0;
  }
}

/* Game Container */
.container {
  text-align: center;
  color: white;
  z-index: 2;
}

h1 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 20px;
}

/* Board and Cells */
.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.cell {
  position: relative;
  width: 100px;
  height: 100px;
  background: #fff;
  border: none;
  border-radius: 18px;
  font-size: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: black;
}


/* Hover Highlights */
.cell.x-hover:hover {
  background: #a6b0ff;
  border: 6px solid #301934;
}

.cell.o-hover:hover {
  background: #f4b0c1;
  border: 6px solid #301934;
}

/* Game Status */
.status {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: white;
}

/* Buttons */
/* Restart Button with white neon glow */
button {
  background-color: #4a0070;
  color: white;
  padding: 10px 20px;
  font-size: 1rem;
  border: 3px solid #4a0070;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 12px #ffffff, 0 0 24px #ffffff, 0 0 36px #ffffff; /* Strong white neon */
}

/* Hover effect for Restart Button */
button:hover {
  border: 5px solid #ffd700;
  background-color: #32004d;
  box-shadow: 0 0 12px #ffffff, 0 0 24px #ffffff, 0 0 36px #ffffff; /* Strong white neon on hover */
}


/* Overlay after win/draw */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(48, 25, 52, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.message-box {
  background: #ffffff;
  color: #301934;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
}

.message-box h2 {
  margin-bottom: 20px;
}

.newgame-btn:hover {
  background-color: #1e0c23;
}
