* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif;
  background: linear-gradient(135deg, #fce4ec 0%, #e3f2fd 50%, #fff9c4 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
}

.game-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 20px;
}

h1 {
  font-size: 2rem;
  color: #ff6f00;
  text-shadow: 2px 2px 0 #ffe082;
  margin-bottom: 12px;
}

.status-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 1.1rem;
  color: #5d4037;
  margin-bottom: 16px;
}

.status-bar strong {
  color: #e65100;
}

/* Emoji hint */
.hint-area {
  margin-bottom: 16px;
}

.emoji-hint {
  font-size: 80px;
  line-height: 1.2;
  display: inline-block;
  animation: gentle-bounce 2s ease-in-out infinite;
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Letter slots */
.slots-area {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  min-height: 70px;
}

.letter-slot {
  width: 60px;
  height: 60px;
  border: 3px dashed #b0bec5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #37474f;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.letter-slot.filled {
  border: 3px solid #66bb6a;
  background: #e8f5e9;
  animation: pop-in 0.3s ease;
}

.letter-slot.complete {
  border-color: #43a047;
  background: #c8e6c9;
  animation: celebrate 0.5s ease;
}

@keyframes pop-in {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes celebrate {
  0% { transform: scale(1); }
  25% { transform: scale(1.2) rotate(-5deg); }
  50% { transform: scale(1.2) rotate(5deg); }
  75% { transform: scale(1.1) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

.slots-area.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* Feedback */
.feedback {
  font-size: 1.3rem;
  font-weight: bold;
  min-height: 36px;
  margin-bottom: 16px;
  color: #43a047;
}

/* Letter choices */
.choices-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.letter-choice {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 14px;
  font-size: 1.8rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.letter-choice:active {
  transform: scale(0.9);
}

.letter-choice.used {
  opacity: 0.3;
  transform: scale(0.85);
  pointer-events: none;
}

.letter-choice.bounce-back {
  animation: bounce-back 0.4s ease;
}

@keyframes bounce-back {
  0% { transform: scale(0.85); opacity: 0.3; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* Letter button colors */
.letter-choice:nth-child(6n+1) { background: #ef5350; }
.letter-choice:nth-child(6n+2) { background: #42a5f5; }
.letter-choice:nth-child(6n+3) { background: #66bb6a; }
.letter-choice:nth-child(6n+4) { background: #ffa726; }
.letter-choice:nth-child(6n+5) { background: #ab47bc; }
.letter-choice:nth-child(6n+6) { background: #26c6da; }

/* Overlay / completion screen */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.overlay.active {
  display: flex;
}

.overlay-content {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.overlay-content .star {
  font-size: 60px;
  margin-bottom: 12px;
}

.overlay-content h2 {
  font-size: 1.8rem;
  color: #ff6f00;
  margin-bottom: 8px;
}

.overlay-content p {
  font-size: 1.1rem;
  color: #5d4037;
  margin-bottom: 20px;
}

.play-again-btn {
  background: #ff6f00;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px 36px;
  font-size: 1.3rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  touch-action: manipulation;
}

.play-again-btn:hover {
  background: #e65100;
}

@media (max-width: 400px) {
  h1 { font-size: 1.5rem; }
  .emoji-hint { font-size: 64px; }
  .letter-slot, .letter-choice { width: 50px; height: 50px; font-size: 1.5rem; }
}
