* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #a8e6cf, #dcedc1, #ffd3b6);
  min-height: 100vh;
  color: #333;
  font-size: 20px;
}
.screen { display: none; padding: 16px; max-width: 900px; margin: 0 auto; }
.screen.active { display: block; }
.card {
  background: #fff; border-radius: 24px; padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); text-align: center;
  margin-top: 40px;
}
h1 { font-size: 2.2em; }
h2 { text-align: center; }
input {
  font-size: 20px; padding: 12px; border-radius: 12px;
  border: 2px solid #ccc; width: 80%; margin: 8px;
}
.big-btn {
  font-size: 22px; padding: 16px 32px; border-radius: 16px;
  border: none; background: #4caf50; color: #fff; cursor: pointer;
  margin-top: 16px; box-shadow: 0 4px 0 #2e7d32;
}
.big-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #2e7d32; }
.icon-btn {
  font-size: 24px; background: #fff; border: 2px solid #ccc;
  border-radius: 12px; padding: 6px 12px; cursor: pointer;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; padding: 10px; border-radius: 16px; margin-bottom: 12px;
  flex-wrap: wrap; gap: 8px;
}
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.avatar-btn {
  font-size: 36px; padding: 8px; border: 3px solid transparent;
  border-radius: 12px; background: #f5f5f5; cursor: pointer;
}
.avatar-btn.selected { border-color: #4caf50; background: #e8f5e9; }
.worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.world-card {
  background: #fff; border-radius: 20px; padding: 20px; text-align: center;
  cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.world-card.locked { opacity: .4; cursor: not-allowed; }
.world-card .icon { font-size: 48px; }
.levels { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.level-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #e0e0e0; font-size: 18px; cursor: pointer;
}
.level-btn.unlocked { background: #81c784; color: #fff; }
.level-btn.done { background: #ffb74d; }
.level-btn.locked { opacity: .3; cursor: not-allowed; }
.question-area {
  background: #fff; border-radius: 20px; padding: 24px;
  text-align: center; font-size: 28px; margin-bottom: 12px;
  min-height: 80px;
}
.options-area { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option-btn {
  font-size: 24px; padding: 20px; border-radius: 16px;
  border: 3px solid #ddd; background: #fff; cursor: pointer;
}
.option-btn.correct { background: #c8e6c9; border-color: #4caf50; }
.option-btn.wrong { background: #ffcdd2; border-color: #e53935; }
.numeric-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-width: 320px; margin: 0 auto;
}
.numeric-pad button {
  font-size: 26px; padding: 16px; border-radius: 12px;
  border: none; background: #e3f2fd; cursor: pointer;
}
.numeric-pad .submit { background: #4caf50; color: #fff; grid-column: span 3; }
.numeric-display { font-size: 32px; text-align: center; margin: 8px; min-height: 40px; grid-column: span 3; font-size: 40px; font-weight: bold; }
.mascot { font-size: 40px; text-align: center; margin-top: 4px; }
.mascot-msg { text-align: center; font-size: 20px; color: #555; min-height: 24px; }
.feedback { text-align: center; font-size: 22px; min-height: 30px; margin: 8px 0; white-space: pre-line; }
.stars { font-size: 40px; }
.drag-area { display: flex; gap: 16px; justify-content: space-around; flex-wrap: wrap; }
.drag-item, .drop-zone {
  padding: 12px 16px; border-radius: 12px; background: #fff3e0;
  border: 2px dashed #ffb74d; font-size: 22px; cursor: grab;
  min-width: 60px; text-align: center;
}
.drop-zone { background: #e8f5e9; border-style: solid; min-height: 50px; }
.match-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 6px 0; flex-wrap: wrap; }
.hidden { display: none !important; }
#confetti { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }
@media (max-width: 600px) {
  body { font-size: 18px; }
  .question-area { font-size: 24px; }
  .option-btn { font-size: 20px; padding: 14px; }
}
