body {
  font-family: sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
  touch-action: manipulation;
  scroll-behavior: smooth;
}

.overlay {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 90%;
}

.logo {
  position: relative;
  width: 100px;
  height: 100px;
  background: linear-gradient(to bottom, red 50%, white 50%);
  border: 4px solid black;
  border-radius: 20px;
  display: inline-block;
  vertical-align: middle;
}

.logo::after {
  content: "?";
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 32px;
  transform: translate(-50%, -50%);
  background: white;
  border: 3px solid black;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.logo-title {
  font-size: 28px;
  font-weight: bold;
}

.player-input label {
  font-family: sans-serif;
  font-size: 16px;
}

.player-input input {
  font-size: 16px;
  padding: 10px;
  width: 250px;
  margin-top: 10px;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 40px;
}

.game-button {
  background: gold;
  padding: 15px 25px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.1s;
  margin: 10px auto;
}

.game-button:hover {
  transform: scale(1.03);
}

.score-badge {
  background: white;
  color: black;
  border-radius: 50%;
  font-size: 14px;
  padding: 4px 8px;
  font-weight: bold;
  margin-left: 10px;
}

.score-display {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
  font-family: sans-serif;
}

.letter-box {
  display: inline-block;
  width: 30px;
  height: 40px;
  margin: 4px;
  border-bottom: 2px solid #333;
  font-size: 24px;
  text-align: center;
  vertical-align: bottom;
}

#letterContainer {
  margin-top: 20px;
  min-height: 60px;
}

#pokemonImage {
  max-width: 80vw;
  max-height: 40vh;
  object-fit: contain;
  margin: 20px 0;
}

.hint-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
}

.hint-button {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #eee;
  border: 1px solid #ccc;
}

.hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: auto;
  height: 1px;
  width: 1px;
  bottom: 0;
}

.blink {
  animation: blink 0.75s steps(1) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.feedback {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: bold;
  background: white;
  padding: 15px 25px;
  border-radius: 15px;
  color: green;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  animation: fadeout 2s forwards;
  text-align: center;
}

@keyframes fadeout {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%); }
}

.slide-in-right {
  animation: slideIn 0.5s forwards;
}

.slide-out-left {
  animation: slideOut 0.5s forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

@media screen and (max-width: 600px) {
  .game-button {
    width: 90%;
    font-size: 16px;
  }

  .letter-box {
    width: 24px;
    height: 36px;
    font-size: 20px;
  }

  #pokemonImage {
    max-height: 30vh;
  }

  .hint-button {
    font-size: 16px;
  }

  .score-display {
    font-size: 18px;
  }
}

html, body {
  overflow-x: hidden;
}
