* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 20px;
}

/* Glassmorphism container */
.container, .result-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  padding: 20px;
  margin-top: 30px;
}

h1 {
  margin-bottom: 10px;
  font-size: 2rem;
}

/* Scoreboard Styling */
.scoreboard {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 500;
}

/* Board Layout */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 90vmin;
  max-width: 300px;
}

/* Cell Styling */
.cell {
  background-color: rgba(255, 255, 255, 0.9);
  border: 2px solid #333;
  height: 90vmin;
  max-height: 100px;
  max-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5em;
  color: #000;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  border-radius: 10px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.cell:hover {
  background-color: #e0e0e0;
  transform: scale(1.05);
}

.status {
  margin-top: 20px;
  font-size: 1.2em;
}

.restart {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 1em;
  background-color: #ff9800;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.restart:hover {
  background-color: #e07b00;
}

/* Result Screen */
.result-screen {
  display: none;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.result-screen h2 {
  font-size: 2em;
  margin-bottom: 20px;
}

@media (max-width: 400px) {
  .cell {
    font-size: 2em;
  }
}
.mode-select {
  margin: 10px 0 15px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-select select {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 1rem;
  border: none;
}
