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

body {
  font-family: Poppins, sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  text-align: center;
  min-height: 100vh;
  color: #fff;
}

h1 {
  margin-top: 30px;
  font-size: 2.5rem;
}

.controls {
  margin: 15px;
}

select {
  padding: 8px 12px;
  border-radius: 8px;
  margin: 0 5px;
}

.scoreboard {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 10px;
  font-size: 1.2rem;
  color: #fef9c3;
}

.container {
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.game {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.box {
  width: 100px;
  height: 100px;
  background: #fef9c3;
  border-radius: 12px;
  border: none;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.3s;
}

.box:hover {
  transform: scale(1.1);
  background: #fde68a;
}

/* Winning animation */
.win {
  animation: pulse 0.6s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

#reset-btn, #new-btn {
  padding: 10px 20px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* FIXED MESSAGE MODAL */
.msg-container {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;

  /* MOST IMPORTANT FIX */
  z-index: 9999;
}

.hide {
  display: none;
}