* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #4f46e5, #9333ea);
  color: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

h1 {
  margin-bottom: 10px;
}

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

.game {
  height: 60vmin;
  width: 60vmin;
  display: flex;
  flex-wrap: wrap;
  gap: 1vmin;
  justify-content: center;
  align-items: center;
}

.box {
  height: 18vmin;
  width: 18vmin;
  border-radius: 1.2rem;
  border: none;
  background: #f9fafb;
  font-size: 8vmin;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.box:hover:not(:disabled) {
  background: #ede9fe;
  transform: scale(1.05);
}

.box:disabled {
  cursor: not-allowed;
}

.header {
  margin-bottom: 10px;
}

.turn {
  font-size: 1.1rem;
  margin-top: 5px;
  color: #cbd5e1;
}

.msgContainer {
  margin-top: 1rem;
}

#msg {
  font-size: 5vmin;
  margin-bottom: 10px;
  color: #fff;
  text-shadow: 0 0 10px #000;
}

button {
  cursor: pointer;
  transition: all 0.2s ease;
}

#reset, #new, #startBtn {
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  margin-top: 10px;
  font-size: 16px;
}

#reset:hover, #new:hover, #startBtn:hover {
  background: #22c55e;
  color: #000;
}

.scoreboard {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
  font-size: 1.2rem;
  color: #facc15;
}

.intro-screen {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.intro-screen input {
  display: block;
  margin: 10px auto;
  padding: 10px;
  border-radius: 8px;
  border: none;
  width: 80%;
  text-align: center;
}

.hide {
  display: none;
}

.winner {
  animation: blink 0.8s infinite alternate;
}

@keyframes blink {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@media screen and (max-width: 600px) {
  .box {
    height: 25%;
    width: 25%;
    font-size: 10vmin;
  }
}
