/* styles.css */
:root {
  --neon-blue: #00ffff;
  --neon-red: #ff0055;
  --bg-dark: #000010;
  --glass-color: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(10px);
  --font: 'Orbitron', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg-dark);
  overflow: hidden;
  color: white;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -2;
  pointer-events: none;
}

#game-container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

header h1 {
  text-align: center;
  font-size: 2em;
  color: var(--neon-blue);
  text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
}

.scoreboard {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 1.5em;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 3s linear infinite;
}

.avatar.X { background: linear-gradient(45deg, #ff416c, #ff4b2b); }
.avatar.O { background: linear-gradient(45deg, #00f2ff, #005eff); }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
  padding: 20px;
  background: var(--glass-color);
  border-radius: 15px;
  box-shadow: 0 0 20px var(--neon-blue);
  backdrop-filter: var(--glass-blur);
}

.cell {
  width: 100px;
  height: 100px;
  border: 2px solid var(--neon-blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.cell:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--neon-blue), 0 0 20px var(--neon-blue);
}

#progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--neon-blue), #00ffcc);
  width: 0%;
  transition: width 0.5s linear;
}

#victory-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.7);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  display: none;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

#victory-screen h2 {
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue);
  margin-bottom: 20px;
}

#play-again {
  padding: 10px 20px;
  background: var(--neon-blue);
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

#play-again:hover {
  background: #00cccc;
}

/* Responsive */
@media (max-width: 600px) {
  .cell {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
  }
}

.fullscreen {
  width: 100vw;
  height: 100vh;
}