* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #2b2b2b;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Center container wrapper */
.game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Unified game panel */
#gamePanel {
  background-color: #3a3a3a;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  width: 90%;
  max-width: 400px;
}

#scoreboard {
  font-size: 22px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 20px;
}

#gameBoard {
  display: grid;
  grid-template-columns: repeat(3, 90px);
  grid-gap: 10px;
}

.cell {
  background-color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: background-color 0.2s, transform 0.1s;
}

.cell:active {
  transform: scale(0.95);
}

.cell.taken {
  cursor: not-allowed;
}

/* Popup overlay */
#popup {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.8);
  display:none;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  color:white;
  z-index:1000;
}

#popup h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

#popup button {
  background-color: #00c853;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor:pointer;
}

#popup button:hover {
  background-color: #009624;
}

@media (max-width: 600px) {
  #scoreboard { font-size: 18px; }
  .cell { font-size: 2rem; }
}