/* ============================================================
   Črke — game specific styles.
   Panels, chips, buttons, game bar and score chips are shared
   and live in assets/kids.css
   ============================================================ */

/* ---------- setup accents ---------- */
#lengths .chip.on { background: var(--mint); box-shadow: 0 5px 0 var(--mint-d); }
#cases .chip { letter-spacing: .5px; }
#cases .chip.on { background: var(--grape); box-shadow: 0 5px 0 var(--grape-d); }
.case-low { text-transform: lowercase; }

/* ---------- game screen ---------- */
.score-chip.current .val { color: var(--mint-d); }
.score-chip.best .val { color: var(--sun-d); }

#game .word-card { margin-top: auto; }
#game .feedback { margin-bottom: auto; }

.word-card {
  background: var(--card);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 4.5vh, 44px) 16px;
  margin: 10px 0 22px;
  border: 5px solid rgba(35,48,74,.06);
}
.word-card.shake { animation: shake .45s ease; }

.word {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 1.2vw, 12px);
  font-weight: 700;
  line-height: 1;
}

.letter {
  font-size: clamp(2rem, min(11vw, 11vh), 4.4rem);
  min-width: .72em;
  text-align: center;
}

.slot {
  font-size: clamp(2rem, min(11vw, 11vh), 4.4rem);
  min-width: .95em;
  text-align: center;
  border-bottom: .1em solid var(--sky);
  color: var(--sky);
  border-radius: 6px;
  background: rgba(77,150,255,.09);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.slot.filled {
  animation: dropIn .4s cubic-bezier(.2,.9,.3,1.5);
  background: rgba(33,199,168,.16);
  border-bottom-color: var(--mint-d);
  color: var(--mint-d);
}
.slot.filled.bad {
  background: rgba(255,107,107,.16);
  border-bottom-color: var(--coral-d);
  color: var(--coral-d);
}
@keyframes dropIn {
  from { transform: translateY(-26px) scale(.6); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.meaning {
  text-align: center;
  margin-top: 10px;
  font-size: clamp(1rem, 2.6vh, 1.35rem);
  font-weight: 600;
  color: var(--ink-soft);
  min-height: 1.5em;
}
#langs .chip.on { background: var(--sky); box-shadow: 0 5px 0 var(--sky-d); }

/* ---------- letter buttons ---------- */

.answer {
  font-family: var(--font);
  font-size: clamp(2rem, min(7vw, 8vh), 3rem);
  font-weight: 700;
  color: #fff;
  background: var(--sky);
  border: none;
  border-radius: 26px;
  padding: clamp(12px, 3.2vh, 26px) 10px;
  cursor: pointer;
  box-shadow: 0 8px 0 var(--sky-d);
  transition: transform .1s ease, box-shadow .1s ease, background .2s ease;
}
.answer:nth-child(2) { background: var(--grape); box-shadow: 0 8px 0 var(--grape-d); }
.answer:nth-child(3) { background: var(--coral); box-shadow: 0 8px 0 var(--coral-d); }
.answer:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.answer.correct { background: var(--mint) !important; box-shadow: 0 8px 0 var(--mint-d) !important; animation: pop .45s ease; }
.answer.wrong   { background: #C6CEDD !important; box-shadow: 0 8px 0 #A6B0C2 !important; }

.feedback {
  text-align: center;
  margin-top: 18px;
  min-height: 2.4em;
  font-size: clamp(1.15rem, 3.4vh, 1.7rem);
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- phones turned sideways ---------- */
@media (orientation: landscape) and (max-height: 560px) {
  .word-card { margin: 6px 0 14px; border-radius: 26px; }
  .answers { gap: 10px; }
  .feedback { margin-top: 10px; min-height: 2em; }
}

@media (orientation: landscape) and (max-height: 380px) {
  .word-card { padding: 8px 10px; margin: 4px 0 8px; border-radius: 18px; }
  .letter, .slot { font-size: clamp(1.3rem, 9vh, 2rem); }
  .meaning { font-size: .85rem; min-height: 1.2em; margin-top: 4px; }
  .answer { font-size: clamp(1.2rem, 7vh, 1.8rem); padding: 6px 4px; border-radius: 16px; }
  .feedback { margin-top: 6px; min-height: 1.3em; font-size: .9rem; }
}
