/* ==================================================================
   kid.css — alles, was Milio zu sehen bekommt
   Grundsätze: große Flächen, wenig Text, klare Farben, Touch zuerst.
   ================================================================== */

.kid-app {
  background:
    radial-gradient(1200px 500px at 10% -10%, #dff3ff 0%, transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, #ffeede 0%, transparent 55%),
    var(--c-bg);
}

/* ------------------------------------------------------------------
   Hub-Kopf
   ------------------------------------------------------------------ */

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.hub-profile {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--c-surface);
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 20px 8px 8px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.hub-profile__avatar {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--c-bg);
  border-radius: 50%;
}

.hub-profile__name { font-size: 1.35rem; font-weight: 900; }

.hub-stats { display: flex; gap: var(--sp-3); }

.stat-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-surface);
  border-radius: var(--r-pill);
  padding: 10px 18px;
  box-shadow: var(--shadow-sm);
  font-weight: 900;
  font-size: 1.2rem;
}

.stat-chip__icon { font-size: 1.4rem; }
.stat-chip--stars { color: #d99100; }
.stat-chip--level { color: var(--c-purple); }

/* ------------------------------------------------------------------
   Level-Fortschritt
   ------------------------------------------------------------------ */

.hub-level-bar {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  margin-top: var(--sp-4);
}

.hub-level-bar__label {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  margin-bottom: var(--sp-2);
  color: var(--c-ink-soft);
}

.hub-heading {
  font-size: 1.4rem;
  margin: var(--sp-6) 0 var(--sp-4);
}

/* ------------------------------------------------------------------
   Spiele-Kacheln
   ------------------------------------------------------------------ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
  background: var(--c-surface);
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4) var(--sp-6);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.game-card:hover { transform: translateY(-4px); border-color: var(--c-blue); }
.game-card:active { transform: translateY(0) scale(.97); }

.game-card__emoji { font-size: 3rem; }
.game-card__title { font-size: 1.15rem; font-weight: 900; }
.game-card__desc { font-size: .88rem; color: var(--c-ink-soft); line-height: 1.35; }

.game-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--c-yellow);
  color: #6b4c00;
  font-size: .72rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}

.game-card.is-limited { opacity: .75; }

/* ------------------------------------------------------------------
   Sticker- / Gutschein-Kacheln auf dem Hub
   ------------------------------------------------------------------ */

.hub-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.tile {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--c-surface);
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
}

.tile__emoji { font-size: 2.4rem; }
.tile__label { font-weight: 900; font-size: 1.05rem; flex: 1; }
.tile__meta { font-weight: 900; color: var(--c-ink-soft); }

.tile.is-highlighted {
  border-color: var(--c-green);
  animation: glow 1.6s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(126, 217, 87, .5); }
  50% { box-shadow: 0 0 0 12px rgba(126, 217, 87, 0); }
}

.hub-footer { margin-top: var(--sp-6); text-align: center; }

/* ------------------------------------------------------------------
   Unterseiten-Kopf
   ------------------------------------------------------------------ */

.sub-header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.sub-header__back {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-ink);
}

.sub-header__title { font-size: 1.5rem; }
.sub-header__hint { color: var(--c-ink-soft); font-weight: 700; margin: var(--sp-3) 0 var(--sp-5); }

/* ------------------------------------------------------------------
   Spielbildschirm
   ------------------------------------------------------------------ */

.screen--game { padding: 0; max-width: none; }

.game {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}

.game__header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.game__exit {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--c-ink-soft);
  flex-shrink: 0;
}

.game__progress {
  flex: 1;
  height: 16px;
  background: var(--c-line);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.game__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-blue), var(--c-green));
  transition: width .4s ease;
}

.game__score {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 900;
  font-size: 1.3rem;
  color: #d99100;
}

.game__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
}

.game__question {
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  font-weight: 900;
  text-align: center;
}

.game__picture { font-size: clamp(4rem, 18vw, 8rem); line-height: 1; }
.game__big-text {
  font-size: clamp(2.5rem, 12vw, 5rem);
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--c-ink);
}

.game__helpers { display: flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }

.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-surface);
  border: 2px solid var(--c-line);
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
  color: var(--c-ink);
}

.btn-replay__icon { font-size: 1.2rem; }

/* --- Buchstabenkarte --- */

.letter-card {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--sp-4);
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-5) var(--sp-7);
}

.letter-card__glyph {
  font-size: clamp(5rem, 25vw, 11rem);
  font-weight: 900;
  line-height: 1;
  color: var(--c-blue);
}

.letter-card__lower {
  font-size: clamp(3rem, 15vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: var(--c-orange);
}

/* --- Wortkarte --- */

.word-card {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  justify-content: center;
}

.word-card__char {
  font-size: clamp(2.2rem, 9vw, 4rem);
  font-weight: 900;
  background: var(--c-surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 8px 14px;
  min-width: 1.2em;
  text-align: center;
}

/* --- Auswahlknöpfe --- */

.choice-grid {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
  max-width: 640px;
}

.choice-grid--2 { grid-template-columns: repeat(2, 1fr); }
.choice-grid--3 { grid-template-columns: repeat(3, 1fr); }
.choice-grid--4 { grid-template-columns: repeat(2, 1fr); }

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 120px;
  background: var(--c-surface);
  border: 4px solid transparent;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}

.choice:active { transform: scale(.95); }
.choice__emoji { font-size: clamp(2.5rem, 10vw, 4rem); }
.choice__label { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 900; }

.choice.is-correct {
  border-color: var(--c-ok);
  background: #eaf9ee;
  animation: pop .4s ease;
}

.choice.is-wrong {
  border-color: var(--c-error);
  background: #fdecea;
  animation: shake .4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* --- Silben-Spiel --- */

.blend__slots {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}

.blend__slot {
  min-width: 90px;
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 4px dashed var(--c-line);
  border-radius: var(--r-md);
  font-size: 2rem;
  font-weight: 900;
  background: rgba(255, 255, 255, .6);
}

.blend__slot.is-filled {
  border-style: solid;
  border-color: var(--c-green);
  background: #eaf9ee;
  animation: pop .35s ease;
}

.blend__tiles {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}

.blend__tile {
  border: none;
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
  border-radius: var(--r-md);
  padding: 16px 24px;
  font-size: 1.8rem;
  font-weight: 900;
  cursor: pointer;
  color: var(--c-ink);
}

.blend__tile.is-used { opacity: .3; cursor: default; }
.blend__tile.is-wrong { animation: shake .4s ease; background: #fdecea; }

/* --- Mikrofon --- */

.mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
}

.mic-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, var(--c-pink), #e8456f);
  color: #fff;
  box-shadow: 0 8px 0 #c93659, var(--shadow-md);
  cursor: pointer;
  transition: transform .12s ease;
}

.mic-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #c93659; }
.mic-btn__icon { font-size: 3rem; }
.mic-btn__label { font-size: 1rem; font-weight: 900; }

.mic-btn.is-listening {
  background: linear-gradient(180deg, var(--c-green), #4fae33);
  box-shadow: 0 8px 0 #3f8f28, var(--shadow-md);
  animation: pulse 1.1s ease-in-out infinite;
}

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

.mic-area__status { font-weight: 700; color: var(--c-ink-soft); text-align: center; min-height: 1.4em; }
.mic-area__note { color: var(--c-ink-soft); text-align: center; font-weight: 700; max-width: 420px; }

/* --- Rückmeldung --- */

.game__feedback { min-height: 90px; display: grid; place-items: center; }

.game__result {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-weight: 900;
  font-size: 1.15rem;
  animation: pop .35s ease;
}

.game__result--ok { background: #eaf9ee; color: #1c7a35; }
.game__result--nope { background: #fff4e5; color: #96601a; }
.game__result-emoji { font-size: 1.8rem; }

.game__teach {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-6);
  box-shadow: var(--shadow-sm);
}

.game__teach-label { color: var(--c-ink-soft); font-weight: 700; }
.game__teach-answer { font-size: 2.2rem; font-weight: 900; color: var(--c-blue); }

/* ------------------------------------------------------------------
   Auswertung
   ------------------------------------------------------------------ */

.card--summary { max-width: 520px; }

.summary-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  font-size: 2.6rem;
  font-weight: 900;
  color: #d99100;
}

.summary-list { margin-top: var(--sp-4); display: grid; gap: var(--sp-2); text-align: left; }

.summary-list__item {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--c-bg);
  border-radius: var(--r-sm);
  font-weight: 700;
}

.summary-highlight {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  font-weight: 800;
  text-align: left;
}

.summary-highlight--level { background: #f3e8ff; color: #6b21a8; }
.summary-highlight--stickers { background: #fff8e1; color: #8a6100; flex-direction: column; align-items: flex-start; }
.summary-highlight--voucher { background: #eaf9ee; color: #1c7a35; }
.summary-highlight__emoji { font-size: 2rem; }

.summary-stickers { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.summary-sticker { font-size: 2.4rem; animation: pop .5s ease; }

/* ------------------------------------------------------------------
   Sticker-Album
   ------------------------------------------------------------------ */

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-4);
}

.sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-surface);
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-2);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sticker__emoji { font-size: 2.8rem; }
.sticker__name { font-size: .8rem; font-weight: 800; text-align: center; color: var(--c-ink-soft); }

.sticker.is-owned {
  border-color: var(--c-yellow);
  background: linear-gradient(180deg, #fffdf5, #fff8e1);
}

.sticker.is-locked { opacity: .55; filter: grayscale(1); }

/* ------------------------------------------------------------------
   Gutscheine
   ------------------------------------------------------------------ */

.reward-list { display: grid; gap: var(--sp-4); }

.reward {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--c-surface);
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.reward__emoji { font-size: 3rem; flex-shrink: 0; }
.reward__body { flex: 1; display: grid; gap: var(--sp-2); }
.reward__title { font-size: 1.2rem; }
.reward__status { font-weight: 800; color: var(--c-ink-soft); font-size: .95rem; }
.reward__meta { font-size: .85rem; color: var(--c-ink-soft); font-weight: 700; }

.reward.is-ready {
  border-color: var(--c-green);
  background: linear-gradient(180deg, #f6fff8, #eaf9ee);
}

.reward.is-ready .reward__status { color: #1c7a35; }
.reward.is-redeemed { opacity: .6; }

/* ------------------------------------------------------------------
   Kleine Bildschirme
   ------------------------------------------------------------------ */

@media (max-width: 520px) {
  .hub-header { justify-content: center; }
  .game-grid { grid-template-columns: 1fr 1fr; }
  .game-card { padding: var(--sp-4) var(--sp-2) var(--sp-5); }
  .game-card__desc { display: none; }
  .choice-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .letter-card { padding: var(--sp-4); }
  .mic-btn { width: 130px; height: 130px; }
}
