/* =====================================================================
   VibGaming — tictactoe.css
   ===================================================================== */

@import url('https://fonts.cdnfonts.com/css/surprisedmonkey');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-image: url('../assets/images/tictac.jpg');
  background-size: cover;
  background-position: center;
  flex-direction: column;
  font-family: 'surprisedmonkey', sans-serif;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

h1 {
  font-size: 2.5rem;
  color: cyan;
  text-shadow: 0 0 20px cyan, 0 0 40px cyan;
  letter-spacing: 4px;
}

.turn-indicator {
  font-size: 1.1rem;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,255,0.4);
  padding: 8px 24px;
  border-radius: 20px;
  min-width: 200px;
  text-align: center;
}

.turn-indicator span {
  color: cyan;
  font-size: 1.4rem;
}

#xo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 300px;
  height: 300px;
  gap: 6px;
  background: rgba(0,255,255,0.15);
  padding: 6px;
  border-radius: 16px;
  border: 2px solid rgba(0,255,255,0.4);
  box-shadow: 0 0 30px rgba(0,255,255,0.3);
}

.box {
  border-radius: 10px;
  text-align: center;
  align-content: center;
  font-size: 3rem;
  font-weight: bolder;
  cursor: pointer;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.1);
  transition: background 0.2s, transform 0.1s;
  user-select: none;
}

.box:hover:not(.winner):not(.taken) {
  background: rgba(0,255,255,0.12);
  transform: scale(1.04);
}

.box.x-mark { color: #ff4488; text-shadow: 0 0 15px #ff4488; }
.box.o-mark { color: #00f2ff; text-shadow: 0 0 15px #00f2ff; }

.winner {
  animation: pulse 0.6s infinite alternate;
  background: rgba(0,255,100,0.15) !important;
  border-color: lime !important;
}

@keyframes pulse {
  from { box-shadow: 0 0 10px lime; transform: scale(1); }
  to   { box-shadow: 0 0 25px lime; transform: scale(1.06); }
}

.message {
  font-size: 1.6rem;
  text-align: center;
  padding: 12px 30px;
  border-radius: 16px;
  border: 2px solid;
  background: rgba(0,0,0,0.7);
  animation: fadeIn 0.4s ease;
}

.message.win  { color: lime;   border-color: lime;   text-shadow: 0 0 15px lime; }
.message.draw { color: orange; border-color: orange; text-shadow: 0 0 15px orange; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.reset-btn {
  padding: 10px 36px;
  font-size: 1.1rem;
  font-family: 'surprisedmonkey', sans-serif;
  background: linear-gradient(135deg, #00f2ff, #0575e6);
  border: none;
  border-radius: 30px;
  color: #000;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0,255,255,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.reset-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(0,255,255,0.8);
}
