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

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;

  background: linear-gradient(135deg, #ff9a9e, #a1c4fd, #c3ffd4);
  background-size: 300% 300%;
  animation: bgMove 10s infinite alternate;
}

@keyframes bgMove {
  0% { background-position: left; }
  100% { background-position: right; }
}

.game-container {
  width: 380px;
  padding: 30px;
  background: white;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0px 10px 30px rgba(0,0,0,0.2);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

.settings {
  margin-bottom: 20px;
}

#startBtn, #playAgain {
  padding: 10px 18px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

#startBtn:hover, #playAgain:hover {
  background: #005fcc;
}

.timer-bar {
  width: 100%;
  height: 6px;
  background: #00c853;
  margin-bottom: 10px;
  border-radius: 10px;
  transform-origin: left;
  transition: width linear;
}

.countdown {
  font-size: 90px;
  display: none;
  font-weight: bold;
  animation: pop 0.6s ease;
}

@keyframes pop {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#word {
  font-size: 32px;
  margin: 20px 0;
  font-weight: bold;
  animation: fadeIn 0.4s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

#input {
  font-size: 18px;
  width: 90%;
  padding: 12px;
  border: 2px solid #aaa;
  border-radius: 10px;
  transition: 0.2s;
}

#input.correct {
  border-color: #00c853;
  box-shadow: 0 0 10px #00c853;
}

#input.wrong {
  border-color: #ff5252;
  box-shadow: 0 0 10px #ff5252;
}

#playAgain {
  display: none;
  margin-top: 15px;
}

.info p {
  font-size: 18px;
  margin: 4px 0;
}
