/* =====================
   GLOBAL / BACKGROUND
===================== */

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #0a0a0a, #000000 70%);
  font-family: "Segoe UI", Arial, sans-serif;
  color: #ffffff;
  text-align: center;
}

/* =====================
   HEADER / SCOREBOARD
===================== */

header {
  margin-top: 20px;
}

h1 {
  letter-spacing: 3px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.scoreboard {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 15px;
}

.scoreboard div {
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  font-size: 1.1rem;
}

/* =====================
   BOARD / GRID
===================== */

.board {
  display: grid;
  grid-template-columns: repeat(3, 120px);
  gap: 16px;
  justify-content: center;
  margin: 45px auto;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow:
    0 0 25px rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* =====================
   CELLS
===================== */

.cell {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, #1a1a1a, #000000);
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cell:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* =====================
   X / O COLORS
===================== */

.cell.x {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  animation: pop 0.35s ease;
}

.cell.o {
  color: #cccccc;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: pop 0.35s ease;
}

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

/* =====================
   WIN EFFECT
===================== */

.cell.win {
  animation: winPulse 0.9s infinite alternate;
}

@keyframes winPulse {
  from {
    box-shadow: 0 0 15px #ffffff;
  }
  to {
    box-shadow: 0 0 40px #ffffff, 0 0 60px #ffffff;
  }
}

/* =====================
   STATUS TEXT
===================== */

#status {
  font-size: 1.4rem;
  margin-top: 15px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* =====================
   BUTTONS
===================== */

.controls {
  margin-top: 25px;
}

button {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: bold;
  background: linear-gradient(135deg, #ffffff, #cccccc);
  color: #000000;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* =====================
   MOBILE
===================== */

@media (max-width: 480px) {
  .board {
    grid-template-columns: repeat(3, 90px);
  }

  .cell {
    width: 90px;
    height: 90px;
    font-size: 3rem;
  }

  button {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}
