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

/* ---------- setup accents ---------- */
.op .op-sign { font-size: 1.5rem; line-height: 1; font-weight: 700; }
.op .op-name { font-size: .9rem; font-weight: 500; opacity: .85; line-height: 1.1; }
.op-plus.on  { background: var(--mint);  box-shadow: 0 5px 0 var(--mint-d); }
.op-minus.on { background: var(--coral); box-shadow: 0 5px 0 var(--coral-d); }
.op-times.on { background: var(--grape); box-shadow: 0 5px 0 var(--grape-d); }
.op-div.on   { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 var(--sun-d); }

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

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

.problem-card {
  background: var(--card);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 5vh, 48px) 20px;
  margin: 10px 0 22px;
  text-align: center;
  border: 5px solid rgba(35,48,74,.06);
}
.problem-card.shake { animation: shake .45s ease; }

.problem-card.flash { animation: flash .5s ease; }
@keyframes flash {
  0% { background: #fff; }
  35% { background: #DFFCF3; }
  100% { background: #fff; }
}

.problem {
  font-size: clamp(2.4rem, min(11vw, 13vh), 5rem);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 20px);
  flex-wrap: wrap;
}
.problem .sign { color: var(--grape); }
.problem .eq { color: var(--ink-soft); }
.problem .qmark { color: var(--sky); }

@media (max-width: 620px) and (orientation: portrait) {
  .answers { grid-template-columns: 1fr; }
}

.answer {
  font-family: var(--font);
  font-size: clamp(1.7rem, min(6vw, 7vh), 2.6rem);
  font-weight: 700;
  color: #fff;
  background: var(--sky);
  border: none;
  border-radius: 26px;
  padding: clamp(14px, 3.4vh, 30px) 10px;
  cursor: pointer;
  box-shadow: 0 8px 0 var(--sky-d);
  transition: transform .1s ease, box-shadow .1s ease, background .2s ease;
  overflow-wrap: anywhere;
}
.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) {
  .op .op-sign { font-size: 1.15rem; }
  .op .op-name { font-size: .68rem; }
  .problem-card { margin: 6px 0 14px; border-radius: 26px; padding: clamp(14px, 4vh, 28px) 16px; }
  .answers { gap: 10px; }
  .feedback { margin-top: 10px; min-height: 2em; }
}

/* ---------- narrow phones in portrait ---------- */
@media (max-width: 480px) {
  .op .op-sign { font-size: 1.3rem; }
  .op .op-name { font-size: .8rem; }
}
