* { margin: 0; padding: 0; box-sizing: border-box; }

:root { --tw: 40px; --th: 51px; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(160deg, #c9ecf7 0%, #a9e8e0 45%, #ffeccb 100%);
  color: #1f4652;
}

#app {
  height: 100vh;        /* fallback pre staršie prehliadače bez dvh */
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* dole je rezervované miesto pre pevne ukotvenú lištu */
  padding: max(8px, env(safe-area-inset-top)) 8px calc(52px + max(10px, env(safe-area-inset-bottom)));
  gap: 10px;
  overflow: hidden;
}

#hud { flex-shrink: 0; }

/* ---------- HUD ---------- */
#hud { width: min(94vw, 520px); }

.hud-row { display: flex; gap: 8px; align-items: stretch; }

.hud-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 8px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(30, 120, 150, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 66px;
}

.hud-wide { flex: 1; }

.hud-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4a8ba0;
}

.hud-value { font-size: 22px; font-weight: 800; line-height: 1.2; }

.hud-target { font-size: 13px; font-weight: 800; color: #e8574a; }

.progress {
  height: 8px;
  border-radius: 999px;
  background: #d6edf2;
  margin: 4px 0 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb347, #ff6f61);
  transition: width 0.35s ease;
}

/* ---------- kôpka ---------- */
#board-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}


/* ---------- plocha (rozmery nastavuje JS – každý level je iný) ---------- */
#board {
  position: relative;
  touch-action: none;
  margin: 0 auto;
}

/* podklad jedného hracieho políčka */
.cell {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.55);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* šachovnica je teplá (biela/oranžová) – modrá splývala s modrými ikonkami */
.cell.dark { background: rgba(255, 196, 120, 0.42); }

/* cieľové políčko = hlavná úloha.
 * Fialová je jediná farba, ktorú nemá žiadna z ikoniek (tie sú modré,
 * zelené, žlté a oranžové) ani teplé pozadie – preto nesplýva. */
.cell.jel1 {
  background: linear-gradient(160deg, #c99bf0, #9b57d6);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), 0 0 10px rgba(150, 80, 210, 0.5);
}

.cell.jel2 {
  background: linear-gradient(160deg, #8b46c9, #5c2a91);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 12px rgba(110, 50, 170, 0.6);
}

/* posledné kúsky cieľa pulzujú, nech ich hráčka nájde */
.cell.jelhunt { animation: jelHunt 1.1s ease-in-out infinite; }

@keyframes jelHunt {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), 0 0 8px rgba(150, 80, 210, 0.5); }
  50% { box-shadow: inset 0 0 0 3px #fff, 0 0 20px 6px rgba(190, 110, 255, 0.95); }
}

.cell.jelpop { animation: jelPop 0.4s ease; }

@keyframes jelPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); filter: brightness(1.5); }
  100% { transform: scale(1); }
}

/* ---------- betón ---------- */
.wall {
  position: absolute;
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: calc(var(--s) * 0.5);
  background: linear-gradient(160deg, #cfd8dc, #8b9aa3);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 3px 8px rgba(30, 60, 80, 0.3);
  z-index: 3;
}

.wall[data-hp="2"] { background: linear-gradient(160deg, #b0bec5, #6b7b85); }
.wall[data-hp="3"] { background: linear-gradient(160deg, #90a4ae, #4d5c66); }

.wall.hit { animation: wallHit 0.32s ease; }

@keyframes wallHit {
  0% { transform: scale(1); }
  30% { transform: scale(1.14) rotate(-4deg); filter: brightness(1.6); }
  100% { transform: scale(1); }
}

.wall.gone { animation: wallGone 0.3s ease forwards; }

@keyframes wallGone {
  to { transform: scale(0.2) rotate(15deg); opacity: 0; }
}

/* ---------- riasy ---------- */
.algae {
  position: absolute;
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: calc(var(--s) * 0.52);
  background: linear-gradient(160deg, rgba(60, 170, 110, 0.92), rgba(24, 110, 70, 0.95));
  box-shadow: inset 0 0 0 2px rgba(190, 245, 210, 0.6);
  z-index: 4;
  animation: algaeIn 0.35s ease;
}

@keyframes algaeIn {
  from { transform: scale(0.3); opacity: 0; }
}

.algae.gone { animation: algaeGone 0.3s ease forwards; }

@keyframes algaeGone {
  to { transform: scale(0.2) rotate(-20deg); opacity: 0; }
}

/* ---------- dopravník ---------- */
.cell.belt {
  background: repeating-linear-gradient(45deg, rgba(255, 214, 140, 0.85) 0 8px, rgba(255, 235, 190, 0.85) 8px 16px);
  box-shadow: inset 0 0 0 2px rgba(255, 175, 70, 0.65);
}

.belt-ico {
  position: absolute;
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--s) * 0.32);
  color: #d97b1a;
  opacity: 0.75;
  pointer-events: none;
  z-index: 1;
}

/* ---------- teleport ----------
 * Značka musí byť NAD kúskami: keď bola pod nimi, ikonka ju prekryla a
 * hráčka vôbec netušila, že tam teleport je. Preto rožný odznak so šípkou
 * dnu (vstup) a von (výstup). */
.port {
  position: absolute;
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1px;
  pointer-events: none;
  z-index: 6;
}

.port-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--s) * 0.42);
  height: calc(var(--s) * 0.42);
  border-radius: 50%;
  background: #12a3bd;
  color: #fff;
  font-size: calc(var(--s) * 0.3);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(10, 70, 90, 0.5), inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.port.port-out .port-badge { background: #f2823c; }

.cell.port-cell {
  background: radial-gradient(circle at 50% 50%, rgba(120, 220, 235, 0.6), rgba(255, 252, 246, 0.55) 70%);
  box-shadow: inset 0 0 0 2px rgba(30, 170, 195, 0.7);
}

.cell.port-flash { animation: portFlash 0.5s ease; }

@keyframes portFlash {
  0% { box-shadow: inset 0 0 0 2px rgba(30, 170, 195, 0.7); }
  35% { box-shadow: inset 0 0 0 3px #fff, 0 0 18px 5px rgba(60, 220, 245, 0.95); }
  100% { box-shadow: inset 0 0 0 2px rgba(30, 170, 195, 0.7); }
}

/* kúsok, ktorý práve vypadol z teleportu */
.tile.tp-in .fruit { animation: tpIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes tpIn {
  0% { transform: scale(0.15) rotate(-180deg); opacity: 0.2; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ---------- nápoveda ---------- */
.tile.hint .fruit { animation: hintPulse 0.65s ease-in-out infinite; }

@keyframes hintPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.32); filter: brightness(1.4); }
}

/* ---------- cieľový banner ---------- */
#goal-banner {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 80;
  width: min(88vw, 380px);
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 14px 40px rgba(20, 110, 145, 0.35);
  text-align: center;
  pointer-events: none;
  animation: gbIn 0.35s ease;
}

#goal-banner.hidden { display: none; }

@keyframes gbIn {
  from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
}

.gb-level { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #4a8ba0; }
.gb-goal { font-size: 26px; font-weight: 900; color: var(--pink); margin: 4px 0 2px; line-height: 1.15; }
.gb-sub { font-size: 15px; font-weight: 700; color: #1f4652; }
.gb-hint { font-size: 13px; color: #5c8595; margin-top: 6px; }

.ver-line { font-size: 11px; color: #8fb0bd; margin: 2px 0 8px; }

.tile {
  position: absolute;
  top: 0; left: 0;
  width: var(--s);
  height: var(--s);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: transform;
}

.fruit {
  font-size: calc(var(--s) * 0.64);
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(15, 85, 110, 0.35));
  transition: transform 0.15s ease;
  pointer-events: none;
}

.tile.sel .fruit {
  transform: scale(1.22);
  animation: wiggle 0.5s ease-in-out infinite alternate;
}

@keyframes wiggle {
  from { rotate: -8deg; }
  to { rotate: 8deg; }
}

.tile.pop .fruit {
  animation: pop 0.24s ease-in forwards;
}

@keyframes pop {
  40% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}

.tile.born .fruit {
  animation: born 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes born {
  0% { transform: scale(0); }
  70% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- Special tiles: pásikavé (riadok/stĺpec) ---------- */
.tile.sp-h::before {
  content: "";
  position: absolute;
  left: 2%; right: 2%; top: 20%; bottom: 20%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95), rgba(255, 200, 90, 0.4) 65%, transparent 78%);
  animation: glow 1s ease-in-out infinite alternate;
}

.tile.sp-v::before {
  content: "";
  position: absolute;
  top: 2%; bottom: 2%; left: 20%; right: 20%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95), rgba(255, 200, 90, 0.4) 65%, transparent 78%);
  animation: glow 1s ease-in-out infinite alternate;
}

.dir-ico {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--s) * 0.68);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 0 10px rgba(255, 170, 60, 0.95),
    0 0 4px #fff,
    0 2px 3px rgba(120, 60, 20, 0.5);
  z-index: 3;
  pointer-events: none;
}

.tile.sp-h .dir-ico, .tile.sp-v .dir-ico {
  display: flex;
  animation: dirPulse 0.9s ease-in-out infinite;
}

@keyframes dirPulse {
  0%, 100% { transform: scale(0.82); opacity: 0.85; }
  50% { transform: scale(1.18); opacity: 1; }
}

.tile.sp-b::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 60, 0.55), rgba(255, 60, 60, 0.25) 60%, transparent 72%);
  animation: glow 0.6s ease-in-out infinite alternate;
}

.tile.sp-b .fruit { animation: pulse 0.6s ease-in-out infinite alternate; }

.tile.sp-r .fruit {
  font-size: calc(var(--s) * 0.7);
  animation: spin 2.5s linear infinite;
}

@keyframes glow {
  from { opacity: 0.5; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1.05); }
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@keyframes spin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

/* ---------- Floating score ---------- */
.float-score {
  position: absolute;
  font-weight: 900;
  font-size: calc(var(--s) * 0.42);
  color: #fff;
  text-shadow: 0 2px 6px rgba(230, 90, 60, 0.9), 0 0 2px #e8574a;
  pointer-events: none;
  z-index: 5;
  animation: floatUp 0.9s ease-out forwards;
}

.float-score.combo {
  font-size: calc(var(--s) * 0.55);
  color: #fff3b0;
  text-shadow: 0 2px 8px rgba(230, 120, 30, 0.95);
}

@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(calc(var(--s) * -1.4)); opacity: 0; }
}

/* ---------- spodná lišta ---------- */
/* lišta je ukotvená k spodku okna – nezávisí od výpočtu výšky #app */
#bottom-bar {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(96vw, 520px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

#player-pill {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  color: #3f7286;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

#player-label { font-weight: 700; color: #e8574a; }

#player-label:not(:empty)::after { content: " · "; color: #86aebb; font-weight: 400; }

.icon-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 120, 150, 0.25);
  transition: transform 0.1s ease;
}

.icon-btn:active { transform: scale(0.88); }

/* počítadlo pomôcok */
.badge {
  position: absolute;
  right: -3px;
  top: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff6f61;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 85, 110, 0.4);
}

.badge:empty { display: none; }

.badge.zero { background: #9bb4bf; }

.mode-line {
  font-size: 12px !important;
  font-weight: 700;
  color: #55889c !important;
  margin-bottom: 10px !important;
}

/* upozornenie, že treba zamiešať */
.icon-btn.nudge {
  animation: nudge 0.7s ease-in-out infinite;
  background: #fff0ee;
}

@keyframes nudge {
  50% { transform: scale(1.16); box-shadow: 0 0 0 4px rgba(255, 111, 97, 0.45); }
}

/* ---------- toast ---------- */
#toast-holder { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

.toast {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  background: rgba(12, 75, 95, 0.88);
  color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  animation: toastIn 2.2s ease forwards;
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-14px); }
  10%, 82% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ---------- overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 60, 85, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  transition: opacity 0.3s ease;
}

.overlay.hidden { opacity: 0; pointer-events: none; }

.panel {
  background: linear-gradient(170deg, #fbfeff, #fff5e3);
  border-radius: 28px;
  padding: 28px 24px;
  width: min(88vw, 360px);
  text-align: center;
  box-shadow: 0 18px 50px rgba(10, 60, 90, 0.45);
  animation: panelIn 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.panel.tall {
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 18px 18px;
}

@keyframes panelIn {
  from { transform: scale(0.75) translateY(24px); opacity: 0; }
}

.panel-emoji { font-size: 42px; margin-bottom: 6px; }

.panel h1 {
  font-size: 25px;
  font-weight: 900;
  color: #e8574a;
  margin-bottom: 8px;
}

.panel p {
  font-size: 15px;
  color: #3f7286;
  line-height: 1.5;
  margin-bottom: 14px;
}

.help-body {
  flex: 1;
  overflow-y: auto;
  text-align: left;
  margin-bottom: 14px;
}

.h-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 7px;
  font-size: 13px;
  line-height: 1.4;
  color: #3f7286;
}

.h-ico { font-size: 20px; flex-shrink: 0; }

.stars { font-size: 32px; min-height: 8px; margin-bottom: 10px; letter-spacing: 4px; }
.stars:empty { display: none; }

.stars span {
  display: inline-block;
  animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.stars span:nth-child(2) { animation-delay: 0.18s; }
.stars span:nth-child(3) { animation-delay: 0.36s; }

@keyframes starPop {
  from { transform: scale(0) rotate(-120deg); }
}

.big-btn {
  background: linear-gradient(135deg, #ffb347, #ff6f61);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 36px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 111, 97, 0.45);
}

.big-btn:active { transform: scale(0.95); }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.conf { position: absolute; top: -20px; border-radius: 2px; }

.ver-line {
  font-size: 11px !important;
  color: #9bb4bf !important;
  margin: 2px 0 10px !important;
}


/* ================= Vizuálne efekty (prevzaté z jednotky) ================= */
/* ================= Vizuálne efekty ================= */

/* častice pri zmiznutí */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}

/* otras plochy */
.shake { animation: shake 0.4s ease; }

@keyframes shake {
  0%, 100% { translate: 0 0; }
  20% { translate: -7px 4px; }
  40% { translate: 6px -4px; }
  60% { translate: -5px 3px; }
  80% { translate: 3px -2px; }
}

/* lúč pásikavého kúska */
.beam {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff8, #fff, #ffe27a, #fff, #fff8, transparent);
  box-shadow: 0 0 22px #ffdf6e, 0 0 8px #fff;
  animation: beamFade 0.45s ease-out forwards;
}

@keyframes beamFade {
  0% { opacity: 0; scale: 0.4; }
  25% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 1; }
}

/* tlaková vlna bomby */
.ring {
  position: absolute;
  border: 5px solid #ffd76e;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(255, 160, 60, 0.9), inset 0 0 14px rgba(255, 200, 90, 0.7);
  animation: ringGrow 0.55s ease-out forwards;
}

@keyframes ringGrow {
  from { transform: scale(0.15); opacity: 1; }
  to { transform: scale(1); opacity: 0; }
}

/* dúhový záblesk */
.rflash {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  border-radius: inherit;
  background: conic-gradient(from 0deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #b967ff, #ff6b6b);
  animation: rflash 0.65s ease-out forwards;
}

@keyframes rflash {
  0% { opacity: 0; }
  20% { opacity: 0.7; }
  100% { opacity: 0; }
}

/* pochvala pri kombe */
.praise {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 8;
  font-size: calc(var(--s) * 0.75);
  font-weight: 900;
  color: #fff;
  -webkit-text-stroke: 1px #e8574a;
  text-shadow: 0 3px 0 #e8574a, 0 8px 20px rgba(220, 90, 50, 0.6);
  pointer-events: none;
  white-space: nowrap;
  animation: praiseIn 0.95s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes praiseIn {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.15) rotate(3deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(1); opacity: 0; }
}

/* konfety */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

.conf {
  position: absolute;
  top: -20px;
  border-radius: 2px;
}

/* squish pri dopade */
.tile.land .fruit {
  animation: landSquish 0.24s ease;
}

@keyframes landSquish {
  40% { transform: scale(1.25, 0.7) translateY(10%); }
}

/* pulz skóre */
.hud-value { display: inline-block; }

.bump { animation: bump 0.3s ease; }

@keyframes bump {
  50% { transform: scale(1.35); color: #ff6f61; }
}

/* lesk na progres bare */
.progress-fill {
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 1.8s ease-in-out infinite;
}

@keyframes shine {
  to { transform: translateX(100%); }
}

/* šťavnatejšie kombo */
.float-score.combo {
  animation: comboPop 1s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

@keyframes comboPop {
  0% { transform: scale(0) rotate(-12deg); opacity: 0; }
  25% { transform: scale(1.45) rotate(4deg); opacity: 1; }
  55% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) translateY(calc(var(--s) * -1)); opacity: 0; }
}

/* hviezdy naskakujú postupne */
.stars span {
  display: inline-block;
  animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.stars span:nth-child(2) { animation-delay: 0.18s; }
.stars span:nth-child(3) { animation-delay: 0.36s; }

@keyframes starPop {
  from { transform: scale(0) rotate(-120deg); }
}


/* cieľ v jednom riadku – tri drobné riadky pod sebou boli na mobile nečitateľné */
.goal-line {
  font-size: clamp(15px, 4.3vw, 19px);
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  color: #1f4652;
}

.goal-line b {
  color: #e8574a;
  font-size: 1.15em;
}

#hud-goal .progress { margin: 5px 0 0; }

/* riadok s prekážkami v paneli cieľa */
.panel .gb-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #5c8595;
}

/* ---------- farebné guľky namiesto ikoniek (prepína sa v menu) ---------- */
.ball { display: none; }

.no-icons .tile .ball {
  display: block;
  position: absolute;
  left: 14%;
  top: 14%;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 45%),
    var(--tc, #888);
  box-shadow: inset 0 -3px 7px rgba(0, 0, 0, 0.28), 0 2px 5px rgba(15, 85, 110, 0.35);
  pointer-events: none;
}

.no-icons .tile .fruit { visibility: hidden; }

/* dúha a kufor si obrázok nechávajú – nesú informáciu, nie farbu */
.no-icons .tile.sp-r .fruit,
.no-icons .tile.sp-d .fruit { visibility: visible; }

.no-icons .tile.sp-r .ball,
.no-icons .tile.sp-d .ball { display: none; }
