/* style.css */
body {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 0;
}

#welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.7);
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  border-right: 4px solid #fff;
  width: 100%;
  max-width: 90vw;
  animation: typing 3s steps(30, end) forwards, blink 0.75s step-end infinite;
  font-size: 2rem;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: white; }
}

.mode-select {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mode-btn {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  background-color: #0077ff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.mode-btn:hover {
  background-color: #005fd1;
  transform: scale(1.05);
}

#game-screen {
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease-in-out;
}
#game-screen.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#player-names {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #f0f0f0;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.game {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1vmin;
  width: 90vmin;
  max-width: 400px;
  margin: 0 auto;
}

.box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  border: 2px solid #00aaff;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 170, 255, 0.6);
  font-size: 3rem;
  color: #00c3ff;
  cursor: pointer;
  transition: transform 0.2s;
}
.box:hover {
  transform: scale(1.05);
}

#winner-msg {
  font-size: 2rem;
  margin-top: 1rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}
#winner-msg.show {
  opacity: 1;
  transform: scale(1.1);
  color: #ffeb3b;
  animation: popFade 0.6s ease-in-out forwards;
}

@keyframes popFade {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

#reset-btn,
#new-btn {
  padding: 1rem 2rem;
  font-size: 1rem;
  margin: 1rem;
  background: #003f5c;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#reset-btn:hover,
#new-btn:hover {
  background: #005f7a;
}