body {
  background: #212532;
  color: #fff;
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
h1 {
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.tictac-container {
  background: #262a3a;
  padding: 40px 32px 32px 32px;
  border-radius: 22px;
  box-shadow: 0 2px 32px #0005;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-template-rows: repeat(3, 72px);
  gap: 14px;
  margin-bottom: 24px;
}
.cell {
  width: 72px;
  height: 72px;
  background: #1b1e29;
  border-radius: 16px;
  font-size: 2.8rem;
  color: #5cbae6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.7, -0.2, 0.4, 1.4),
    box-shadow 0.18s;
  box-shadow: 0 2px 12px #1117;
  position: relative;
  overflow: hidden;
}
.cell:hover:not(.disabled):not(.won) {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 8px 26px #0ff5, 0 2px 14px #1117;
  z-index: 2;
}
.cell.x .mark,
.cell.o .mark {
  animation: pop 0.28s cubic-bezier(0.4, 2.3, 0.4, 0.9);
}
.cell.won {
  background: linear-gradient(90deg, #44ffb8, #46aeff);
  color: #222 !important;
  animation: pulse 0.6s infinite alternate;
}
.mark {
  display: block;
  transform: scale(0.9);
  text-shadow: 0 2px 6px #06e7e93b;
}
@keyframes pop {
  0% {
    transform: scale(0) rotate(-180deg);
  }
  80% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 #00ffc74b;
  }
  100% {
    box-shadow: 0 0 14px 8px #00ffd742;
  }
}
.message {
  font-size: 1.2rem;
  letter-spacing: 1px;
  margin-bottom: 16px;
  min-height: 28px;
  text-align: center;
  transition: color 0.3s;
}
.message.win {
  color: #00ffa2;
  animation: bounce 0.55s;
}
.message.draw {
  color: #ffcb32;
  animation: bounce 0.55s;
}
@keyframes bounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.23);
  }
  100% {
    transform: scale(1);
  }
}
.reset-btn {
  padding: 9px 22px;
  font-size: 1.08em;
  background: linear-gradient(90deg, #1da2ff, #09f6d2);
  color: #222;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 2px 14px #1da2ff32;
  transition: background 0.16s;
}
.reset-btn:hover {
  background: linear-gradient(90deg, #09f6d2, #1da2ff);
}
