body {
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #2c3e50;
  color: #ecf0f1;
  margin: 0;
}

#game-container {
  text-align: center;
}

#target-word {
  font-size: 3em;
  letter-spacing: 5px;
  margin-bottom: 20px;
  font-family: monospace;
}

#target-word span.correct {
  color: #2ecc71;
}

#japanese-word {
  font-size: 1.5em;
  color: #bdc3c7;
  margin-bottom: 10px;
}

.hidden {
  display: none;
}

#result-container h2 {
  font-size: 2.5em;
  color: #f1c40f;
}

#result-container p {
  font-size: 1.2em;
}

#retry-button {
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  background-color: #3498db;
  border: none;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#retry-button:hover {
  background-color: #2980b9;
}

#hidden-input {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  width: 0;
  height: 0;
  border: none;
  padding: 0;
  margin: 0;
}

#celebration {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  animation: rainbow-text 2s linear infinite, pulse 1s ease-in-out infinite;
}

@keyframes rainbow-text {
  0%{ color: #ff0000; }
  15%{ color: #ff7f00; }
  30%{ color: #ffff00; }
  45%{ color: #00ff00; }
  60%{ color: #0000ff; }
  75%{ color: #4b0082; }
  90%{ color: #8f00ff; }
  100%{ color: #ff0000; }
}

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

@media (max-width: 768px) {
  body {
    align-items: flex-start;
    padding-top: 50px;
  }

  #target-word {
    font-size: 2em;
  }

  #japanese-word {
    font-size: 1.2em;
  }
}
