@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap');

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

body {
  background: radial-gradient(circle, #0d0d0d, #000);
  font-family: 'Orbitron', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  color: #fff;
}

.container {
  text-align: center;
  animation: fadeIn 1.5s ease-out;
  max-width: 500px;
  width: 100%;
  padding: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glowingBorder {
  0% { box-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff; border-color: #ff00ff; }
  25% { box-shadow: 0 0 10px #00ffff, 0 0 20px #0f0; border-color: #00ffff; }
  50% { box-shadow: 0 0 10px #00ffcc, 0 0 20px #ff0; border-color: #00ffcc; }
  75% { box-shadow: 0 0 10px #0f0, 0 0 20px #f0f; border-color: #0f0; }
  100% { box-shadow: 0 0 10px #ff00ff, 0 0 20px #00ffff; border-color: #ff00ff; }
}

.neon-title {
  font-size: 3em;
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff;
}

.gameboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #00ffcc;
  border-radius: 20px;
  animation: glowingBorder 6s infinite ease-in-out;
  aspect-ratio: 1/1;
}

.cell {
  width: 100%;
  aspect-ratio: 1/1;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
  border-radius: 15px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  animation: glowingBorder 6s infinite ease-in-out;
}

.cell:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #ff00ff, 0 0 30px #00ffff;
}

button {
  background: #111;
  color: #fff;
  padding: 12px 24px;
  font-size: 1em;
  margin: 10px;
  border: 2px solid #0ff;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.3s ease;
  animation: glowingBorder 6s infinite ease-in-out;
  font-family: 'Orbitron', sans-serif;
}

button:hover {
  background: #222;
  transform: scale(1.05);
}

#gameStatus {
  margin-top: 25px;
  font-size: 1.3em;
  color: #ff00ff;
  text-shadow: 0 0 5px #f0f, 0 0 10px #ff00ff;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: radial-gradient(circle, #0d0d0d, #000);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid #00ffcc;
  box-shadow: 0 0 20px #00ffff;
  max-width: 400px;
  width: 90%;
  animation: glowingBorder 6s infinite ease-in-out;
}

.modal-title {
  font-size: 2em;
  margin-bottom: 20px;
  color: #ff00ff;
  text-shadow: 0 0 10px #ff00ff;
}

.modal-message {
  margin-bottom: 30px;
  font-size: 1.2em;
}

.game-mode-selector, .difficulty-selector, .symbol-selector {
  margin-bottom: 20px;
}

.mode-button, .difficulty-button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 15px;
}

.symbol-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.symbol-button {
  width: 60px;
  height: 60px;
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.active-symbol, .active-difficulty {
  background: #222;
  box-shadow: 0 0 20px #00ffff;
}

.player-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.player-tag {
  padding: 8px 15px;
  border-radius: 10px;
  font-weight: bold;
}

.player-tag.active {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 10px #00ffff;
}

@media (max-width: 480px) {
  .neon-title { font-size: 2em; }
  .cell { font-size: 2.2em; }
  button { padding: 10px 18px; font-size: 0.9em; }
  .symbol-button { width: 50px; height: 50px; font-size: 1.5em; }
}

@media (max-width: 350px) {
  .neon-title { font-size: 1.6em; }
  .cell { font-size: 1.8em; }
  button { padding: 8px 16px; font-size: 0.85em; }
}
