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

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

.game-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.header {
  text-align: center;
  margin-bottom: 10px;
}

.header h1 {
  font-size: 2rem;
  color: #ff6f00;
  text-shadow: 2px 2px 0 rgba(255, 160, 0, 0.3);
  margin-bottom: 6px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 1.1rem;
  color: #555;
}

.stats strong {
  color: #1565c0;
}

.prompt {
  text-align: center;
  font-size: 1.4rem;
  color: #6a1b9a;
  font-weight: 600;
  margin-bottom: 10px;
}

.display-area {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  min-height: 220px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 20px;
  justify-items: center;
  align-items: center;
  border: 3px dashed #ce93d8;
  margin-bottom: 16px;
}

.object-item {
  font-size: 2.6rem;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  user-select: none;
  line-height: 1;
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.answers {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.answer-btn {
  min-width: 90px;
  height: 68px;
  font-size: 2rem;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.answer-btn:hover {
  transform: scale(1.08);
}

.answer-btn:active {
  transform: scale(0.95);
}

.answer-btn.color-0 {
  background: linear-gradient(135deg, #42a5f5, #1565c0);
}

.answer-btn.color-1 {
  background: linear-gradient(135deg, #ab47bc, #7b1fa2);
}

.answer-btn.color-2 {
  background: linear-gradient(135deg, #66bb6a, #2e7d32);
}

.answer-btn.correct {
  background: linear-gradient(135deg, #66bb6a, #2e7d32) !important;
  animation: correctPulse 0.6s ease;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.answer-btn.wrong {
  animation: shake 0.5s ease;
}

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

.answer-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.feedback {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  min-height: 44px;
  transition: opacity 0.3s;
}

.feedback.correct-text {
  color: #2e7d32;
}

.feedback.wrong-text {
  color: #c62828;
}

/* End screen */
.end-screen {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: fadeIn 0.5s ease;
}

.end-screen.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.end-content {
  text-align: center;
  padding: 32px;
}

.end-emoji {
  font-size: 4rem;
  margin-bottom: 12px;
}

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

.end-content p {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 24px;
}

.play-again-btn {
  background: linear-gradient(135deg, #ff7043, #e64a19);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 40px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(230, 74, 25, 0.4);
  transition: transform 0.15s;
}

.play-again-btn:hover {
  transform: scale(1.06);
}

.play-again-btn:active {
  transform: scale(0.95);
}

@media (max-width: 420px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .object-item {
    font-size: 2rem;
  }

  .answer-btn {
    min-width: 75px;
    height: 60px;
    font-size: 1.6rem;
  }

  .display-area {
    min-height: 180px;
    padding: 14px;
    gap: 6px;
  }
}
