body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.logo-container {
  margin-top: 15px;
  text-align: center;
}

.logo {
  width: 80px;
  height: auto;
  cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(142, 68, 173, 0.6));
  transition: transform 0.2s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.game-container {
  text-align: center;
  padding: 20px;
}

h1 {
  font-size: 2.2em;
  color: #333;
}

.controls {
  margin-bottom: 20px;
}

.controls label {
  margin: 0 5px;
  font-weight: bold;
}

.controls select {
  margin-right: 10px;
  padding: 6px 10px;
  font-size: 1em;
  border-radius: 8px;
  border: 1px solid #8e44ad;
  background-color: white;
  color: #333;
  transition: border 0.3s, box-shadow 0.3s;
}

.controls select:focus {
  outline: none;
  border-color: #732d91;
  box-shadow: 0 0 5px rgba(115, 45, 145, 0.5);
}

#difficultyContainer {
  display: inline;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-gap: 5px;
  justify-content: center;
  margin: 0 auto 20px;
}

.cell {
  width: 100px;
  height: 100px;
  background-color: #fff;
  font-size: 2.5em;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #333;
  border-radius: 15px;
  transition: background-color 0.3s;
}

.cell:hover {
  background-color: #eaeaea;
}

.status {
  font-size: 1.2em;
  color: #444;
}

button {
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  background-color: #8e44ad;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #732d91;
}

#restartMidGameBtn {
  margin-top: 10px;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.overlay.hidden {
  display: none;
}

.message-box {
  background: #fff;
  padding: 30px;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.message-box p {
  font-size: 1.5em;
  margin-bottom: 20px;
}

/* ✅ Responsive for mobile */
@media (max-width: 600px) {
  .controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .controls label {
    display: block;
    margin: 0;
    margin-bottom: 5px;
  }

  .controls select {
    margin-right: 0;
    width: 90%;
    max-width: 300px;
  }

  #difficultyContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  h1 {
    font-size: 1.8em;
  }

  .cell {
    width: 80px;
    height: 80px;
    font-size: 2em;
  }

  .board {
    grid-template-columns: repeat(3, 80px);
  }
}
