/* ============================================================
   HEADBANDS – neonový styl v2
   ============================================================ */

:root {
  --bg: #05010f;
  --panel: rgba(24, 10, 48, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --purple: #8a2bff;
  --green: #00ff9d;
  --red: #ff2e63;
  --yellow: #ffe600;
  --gold: #ffd700;
  --text: #f4f0ff;
  --font-head: "Bungee", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Reset / plné přizpůsobení displeje ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; overflow: hidden; }

body {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

.app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- Pozadí ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  animation: hueShift 26s linear infinite;
  transition: background 0.8s ease;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000 10%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 38%, #000 10%, transparent 78%);
  animation: gridMove 7s linear infinite;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  mix-blend-mode: screen;
  will-change: transform;
}
.blob1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, var(--purple), transparent 65%); animation: float1 16s ease-in-out infinite alternate; }
.blob2 { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -10vmax; background: radial-gradient(circle, var(--cyan), transparent 65%); animation: float2 18s ease-in-out infinite alternate; }
.blob3 { width: 34vmax; height: 34vmax; left: 30%; top: 42%; background: radial-gradient(circle, var(--magenta), transparent 65%); opacity: 0.3; animation: float3 14s ease-in-out infinite alternate; }
.blob4 { width: 30vmax; height: 30vmax; left: -8vmax; top: 55%; background: radial-gradient(circle, var(--green), transparent 65%); opacity: 0.22; animation: float1 20s ease-in-out infinite alternate-reverse; }

.vignette { position: absolute; inset: 0; background: radial-gradient(circle at 50% 30%, transparent 45%, rgba(0, 0, 0, 0.85) 100%); }

.particles { position: absolute; inset: 0; pointer-events: none; }
.particles span {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  opacity: 0;
  animation: rise linear infinite;
}

/* ---------- Témata pozadí (z obchodu) ---------- */
body.theme-disco .bg { background: #12021a; }
body.theme-disco .grid { opacity: 0.4; }
body.theme-disco .bg::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, #ff2bd6, #00f0ff, #ffe600, #00ff9d, #ff2bd6);
  animation: spin 6s linear infinite;
  opacity: 0.14;
  filter: blur(10px);
}

body.theme-space .bg { background: #02040f; }
body.theme-space .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 70% 15%, #fff, transparent),
    radial-gradient(2px 2px at 45% 70%, #9cf, transparent),
    radial-gradient(1px 1px at 85% 55%, #fff, transparent),
    radial-gradient(1px 1px at 10% 80%, #ff9, transparent),
    radial-gradient(2px 2px at 60% 40%, #f9f, transparent),
    radial-gradient(1px 1px at 33% 12%, #fff, transparent),
    radial-gradient(1px 1px at 90% 85%, #cfc, transparent);
  animation: twinkle 3s ease-in-out infinite alternate;
}

body.theme-aurora .bg::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(115deg, transparent 30%, rgba(0, 255, 157, 0.25) 45%, rgba(0, 240, 255, 0.22) 55%, rgba(255, 43, 214, 0.25) 70%, transparent 85%);
  background-size: 250% 250%;
  animation: aurora 9s ease-in-out infinite alternate;
  filter: blur(30px);
}

body.theme-cyber .bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(255, 43, 214, 0.12) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.12) 2px, transparent 2px),
    linear-gradient(0deg, transparent 0%, rgba(0, 240, 255, 0.06) 100%);
  background-size: 38px 38px, 38px 38px, 100% 200%;
  animation: cyberGlow 4s ease-in-out infinite alternate;
}

body.theme-sunset .bg { background: #1a0410; }
body.theme-sunset .bg::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(0deg, transparent 30%, #ff2e63 55%, #ffa500 75%, #ffe600 100%);
  opacity: 0.25;
  filter: blur(24px);
  animation: sunsetFloat 12s ease-in-out infinite alternate;
}

/* ---------- Obrazovky ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.screen.active { opacity: 1; pointer-events: auto; transform: none; }

.screen.menu,
.screen.cats,
.screen.settings,
.screen.shop,
.screen.stats {
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
}

/* ---------- Hlavičkové lišty ---------- */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  flex-shrink: 0;
}
.bar-title {
  flex: 1;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 5vw, 1.5rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.7);
}
.bar-coins {
  font-weight: 800;
  font-size: clamp(0.9rem, 4vw, 1.1rem);
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  white-space: nowrap;
}

/* ---------- Tlačítka ---------- */
.btn {
  position: relative;
  padding: 13px 26px;
  font: inherit;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 4vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.6);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
  animation: neonPulse 2.6s ease-in-out infinite;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 26px rgba(0, 240, 255, 0.7); }
.btn:active { transform: scale(0.95); }
.btn.big { font-size: clamp(1rem, 5vw, 1.25rem); padding: 16px 34px; border-radius: 18px; }
.btn.play {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 16px rgba(0, 255, 157, 0.4), inset 0 0 14px rgba(0, 255, 157, 0.12);
  animation: greenPulse 2.2s ease-in-out infinite;
}
.btn.play:hover { box-shadow: 0 0 34px rgba(0, 255, 157, 0.8); }
.btn.ghost { border-color: rgba(255, 255, 255, 0.25); box-shadow: none; animation: none; color: rgba(244, 240, 255, 0.85); }
.btn.ghost:hover { border-color: #fff; color: #fff; box-shadow: 0 0 16px rgba(255, 255, 255, 0.25); }

.icon-btn {
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 14px rgba(0, 240, 255, 0.5); }
.icon-btn.back { font-size: 1.8rem; line-height: 1; }

/* Pravidla – pravý dolní roh */
.rules-btn {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  width: 44px;
  height: 44px;
  z-index: 40;
  border-radius: 50%;
  border: 1px solid rgba(255, 43, 214, 0.6);
  background: var(--panel);
  color: var(--magenta);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.5);
  animation: floatBtn 3.2s ease-in-out infinite;
  transition: transform 0.15s ease;
}
.rules-btn:hover { transform: scale(1.12); }
body.hide-rules .rules-btn { display: none; }

/* ---------- Přihlášení ---------- */
.screen.login {
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(138, 43, 255, 0.25);
  animation: riseIn 0.6s cubic-bezier(0.22, 0.9, 0.3, 1.2) both;
}
.auth-card .logo {
  font-size: clamp(1.5rem, 7vw, 2.3rem);
  line-height: 1.15;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.auth-card .tagline { text-align: center; margin: 2px 0 10px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
}
.tab {
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: rgba(244, 240, 255, 0.6);
  font: inherit;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tab.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4) inset;
}

input[type="text"], input[type="password"] {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 240, 255, 0.35); }

.auth-msg { min-height: 1.2em; text-align: center; font-size: 0.85rem; color: var(--yellow); }
.auth-msg.err { color: var(--red); }
.auth-note { text-align: center; font-size: 0.72rem; color: rgba(244, 240, 255, 0.55); }

.hidden { display: none !important; }

/* ---------- Menu ---------- */
.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  flex-shrink: 0;
}
.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 6px 16px 6px 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  color: #0a0a12;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
  text-transform: uppercase;
}
.p-name { font-weight: 800; font-size: clamp(0.9rem, 4vw, 1.05rem); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-coins { font-weight: 800; color: var(--gold); font-size: clamp(0.85rem, 4vw, 1rem); text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
.guest-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  border: 1px solid rgba(138, 43, 255, 0.6);
  border-radius: 20px;
  padding: 2px 8px;
  background: rgba(138, 43, 255, 0.12);
}

.menu-center {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 0;
  text-align: center;
}
.menu-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.menu-footer { text-align: center; font-size: clamp(0.7rem, 3vw, 0.85rem); color: rgba(244, 240, 255, 0.5); padding-top: 10px; flex-shrink: 0; }

/* ---------- Logo ---------- */
.logo {
  font-family: var(--font-head);
  font-size: clamp(2rem, 9vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.1;
  color: #fff;
  text-shadow:
    0 0 14px rgba(0, 240, 255, 0.9),
    0 0 46px rgba(0, 240, 255, 0.5),
    0 0 90px rgba(255, 43, 214, 0.4);
  animation: flicker 5s linear infinite;
}
.logo-accent {
  color: var(--magenta);
  text-shadow:
    0 0 14px rgba(255, 43, 214, 0.95),
    0 0 46px rgba(255, 43, 214, 0.55),
    0 0 90px rgba(0, 240, 255, 0.35);
}
.tagline { font-size: clamp(0.8rem, 3.2vw, 1rem); letter-spacing: 0.04em; color: rgba(244, 240, 255, 0.75); }

/* ---------- Kategorie ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  flex: 1;
  align-content: start;
}
.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 100px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  animation: riseIn 0.5s cubic-bezier(0.22, 0.9, 0.3, 1.2) both;
  animation-delay: calc(var(--i) * 40ms);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, var(--glow, rgba(0, 240, 255, 0.4)), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.category-card:nth-child(12n + 1) { --accent: var(--cyan); --glow: rgba(0, 240, 255, 0.55); }
.category-card:nth-child(12n + 2) { --accent: var(--magenta); --glow: rgba(255, 43, 214, 0.55); }
.category-card:nth-child(12n + 3) { --accent: var(--green); --glow: rgba(0, 255, 157, 0.55); }
.category-card:nth-child(12n + 4) { --accent: var(--yellow); --glow: rgba(255, 230, 0, 0.5); }
.category-card:nth-child(12n + 5) { --accent: var(--red); --glow: rgba(255, 46, 99, 0.55); }
.category-card:nth-child(12n + 6) { --accent: var(--purple); --glow: rgba(138, 43, 255, 0.55); }
.category-card:nth-child(12n + 7) { --accent: #ffa500; --glow: rgba(255, 165, 0, 0.55); }
.category-card:nth-child(12n + 8) { --accent: #7fffd4; --glow: rgba(127, 255, 212, 0.5); }
.category-card:nth-child(12n + 9) { --accent: #ff69b4; --glow: rgba(255, 105, 180, 0.55); }
.category-card:nth-child(12n + 10) { --accent: #00ff87; --glow: rgba(0, 255, 135, 0.55); }
.category-card:nth-child(12n + 11) { --accent: #bfe3ff; --glow: rgba(191, 227, 255, 0.5); }
.category-card:nth-child(12n + 12) { --accent: #ffd700; --glow: rgba(255, 215, 0, 0.55); }

.category-card:hover, .category-card:active {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow), inset 0 0 20px var(--glow);
}
.category-card:hover::after, .category-card:active::after { opacity: 1; }
.cat-icon { font-size: clamp(1.6rem, 6vw, 2.2rem); filter: drop-shadow(0 0 10px var(--glow)); position: relative; z-index: 1; }
.cat-name { position: relative; z-index: 1; font-weight: 800; font-size: clamp(0.72rem, 3.2vw, 0.9rem); text-align: center; letter-spacing: 0.02em; }
.cat-count { position: relative; z-index: 1; font-size: 0.66rem; color: rgba(244, 240, 255, 0.55); }

/* ---------- Nastavení ---------- */
.settings-body { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.opt-block { display: flex; flex-direction: column; gap: 10px; }
.opt-title {
  font-family: var(--font-head);
  font-size: clamp(0.8rem, 3.6vw, 0.95rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}
.opt-hint { font-size: 0.8rem; color: rgba(244, 240, 255, 0.6); }

.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.opt-cards.chips { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }

.opt-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  animation: riseIn 0.45s ease both;
  animation-delay: calc(var(--i) * 50ms);
}
.opt-card:hover { transform: translateY(-3px); }
.opt-card.on {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.5), inset 0 0 12px rgba(0, 240, 255, 0.12);
  transform: translateY(-3px);
}
.opt-card.on.green { border-color: var(--green); box-shadow: 0 0 16px rgba(0, 255, 157, 0.5); }
.opt-card.on.red { border-color: var(--red); box-shadow: 0 0 16px rgba(255, 46, 99, 0.5); }
.opt-card.on.purple { border-color: var(--purple); box-shadow: 0 0 16px rgba(138, 43, 255, 0.5); }
.opt-card.on.yellow { border-color: var(--yellow); box-shadow: 0 0 16px rgba(255, 230, 0, 0.5); }
.opt-card.on.gold { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 215, 0, 0.55); }

.opt-name { font-weight: 800; font-size: clamp(0.75rem, 3.4vw, 0.9rem); text-align: center; }
.opt-sub { font-size: 0.68rem; color: rgba(244, 240, 255, 0.55); text-align: center; }
.opt-count { font-size: 0.68rem; color: var(--gold); }

.settings-start { padding-top: 6px; }

/* ---------- Odpočet ---------- */
.screen.countdown {
  overflow: hidden;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.countdown-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  text-align: center;
}
.countdown-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(54vmin, 320px);
  height: min(54vmin, 320px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
    conic-gradient(from 0deg, var(--cyan), var(--magenta), var(--purple), var(--cyan)) border-box;
  opacity: 0.5;
  animation: spin 4s linear infinite;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.4));
  pointer-events: none;
}
.countdown-num {
  font-family: var(--font-head);
  font-size: clamp(5rem, 34vw, 11rem);
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px var(--cyan), 0 0 60px var(--cyan), 0 0 110px var(--magenta);
  z-index: 1;
  line-height: 1;
}
.countdown-num.pop { animation: popNum 0.78s cubic-bezier(0.22, 0.8, 0.3, 1.2) both; }
.countdown-cat {
  margin-top: 16px;
  font-size: clamp(1rem, 4.5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--magenta);
  text-shadow: 0 0 16px rgba(255, 43, 214, 0.9);
  z-index: 1;
}
.countdown-tip {
  margin-top: 10px;
  font-size: clamp(0.75rem, 3.2vw, 0.95rem);
  color: rgba(244, 240, 255, 0.75);
  z-index: 1;
  max-width: 60vw;
}
.countdown-cancel { margin-top: 18px; z-index: 1; }

/* ---------- Hra ---------- */
.screen.game { overflow: hidden; }

.game-hud {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 0;
  flex-shrink: 0;
}
.hud-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: clamp(1rem, 5vw, 1.4rem);
  font-weight: 800;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hud-chip .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.hud-chip.good .dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.hud-chip.bad .dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.hud-chip.time { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.8); border-color: rgba(0, 240, 255, 0.35); }
.hud-chip.time.low { color: var(--red); text-shadow: 0 0 10px var(--red); border-color: rgba(255, 46, 99, 0.5); animation: dangerPulse 0.6s ease-in-out infinite alternate; }

.word-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
}

.word-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 100%;
  min-height: 200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 18px;
  border-radius: 24px;
  border: 2px solid rgba(0, 240, 255, 0.4);
  background: rgba(16, 6, 32, 0.6);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.25), inset 0 0 30px rgba(0, 240, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.word-card.good-flash { animation: cardGood 0.4s ease; }
.word-card.bad-flash { animation: cardBad 0.4s ease; }

.word-cat {
  font-family: var(--font-head);
  font-size: clamp(0.65rem, 3vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--purple);
  text-shadow: 0 0 10px rgba(138, 43, 255, 0.9);
}

.word {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 12.5vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
  background: linear-gradient(100deg, #fff 0%, var(--cyan) 30%, var(--magenta) 55%, #fff 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.5));
  animation: shine 3.5s linear infinite;
}

.word-badge {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(0.75rem, 3.6vw, 1rem);
  padding: 5px 14px;
  border-radius: 30px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
}
.word-badge.mid { border-color: rgba(255, 43, 214, 0.6); color: var(--magenta); background: rgba(255, 43, 214, 0.08); text-shadow: 0 0 8px rgba(255, 43, 214, 0.7); }
.word-badge.top { border-color: rgba(255, 215, 0, 0.7); color: var(--gold); background: rgba(255, 215, 0, 0.08); text-shadow: 0 0 10px rgba(255, 215, 0, 0.8); animation: goldPulse 1.4s ease-in-out infinite; }

/* Rámečky (obchod) */
.frame-gold { border-color: var(--gold); box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(255, 215, 0, 0.1); }
.frame-cyan { border-color: var(--cyan); box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), inset 0 0 30px rgba(0, 240, 255, 0.1); }
.frame-magenta { border-color: var(--magenta); box-shadow: 0 0 30px rgba(255, 43, 214, 0.5), inset 0 0 30px rgba(255, 43, 214, 0.1); }
.frame-rainbow { border: 3px solid transparent; background-image: linear-gradient(rgba(16, 6, 32, 0.6), rgba(16, 6, 32, 0.6)), conic-gradient(from 0deg, #ff2bd6, #00f0ff, #00ff9d, #ffe600, #ff2bd6); background-clip: padding-box, border-box; background-origin: border-box; animation: spin 5s linear infinite; }
.frame-diamond { border-color: #fff; box-shadow: 0 0 34px rgba(255, 255, 255, 0.55), 0 0 60px rgba(0, 240, 255, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.08); }

/* Styl písma (obchod) */
.wstyle-cyan { background: linear-gradient(100deg, #bff7ff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: none; }
.wstyle-magenta { background: linear-gradient(100deg, #ffc9f2, var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: none; }
.wstyle-green { background: linear-gradient(100deg, #bfffe0, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: none; }
.wstyle-gold { background: linear-gradient(100deg, #fff3c4, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.6)); animation: none; }
.wstyle-rainbow { background: linear-gradient(90deg, #ff2bd6, #00f0ff, #00ff9d, #ffe600, #ff2bd6); background-size: 400% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbowText 3s linear infinite; filter: drop-shadow(0 0 12px rgba(255, 43, 214, 0.4)); }
.wstyle-fire { background: linear-gradient(100deg, #ffb347, #ff7b2b, #ff2e63, #ffb347); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2.2s linear infinite; filter: drop-shadow(0 0 14px rgba(255, 46, 99, 0.55)); }

/* Bliknutí výsledku (malé, nahoře – ne přes slovo) */
.flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 82px);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}
.flash.show { animation: tintFade 1s ease both; }
.flash-badge {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.4rem, 7vw, 2rem);
  padding: 10px 26px;
  border-radius: 40px;
  transform: scale(0.4);
}
.flash.show .flash-badge { animation: badgePop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.flash.good { background: radial-gradient(ellipse at 50% 20%, rgba(0, 255, 157, 0.35), transparent 65%); }
.flash.good .flash-badge { color: var(--green); background: rgba(0, 255, 157, 0.15); border: 1px solid rgba(0, 255, 157, 0.6); box-shadow: 0 0 24px rgba(0, 255, 157, 0.6); text-shadow: 0 0 12px var(--green); }
.flash.bad { background: radial-gradient(ellipse at 50% 20%, rgba(255, 46, 99, 0.35), transparent 65%); }
.flash.bad .flash-badge { color: var(--red); background: rgba(255, 46, 99, 0.15); border: 1px solid rgba(255, 46, 99, 0.6); box-shadow: 0 0 24px rgba(255, 46, 99, 0.6); text-shadow: 0 0 12px var(--red); }

/* Ovládací tlačítka (PC) */
.game-controls {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  flex-shrink: 0;
}
.game-controls.show { display: grid; }
.ctl {
  padding: 16px;
  border: none;
  border-radius: 16px;
  font: inherit;
  font-family: var(--font-head);
  font-size: clamp(1rem, 5vw, 1.3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ctl:active { transform: scale(0.94); }
.ctl-good { background: linear-gradient(135deg, rgba(0, 255, 157, 0.25), rgba(0, 255, 157, 0.08)); color: var(--green); border: 1px solid rgba(0, 255, 157, 0.6); box-shadow: 0 0 16px rgba(0, 255, 157, 0.35); }
.ctl-good:hover { box-shadow: 0 0 26px rgba(0, 255, 157, 0.6); }
.ctl-bad { background: linear-gradient(135deg, rgba(255, 46, 99, 0.25), rgba(255, 46, 99, 0.08)); color: var(--red); border: 1px solid rgba(255, 46, 99, 0.6); box-shadow: 0 0 16px rgba(255, 46, 99, 0.35); }
.ctl-bad:hover { box-shadow: 0 0 26px rgba(255, 46, 99, 0.6); }

.game-hint {
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  text-align: center;
  font-size: clamp(0.72rem, 3.2vw, 0.9rem);
  color: rgba(244, 240, 255, 0.6);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ---------- Výsledky ---------- */
.screen.results { padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.results-head { text-align: center; flex-shrink: 0; }
.results-title {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 6vw, 2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  text-shadow: 0 0 16px rgba(255, 230, 0, 0.8);
  animation: flicker 4s linear infinite;
}
.win-badge {
  display: inline-block;
  margin: 8px 0 2px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1rem, 5vw, 1.4rem);
  letter-spacing: 0.1em;
  color: #0a0a12;
  background: linear-gradient(135deg, var(--gold), #fff6b8);
  padding: 8px 22px;
  border-radius: 40px;
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.7);
  animation: winPulse 1s ease-in-out infinite;
}
.score-big { display: flex; flex-direction: column; align-items: center; margin: 4px 0; }
.score-big b {
  font-family: var(--font-head);
  font-size: clamp(3.6rem, 20vw, 8rem);
  font-weight: 900;
  line-height: 1;
  color: var(--green);
  text-shadow: 0 0 24px rgba(0, 255, 157, 0.75);
}
.score-big b.counting { animation: scorePulse 0.5s ease-in-out infinite alternate; }
.score-big b.bump { animation: scoreBump 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.6) both; }
.score-big span { font-size: clamp(0.72rem, 3.4vw, 0.95rem); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244, 240, 255, 0.65); }
.coins-gain {
  font-weight: 900;
  font-size: clamp(1rem, 5vw, 1.3rem);
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.7);
  animation: goldPulse 1.2s ease-in-out infinite;
}
.score-stats { display: flex; justify-content: center; gap: 10px; margin: 10px 0 12px; flex-wrap: wrap; }
.stat {
  padding: 7px 16px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: clamp(0.72rem, 3.4vw, 0.9rem);
  color: rgba(244, 240, 255, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stat b { font-family: var(--font-head); font-size: 1.25em; }
.stat.good b { color: var(--green); text-shadow: 0 0 12px var(--green); }
.stat.bad b { color: var(--red); text-shadow: 0 0 12px var(--red); }
.stat.neutral b { color: var(--cyan); text-shadow: 0 0 12px rgba(0, 240, 255, 0.8); }

.results-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px 4px 8px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  animation: slideIn 0.4s cubic-bezier(0.22, 0.9, 0.3, 1.2) both;
  animation-delay: calc(var(--i) * 35ms);
}
.li .mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.li.good .mark { background: rgba(0, 255, 157, 0.16); color: var(--green); box-shadow: 0 0 10px rgba(0, 255, 157, 0.5); }
.li.bad .mark { background: rgba(255, 46, 99, 0.16); color: var(--red); box-shadow: 0 0 10px rgba(255, 46, 99, 0.5); }
.r-word { flex: 1; font-weight: 600; font-size: clamp(0.9rem, 4.4vw, 1.1rem); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-pts { font-family: var(--font-head); font-size: 0.75rem; color: rgba(244, 240, 255, 0.6); flex-shrink: 0; }
.li.good .r-pts { color: var(--green); }
.results-empty { text-align: center; color: rgba(244, 240, 255, 0.6); padding: 24px 0; }
.results-actions { display: flex; justify-content: center; gap: 10px; padding-top: 12px; flex-shrink: 0; flex-wrap: wrap; }

/* ---------- Obchod ---------- */
.shop-filter { display: flex; gap: 8px; padding: 4px 0 14px; flex-wrap: wrap; flex-shrink: 0; }
.filter-chip {
  padding: 8px 14px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: rgba(244, 240, 255, 0.7);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.filter-chip.on { border-color: var(--magenta); color: var(--magenta); box-shadow: 0 0 12px rgba(255, 43, 214, 0.4); }

.shop-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  align-content: start;
}
.shop-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: riseIn 0.45s ease both;
  animation-delay: calc(var(--i) * 35ms);
  overflow: hidden;
}
.shop-item .si-icon { font-size: clamp(1.8rem, 7vw, 2.6rem); filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5)); }
.shop-item .si-name { font-weight: 800; font-size: clamp(0.8rem, 3.6vw, 0.95rem); text-align: center; }
.shop-item .si-desc { font-size: 0.7rem; color: rgba(244, 240, 255, 0.6); text-align: center; line-height: 1.35; }
.shop-item .si-cost { font-weight: 800; color: var(--gold); font-size: 0.9rem; }
.shop-item .si-btn {
  width: 100%;
  padding: 9px;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.shop-item .si-btn:active { transform: scale(0.95); }
.si-btn.buy { background: rgba(0, 240, 255, 0.18); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.5); }
.si-btn.buy:hover { box-shadow: 0 0 14px rgba(0, 240, 255, 0.5); }
.si-btn.equip { background: rgba(0, 255, 157, 0.18); color: var(--green); border: 1px solid rgba(0, 255, 157, 0.5); }
.si-btn.equip:hover { box-shadow: 0 0 14px rgba(0, 255, 157, 0.5); }
.si-btn.owned { background: rgba(255, 255, 255, 0.08); color: rgba(244, 240, 255, 0.5); border: 1px solid var(--line); cursor: default; }
.si-btn.sell { background: rgba(255, 46, 99, 0.15); color: var(--red); border: 1px solid rgba(255, 46, 99, 0.4); }
.shop-item.equipped { border-color: var(--green); box-shadow: 0 0 18px rgba(0, 255, 157, 0.4); }
.shop-item .si-owned-tag { position: absolute; top: 8px; right: 8px; font-size: 0.68rem; color: var(--green); }

/* ---------- Statistiky ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: riseIn 0.5s ease both;
  animation-delay: calc(var(--i) * 40ms);
  text-align: center;
}
.stat-card .sc-icon { font-size: 1.8rem; }
.stat-card .sc-value { font-family: var(--font-head); font-size: clamp(1.4rem, 7vw, 2rem); font-weight: 900; color: #fff; text-shadow: 0 0 12px rgba(0, 240, 255, 0.6); }
.stat-card .sc-label { font-size: 0.72rem; color: rgba(244, 240, 255, 0.6); letter-spacing: 0.06em; text-transform: uppercase; }

.backup { margin: 18px auto 0; max-width: 620px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.backup-note { font-size: 0.78rem; color: rgba(244, 240, 255, 0.6); line-height: 1.4; }

/* ---------- Modální okno (pravidla) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: 85dvh;
  overflow-y: auto;
  background: #120726;
  border: 1px solid rgba(255, 43, 214, 0.5);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 0 40px rgba(255, 43, 214, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: scale(0.9);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.modal.show .modal-box { transform: none; }
.modal-title { font-family: var(--font-head); font-size: 1.3rem; text-align: center; color: var(--magenta); text-shadow: 0 0 14px rgba(255, 43, 214, 0.8); }
.modal-body { display: flex; flex-direction: column; gap: 10px; font-size: 0.88rem; line-height: 1.5; }
.modal-body h4 { font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); margin-top: 6px; }
.modal-body ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.g { color: var(--green); }
.r { color: var(--red); }

/* ---------- Confetti ---------- */
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute;
  top: -14px;
  width: 10px;
  height: 16px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

/* ---------- Scrollbary ---------- */
.screen::-webkit-scrollbar, .modal-box::-webkit-scrollbar { width: 6px; }
.screen::-webkit-scrollbar-thumb, .modal-box::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.35); border-radius: 3px; }
.screen::-webkit-scrollbar-track, .modal-box::-webkit-scrollbar-track { background: transparent; }

/* ---------- Klíčové animace ---------- */
@keyframes hueShift { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 42px 42px; } }
@keyframes float1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes float2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-7vmax, -5vmax) scale(1.2); } }
@keyframes float3 { from { transform: translate(0, 0) scale(1) rotate(0deg); } to { transform: translate(4vmax, -6vmax) scale(1.25) rotate(30deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes aurora { from { transform: translateX(-10%); } to { transform: translateX(10%); } }
@keyframes cyberGlow { from { filter: brightness(0.8); } to { filter: brightness(1.25); } }
@keyframes sunsetFloat { from { transform: translateY(0); } to { transform: translateY(-4%); } }
@keyframes rise { from { opacity: 0; transform: translateY(0) scale(1); } to { opacity: 0.8; transform: translateY(-110vh) scale(0.4); } }
@keyframes floatBtn { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 3% { opacity: 0.75; } 5% { opacity: 1; } 42% { opacity: 1; } 43% { opacity: 0.6; } 45% { opacity: 1; } 78% { opacity: 1; } 79% { opacity: 0.85; } 81% { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes popNum { 0% { transform: scale(2.6); opacity: 0; filter: blur(10px); } 40% { opacity: 1; filter: blur(0); } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes dangerPulse { from { transform: scale(1); } to { transform: scale(1.12); } }
@keyframes shine { from { background-position: 0% 50%; } to { background-position: 250% 50%; } }
@keyframes rainbowText { from { background-position: 0% 50%; } to { background-position: 400% 50%; } }
@keyframes goldPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes neonPulse { 0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.1); } 50% { box-shadow: 0 0 26px rgba(0, 240, 255, 0.6), inset 0 0 18px rgba(0, 240, 255, 0.2); } }
@keyframes greenPulse { 0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 157, 0.3), inset 0 0 12px rgba(0, 255, 157, 0.1); } 50% { box-shadow: 0 0 28px rgba(0, 255, 157, 0.7), inset 0 0 18px rgba(0, 255, 157, 0.2); } }
@keyframes cardGood { 0% { box-shadow: 0 0 8px rgba(0, 255, 157, 0.2); transform: scale(1); } 40% { box-shadow: 0 0 44px rgba(0, 255, 157, 0.9); transform: scale(1.03); } 100% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.25); transform: scale(1); } }
@keyframes cardBad { 0% { box-shadow: 0 0 8px rgba(255, 46, 99, 0.2); transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); box-shadow: 0 0 40px rgba(255, 46, 99, 0.8); } 75% { transform: translateX(-3px); } 100% { transform: translateX(0); } }
@keyframes tintFade { 0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes badgePop { 0% { transform: scale(0.4); opacity: 0; } 50% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes scorePulse { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes scoreBump { 0% { transform: scale(0.6); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }
@keyframes winPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); } 50% { transform: scale(1.07); box-shadow: 0 0 40px rgba(255, 215, 0, 0.9); } }
@keyframes confettiFall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(105vh) rotate(720deg); opacity: 0.6; } }

/* ---------- Otoč telefon (landscape) ---------- */
.rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: #05010f;
  text-align: center;
}
.rotate-overlay .rotate-icon {
  font-size: clamp(3rem, 12vw, 5rem);
  animation: rotateHint 1.2s ease-in-out infinite alternate;
}
.rotate-overlay .rotate-text {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 5vw, 1.6rem);
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.7);
}
@keyframes rotateHint {
  from { transform: rotate(-90deg); }
  to { transform: rotate(90deg); }
}

/* Během odpočtu a hry na mobilu ve svislém držení → vyzvi k otočení */
body.mobile.playing .rotate-overlay { display: flex; }
@media (orientation: landscape) {
  body.mobile.playing .rotate-overlay { display: none; }
}

/* ---------- Snížený pohyb ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
