/* X GAME — NZÚ kvíz */
.kz {
  --a0: #ff4f64; --a0s: #b8263a;
  --a1: #2f86ff; --a1s: #1b55b0;
  --a2: #ffad1f; --a2s: #b77408;
  --a3: #9a63ff; --a3s: #6236bf;
  --zel: #2bd47d;
  display: flex; flex-direction: column; gap: 12px;
  overflow-x: hidden;
}

/* ---------- časový pruh ---------- */
.kz-casbar { height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; border: 1px solid var(--line); }
.kz-casbar-in {
  height: 100%; width: 100%; border-radius: inherit; transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), #ffe066);
  animation-name: kz-cas; animation-timing-function: linear; animation-fill-mode: both;
}
@keyframes kz-cas {
  0% { transform: scaleX(1); filter: none; }
  70% { filter: none; }
  80% { filter: hue-rotate(-40deg) saturate(1.6); }
  100% { transform: scaleX(0); filter: hue-rotate(-50deg) saturate(2); }
}
.kz-vysl .kz-casbar { height: 5px; opacity: .7; }
.kz-vysl .kz-casbar-in { background: var(--muted); }

/* ---------- hlavička otázky ---------- */
.kz-hlava { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.kz-c { font-weight: 700; color: var(--muted); font-size: 15px; }
.kz-c b { color: var(--text); font-size: 20px; font-weight: 900; }
.kz-obt { color: var(--accent); letter-spacing: 2px; font-size: 15px; }
.kz-obt i { font-style: normal; color: #3b3b4c; }
.kz-obt.obt3 { color: #ff7a45; }
.kz-sek {
  min-width: 64px; text-align: center; font: 900 22px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px;
}
.kz-sek.muted { font: 600 13px/1.2 system-ui, sans-serif; color: var(--muted); min-width: 0; background: none; border: 0; }
.kz-sek.muted span { font-weight: 900; color: var(--text); }
.dochazi .kz-sek { color: var(--red); border-color: var(--red); animation: kz-tep .5s ease-in-out infinite alternate; }
@keyframes kz-tep { to { transform: scale(1.08); } }

/* ---------- otázka ---------- */
.kz-karta {
  background: linear-gradient(160deg, #2a2a3a, #1c1c27); border: 1px solid #3a3a4d; border-radius: 22px;
  padding: 20px 18px; min-height: 120px; display: grid; place-items: center; text-align: center;
  box-shadow: 0 8px 0 #0a0a0f, 0 0 0 1px #ffffff08 inset;
  animation: kz-vjezd .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
.kz-text { margin: 0; font-size: clamp(20px, 5.6vw, 25px); line-height: 1.25; font-weight: 900; letter-spacing: -.01em; text-wrap: balance; }
@keyframes kz-vjezd { from { transform: translateY(14px) scale(.96); opacity: 0; } }

.kz-odpovedi { display: grid; gap: 10px; }
.kz-o {
  --c: var(--a0); --s: var(--a0s);
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px;
  padding: 10px 14px 10px 10px; border: 0; border-radius: 16px; text-align: left;
  background: var(--c); color: #fff; box-shadow: 0 5px 0 var(--s);
  font-weight: 800; font-size: 17px; line-height: 1.2; text-shadow: 0 1px 2px #0005;
  transition: transform .1s, box-shadow .1s, opacity .25s, filter .25s;
  animation: kz-vjezd .35s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: var(--d, 0ms);
}
.kz-o.bez-animace { animation: none; }
.kz-o1 { --c: var(--a1); --s: var(--a1s); }
.kz-o2 { --c: var(--a2); --s: var(--a2s); color: #2a1a00; text-shadow: none; }
.kz-o3 { --c: var(--a3); --s: var(--a3s); }
.kz-o:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--s); }
.kz-tvar {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: #0003; font-size: 20px; color: #fff; text-shadow: none;
}
.kz-o2 .kz-tvar { color: #2a1a00; background: #fff6; }
.kz-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.zamceno .kz-o { opacity: .28; filter: grayscale(.6); transform: none; }
.zamceno .kz-o.vybrana { opacity: 1; filter: none; box-shadow: 0 5px 0 var(--s), inset 0 0 0 3px #fff, 0 0 18px var(--c); }
.zamceno .kz-o:disabled { opacity: .28; }
.zamceno .kz-o.vybrana:disabled { opacity: 1; }

.kz-stav { min-height: 64px; display: grid; gap: 6px; justify-items: center; }
.kz-odeslano {
  display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px;
  animation: kz-vjezd .3s ease both;
}
.kz-odeslano.pozde { color: var(--red); border-color: #ff3b5c55; }
.kz-pocty { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.kz-pocty b { color: var(--text); }
.kz-tecky { display: inline-flex; gap: 4px; }
.kz-tecky i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.kz-tecky i.ano { background: var(--ok); transform: scale(1.15); }

/* ---------- úvod otázky (odpočet) ---------- */
.kz-intro { min-height: 58vh; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.kz-intro-mala { text-transform: uppercase; letter-spacing: .3em; color: var(--muted); font-weight: 800; font-size: 14px; animation: kz-vjezd .4s both; }
.kz-intro-cislo {
  font: 900 104px/1 "Arial Black", Impact, system-ui, sans-serif; color: var(--accent);
  text-shadow: 0 6px 0 #b38f00, 0 0 40px #ffcc0055; animation: kz-bum .55s cubic-bezier(.2, 1.6, .4, 1) both;
}
.kz-intro-cislo span { font-size: 40px; color: var(--muted); text-shadow: none; }
@keyframes kz-bum { from { transform: scale(.3) rotate(-8deg); opacity: 0; } }
.kz-intro .kz-obt { font-size: 18px; animation: kz-vjezd .4s .15s both; }
.kz-intro .kz-obt b { font-size: 14px; letter-spacing: .04em; color: var(--muted); margin-left: 4px; }
.kz-kruh {
  margin-top: 18px; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) 0 0, var(--panel2) 0); border: 4px solid var(--accent);
  font: 900 46px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; box-shadow: 0 0 30px #ffcc0033;
}
.pulz { display: inline-block; animation: kz-pulz .4s ease-out; }
@keyframes kz-pulz { from { transform: scale(1.6); opacity: .3; } }
.kz-tip { margin-top: 14px; color: var(--muted); font-weight: 700; max-width: 300px; }

/* ---------- výsledek ---------- */
.kz-ja {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 9px 14px; border-radius: 16px; font-weight: 900; font-size: 21px;
  animation: kz-bum .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.kz-ja.ok { background: linear-gradient(135deg, #1b8d55, #2bd47d); color: #04150c; box-shadow: 0 6px 0 #11643b; }
.kz-ja.spatne { background: linear-gradient(135deg, #a1203a, #ff3b5c); color: #fff; box-shadow: 0 6px 0 #6e1426; }
.kz-ja.nic { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.kz-plus { font: 900 25px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; animation: kz-plus .9s .25s cubic-bezier(.2, 1.6, .4, 1) both; }
.kz-plus.nula { opacity: .7; }
@keyframes kz-plus { 0% { transform: translateY(18px) scale(.4); opacity: 0; } 60% { transform: translateY(-4px) scale(1.25); opacity: 1; } }
.kz-ohen { font-size: 17px; background: #0004; color: #fff; border-radius: 99px; padding: 4px 10px; animation: kz-ohen .8s .5s ease-in-out both; }
@keyframes kz-ohen { 0% { transform: scale(0); } 50% { transform: scale(1.3) rotate(-6deg); } 100% { transform: scale(1); } }
.kz-otazka-mala { font-weight: 800; font-size: 14.5px; line-height: 1.3; color: #d6d6e0; text-align: center; padding: 0 4px; }
.kz-vysl { gap: 9px; }

.kz-odpovedi.vysl { gap: 6px; }
.kz-odpovedi.vysl .kz-o {
  display: block; min-height: 0; padding: 6px 10px 6px 8px; box-shadow: none; border: 2px solid transparent;
  background: var(--panel); color: var(--text); text-shadow: none; font-size: 14.5px;
}
.kz-o-radek { display: flex; align-items: center; gap: 10px; }
.vysl .kz-tvar { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; background: var(--c); color: #fff; }
.vysl .kz-o2 .kz-tvar { color: #2a1a00; }
.kz-znak { font-weight: 900; font-size: 20px; width: 22px; text-align: center; flex: none; }
.vysl .kz-o.nikdo { opacity: .5; }
.vysl .kz-o.spatna { border-color: #ff3b5c88; background: #2a141b; }
.vysl .kz-o.spatna .kz-znak { color: var(--red); }
.vysl .kz-o.spravna {
  border-color: var(--zel); background: #10291d;
  animation: kz-vjezd .35s both, kz-zare 1.6s .4s ease-in-out infinite alternate;
  animation-delay: var(--d, 0ms), .4s;
}
.vysl .kz-o.spravna .kz-znak { color: var(--zel); }
@keyframes kz-zare { from { box-shadow: 0 0 0 0 #2bd47d00; } to { box-shadow: 0 0 20px 2px #2bd47d77; } }
.klid .kz-o, .klid .kz-ja, .klid .kz-plus, .klid .kz-ohen, .klid .kz-cip { animation-name: none !important; }
.klid .kz-o.spravna { animation: kz-zare 1.6s ease-in-out infinite alternate !important; }

.kz-cipy { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 1px 38px; }
.kz-cip {
  display: inline-flex; align-items: baseline; gap: 4px; max-width: 100%;
  background: #ffffff12; border-radius: 99px; padding: 2px 8px; font-size: 12.5px; font-weight: 700;
  animation: kz-vjezd .3s both; animation-delay: calc(var(--d, 0ms) + 250ms);
}
.kz-cip.ja { background: #ffcc0030; color: var(--accent); }
.kz-cip b { color: var(--zel); }
.kz-cip em { font-style: normal; color: var(--muted); font-weight: 600; font-size: 11px; }

.kz-vysv { display: flex; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 8px 10px; }
.kz-vysv-ik { font-size: 17px; line-height: 1.2; }
.kz-vysv p { margin: 0; font-size: 13.5px; line-height: 1.35; }
.kz-zdroj { margin-top: 5px; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }

.kz-dalsi {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 0; font-weight: 900; font-size: 15px;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 #b38f00;
}
.kz-dalsi:active { transform: translateY(2px); box-shadow: 0 1px 0 #b38f00; }

/* ---------- žebříček ---------- */
.kz-zeb-nadpis { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; margin: 4px 0 -4px 4px; }
.kz-zeb { list-style: none; margin: 0; padding: 0; position: relative; }
.kz-zr {
  position: absolute; left: 0; right: 0; top: 0; height: 40px;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  transition: transform .8s cubic-bezier(.3, 1.3, .5, 1);
}
.kz-zr.ja, .kz-poradi li.ja { border-color: var(--accent); background: #2a2614; }
.kz-zr-m { width: 26px; font-weight: 900; color: var(--muted); flex: none; }
.kz-zr-m.m1 { color: #ffd34d; } .kz-zr-m.m2 { color: #cfd6e4; } .kz-zr-m.m3 { color: #e09a5b; }
.kz-zr-j { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-zr-o { font-size: 12px; }
.kz-zr-b { font: 900 16px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; flex: none; min-width: 52px; text-align: right; }
.kz-zr-plus {
  font: 900 13px/1 system-ui, sans-serif; color: var(--zel); background: #2bd47d1f; border-radius: 99px; padding: 4px 7px;
  animation: kz-odlet 2.4s .4s ease-out both; flex: none;
}
@keyframes kz-odlet { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.15); } 25% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- konec ---------- */
.kz-konec { position: relative; text-align: center; padding-top: 4px; }
.kz-konec-mala { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: 12px; }
.kz-konec-t { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 900; color: var(--accent); text-wrap: balance; animation: kz-bum .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.kz-gratulace { font-weight: 800; font-size: 18px; animation: kz-ohen .8s .8s both; }
.kz-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-top: 10px; min-height: 230px; }
.kz-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; animation: kz-vjezd .5s both; animation-delay: calc(var(--d) + 300ms); }
.kz-pod-jm { font-weight: 900; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p1 .kz-pod-jm { font-size: 17px; color: var(--accent); }
.kz-koruna { display: block; font-size: 30px; line-height: 1; animation: kz-ohen 1s 1.2s both; }
.kz-pod-b { font: 800 13px/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--muted); }
.kz-pod-sloup {
  width: 100%; border-radius: 14px 14px 4px 4px; display: grid; place-items: start center; padding-top: 10px;
  font: 900 34px/1 "Arial Black", Impact, system-ui, sans-serif; color: #0009;
  transform-origin: bottom; animation: kz-rust .7s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: var(--d);
}
.p1 .kz-pod-sloup { height: 130px; background: linear-gradient(#ffe066, #e0a800); box-shadow: 0 0 30px #ffcc0055; }
.p2 .kz-pod-sloup { height: 95px; background: linear-gradient(#eef2f8, #9aa3b5); }
.p3 .kz-pod-sloup { height: 70px; background: linear-gradient(#f0b07a, #a8622c); }
@keyframes kz-rust { from { transform: scaleY(0); } }
.klid .kz-pod, .klid .kz-pod-sloup, .klid .kz-konec-t, .klid .kz-koruna, .klid .kz-gratulace { animation: none; }

.kz-poradi { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.kz-poradi li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-height: 52px; }
.kz-po-jm { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-po-jm small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); }

/* konfety — jen CSS, pár desítek kousků, jemně */
.kz-konfety { position: absolute; inset: -20px -14px auto; height: 420px; overflow: hidden; pointer-events: none; z-index: 0; }
.kz-konec > :not(.kz-konfety) { position: relative; z-index: 1; }
.kz-konfety i {
  position: absolute; top: -16px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; opacity: 0;
  background: var(--accent);
  animation: kz-konfeta var(--t) var(--z) linear 3 both;
}
.kz-konfety i:nth-child(5n+1) { background: var(--a0); }
.kz-konfety i:nth-child(5n+2) { background: var(--a1); width: 6px; height: 6px; border-radius: 50%; }
.kz-konfety i:nth-child(5n+3) { background: var(--zel); }
.kz-konfety i:nth-child(5n+4) { background: var(--a3); }
@keyframes kz-konfeta {
  0% { transform: translate(0, 0) rotate(var(--r)); opacity: 0; }
  10% { opacity: .75; }
  85% { opacity: .6; }
  100% { transform: translate(calc((var(--b) - 2) * 18px), 440px) rotate(calc(var(--r) + 540deg)); opacity: 0; }
}
.kz-konec:not(.vitez) .kz-konfety i { animation-iteration-count: 1; }
.klid .kz-konfety { display: none; }
.kz-sek small { font-size: 14px; color: var(--muted); font-weight: 800; }

/* ---------- kategorie (Super kvíz) ---------- */
.kz-kat {
  display: inline-block; align-self: center; justify-self: center;
  background: var(--kc); color: #120d16; border-radius: 99px; padding: 4px 12px;
  font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 3px 0 #0006; transform: rotate(-2deg);
}
.kz-karta { gap: 10px; }
.kz-intro .kz-kat { font-size: 14px; padding: 6px 14px; animation: kz-bum .5s .2s cubic-bezier(.2, 1.6, .4, 1) both; }
.kz-otazka-mala .kz-kat { font-size: 10px; padding: 2px 8px; margin-right: 6px; vertical-align: 2px; box-shadow: none; transform: none; }

/* Super kvíz: vysvětlení je pointa — větší a čitelnější, zdroj drobně */
.kz-super .kz-vysv { border-left-color: #ff4fa3; background: linear-gradient(160deg, #2a1f30, #1d1a26); padding: 10px 12px; }
.kz-super .kz-vysv p { font-size: 15.5px; line-height: 1.4; font-weight: 600; color: #fff; }
.kz-super .kz-vysv-ik { font-size: 22px; }
.kz-super .kz-zdroj { font-size: 11px; opacity: .8; }
.kz-super .kz-karta { background: linear-gradient(160deg, #33243f, #1d1a27); border-color: #4a3560; }
