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

body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  background: linear-gradient(135deg, #fce4ec, #e8eaf6, #e0f7fa);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.screen { display: none; flex-direction: column; align-items: center; text-align: center; padding: 2rem; width: 100%; max-width: 600px; }
.screen.active { display: flex; }

h1 {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 3rem;
  color: #6a1b9a;
  text-shadow: 2px 2px 0 #ce93d8;
  margin-bottom: 0.3rem;
}

.subtitle { font-size: 1.3rem; color: #7e57c2; margin-bottom: 1.5rem; font-weight: 700; }

/* MASCOTTE */
.mascot {
  font-size: 5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: transform 0.3s;
  animation: float 3s ease-in-out infinite;
}
.mascot.big { font-size: 7rem; }
.mascot.happy { animation: bounce 0.5s ease; }
.mascot.sad { animation: shake 0.4s ease; }

/* BOUTONS */
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  border: none;
  border-radius: 1.2rem;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.15); }

.level-buttons { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.btn-easy { background: linear-gradient(135deg, #66bb6a, #43a047); }
.btn-medium { background: linear-gradient(135deg, #ffa726, #fb8c00); }
.btn-hard { background: linear-gradient(135deg, #ef5350, #e53935); }
.btn-replay { background: linear-gradient(135deg, #7e57c2, #5e35b1); font-size: 1.4rem; margin-top: 1.5rem; }

.btn small { font-weight: 400; font-size: 0.85rem; }

/* GAME HEADER */
.game-header {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; margin-bottom: 0.5rem; font-weight: 900; font-size: 1.2rem; color: #5e35b1;
}
.combo { color: #e65100; min-width: 80px; text-align: right; }

/* TIMER */
.timer-bar {
  width: 100%; height: 12px; background: #e0e0e0; border-radius: 6px;
  overflow: hidden; margin-bottom: 1rem;
}
.timer-fill {
  height: 100%; width: 100%; background: linear-gradient(90deg, #66bb6a, #ffee58, #ef5350);
  border-radius: 6px; transition: width 0.3s linear;
}

/* QUESTION */
.question {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 2.8rem; color: #4a148c;
  background: #fff; border-radius: 1.5rem; padding: 1rem 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08); margin-bottom: 1.2rem; min-width: 250px;
}

/* RÉPONSES */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; }

.answer-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem; font-weight: 900;
  border: none; border-radius: 1.2rem; padding: 1.2rem;
  cursor: pointer; color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
  transition: transform 0.12s, opacity 0.3s;
}
.answer-btn:active { transform: translateY(2px); }
.answer-btn.correct { animation: bounce 0.5s ease; opacity: 1 !important; }
.answer-btn.wrong { animation: shake 0.4s ease; opacity: 0.5; }
.answer-btn:nth-child(1) { background: linear-gradient(135deg, #42a5f5, #1e88e5); }
.answer-btn:nth-child(2) { background: linear-gradient(135deg, #ab47bc, #8e24aa); }
.answer-btn:nth-child(3) { background: linear-gradient(135deg, #ff7043, #f4511e); }
.answer-btn:nth-child(4) { background: linear-gradient(135deg, #26a69a, #00897b); }

/* FEEDBACK */
.feedback {
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.6rem; min-height: 2.5rem; margin-top: 0.8rem; color: #4a148c;
}

/* RÉSULTAT */
.result-stars { font-size: 2.5rem; margin: 0.5rem 0; letter-spacing: 0.3rem; }
.result-score { font-size: 1.4rem; font-weight: 900; color: #5e35b1; }
.result-message { font-size: 1.2rem; color: #7e57c2; margin-top: 0.5rem; max-width: 400px; }
h2 { font-family: 'Bubblegum Sans', cursive; font-size: 2.5rem; color: #6a1b9a; }

/* ANIMATIONS */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* RESPONSIVE */
@media (max-width: 500px) {
  h1 { font-size: 2.2rem; }
  .question { font-size: 2rem; padding: 0.8rem 1.5rem; }
  .answer-btn { font-size: 1.4rem; padding: 1rem; }
  .mascot { font-size: 4rem; }
}
