/* ============ KALAP: buli-kaszinó ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* iOS Safari 10 óta FIGYELMEN KÍVÜL HAGYJA a user-scalable=no-t, tehát a dupla-
   koppintásos nagyítás él, és emiatt minden koppintás után ~300 ms-ot vár, mielőtt
   click-et küld. Egy olyan játékban, ahol a szorzó közben nő, ettől úgy tűnik, hogy
   a gomb nem érzékeli a nyomást. A manipulation kikapcsolja ezt a várakozást. */
/* minden kattintható elem <button>, tehát ez az egy szabály lefedi az egész appot */
button { touch-action: manipulation; }
/* és legyen LÁTHATÓ, hogy lenyomtad, különben csak találgatsz */
button:active, .btn:active { filter: brightness(1.3); }

/* A felület két rétegből áll: TÖMÖR lapok egy mély, majdnem fekete alapon.
   Az üveghatás (backdrop-filter + áttetsző lap) korábban mindent egyforma
   szürke masszává mosott, mert a lap színe a háttértől függött, tehát nem
   volt két elem között valódi kontraszt. Tömör lapnál a rangsor látszik:
   alap -> lap -> kiemelt lap. A "designer" érzetet a lap tetején futó
   világos hajszálvonal adja (inset box-shadow), nem a homály. */
:root {
  --bg: #0a0810;
  --bg2: #14101f;
  --surface: #17131f;
  --surface-2: #211b2e;
  --card: #17131f;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.18);
  --edge: inset 0 1px 0 rgba(255,255,255,0.07);
  --text: #f4f1fa;
  --muted: #9b93b8;
  --dim: #6d6683;
  --accent: #b043ff;
  --accent2: #ff3d8b;
  --gold: #ffc531;
  --green: #3dff9a;
  --red: #ff4d5e;
  --beer: #f5a623;
  --lift: 0 10px 30px rgba(0,0,0,0.45);
}

html, body { height: 100%; }
body {
  font-family: 'Rubik', -apple-system, system-ui, sans-serif;
  /* Egy meleg fénykör a fejléc mögött, és egy hideg a lap alján. Korábban két
     nagy neonfolt úszott a képernyő két sarkában, amitől a tartalom mögötti
     háttér is színes volt, tehát a színnek nem maradt jelentése. */
  background:
    radial-gradient(760px 420px at 50% -12%, rgba(176,67,255,0.20), transparent 68%),
    radial-gradient(620px 380px at 50% 112%, rgba(255,61,139,0.10), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Pénzösszeg SOHA ne ugráljon számjegyváltáskor: a Rubik alap számai eltérő
   szélességűek, ettől a növekvő szorzó és az egyenleg is remeg. */
.kalap-amount, .pbal, .pdrinks, .det-mult, .hilo-pot, .rank-row .profit,
.settle-kalap, #settle-table td, .scratch-acc, .dice-sum, .bj-total {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px;
  /* Allo appkent (fokepernyorol inditva) nincs Safari-sav, tehat a tartalom
     bemenne a bevagas ala. A also inset mar megvolt, a felso hianyzott. */
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 900px;
  margin: 0 auto;
}

/* ---- typography ---- */
/* Két betűtípus: az Outfit a címeké és a számoké (feszesebb, mértanibb, nagy
   méretben nem folyik szét), a Rubik marad a folyószövegé. */
h1.logo, h2, .kalap-amount, .next-game-name, .det-mult, .foci-score,
.btn-big, .rank-flash-box, .overlay-box h2 {
  font-family: 'Outfit', 'Rubik', -apple-system, system-ui, sans-serif;
}
h1.logo {
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 900;
  text-align: center;
  background: linear-gradient(120deg, var(--gold), var(--accent2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 5vh;
}
.tagline { text-align: center; color: var(--muted); margin: 10px 0 22px; font-size: 0.92rem; line-height: 1.45; }
h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; }
.hint { color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin: 10px 0 8px; }
.legal { color: var(--dim); font-size: 0.74rem; text-align: center; margin-top: 18px; line-height: 1.4; }

/* ---- cards & buttons ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--edge), var(--lift);
}

/* A gomb-rangsor: EGY erős gomb van egy képernyőn (btn-accent vagy btn-gold),
   a többi csendes. Korábban minden gomb köré ment egy 24 pixeles színes fény,
   ettől három gomb egyformán kiabált, és a szem nem találta a fontosat. */
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 18px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: var(--edge);
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.btn-big {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 17px 24px;
  min-height: 58px;
  width: 100%;
  margin-top: 12px;
  border-radius: 18px;
}
.btn-accent {
  background: linear-gradient(115deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  box-shadow: 0 8px 26px rgba(176,67,255,0.30), inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-accent:disabled { background: var(--surface-2); color: var(--muted); }
.btn-gold {
  background: linear-gradient(115deg, #ffb300, #ffd75e);
  color: #3a2a00;
  border: none;
  box-shadow: 0 8px 26px rgba(255,197,49,0.26), inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-danger { background: rgba(255,77,94,0.14); border-color: rgba(255,77,94,0.42); color: #ff8b96; }
.btn-beer { background: rgba(245,166,35,0.16); border-color: rgba(245,166,35,0.45); }
.btn-icon { font-size: 1.25rem; padding: 10px 14px; min-height: 44px; }

/* ---- setup ---- */
.setup-wrap { width: 100%; max-width: 560px; margin: 0 auto; }
.setup-players { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.add-player-row { display: flex; gap: 8px; }
.add-player-row input {
  flex: 1;
  font-family: inherit;
  font-size: 1.05rem;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(0,0,0,0.32);
  color: var(--text);
  outline: none;
  min-height: 48px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.add-player-row input::placeholder { color: var(--dim); }
.add-player-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176,67,255,0.18); }

/* ---- player chips ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--pc, var(--border));
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}
.pchip:active { transform: scale(0.94); }
.pchip.selected { background: var(--pc); color: #10091c; border-color: var(--pc); box-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.pchip .sub { font-weight: 600; font-size: 0.8rem; opacity: 0.8; }
.pchip .x { margin-left: 4px; opacity: 0.6; }

.amount-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn.amount { flex: 1; min-width: 70px; }
.btn.amount.selected { background: linear-gradient(120deg, var(--accent), var(--accent2)); border: none; }

.setup-actions { display: flex; gap: 10px; margin-top: 20px; }
.setup-actions .btn { flex: 1; }
.game-setup { width: 100%; max-width: 560px; margin: 0 auto; padding-top: 8px; }

/* ---- home ----
   A kalap a képernyő egyetlen hőse: saját sávot kap, a többi elem halkabb.
   Korábban a fejléc egy sorban ült a beállítás-gombbal, egyforma súllyal. */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255,197,49,0.11), rgba(255,197,49,0) 62%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--edge), var(--lift);
}
.kalap-display { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kalap-label { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--dim); font-weight: 800; text-transform: uppercase; }
.kalap-amount {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(120deg, var(--gold), #fff3c4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kalap-amount.bump { animation: bump 0.4s; }
@keyframes bump { 30% { transform: scale(1.15); } }

/* A játékos-csíkot vízszintesen görgetjük, de a görgetősáv rejtve marad:
   mobilon a látható scrollbar csúnya, a kártya fele-levágása mutatja, hogy van tovább. */
.player-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.player-strip::-webkit-scrollbar { display: none; }
.pcard {
  position: relative;
  min-width: 112px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px 10px 16px;
  text-align: left;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: var(--edge);
}
/* Színsáv a kártya BAL oldalán: a névvel egy vonalban fut, így a szem
   a nevet és a színt egyszerre olvassa. Felül futó vonalként korábban
   elveszett a lap tetején lévő hajszálvonal mellett. */
.pcard::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--pc);
}
.pcard .pname { font-weight: 800; font-size: 0.9rem; letter-spacing: -0.01em; white-space: nowrap; }
.pcard .pbal { font-weight: 800; font-size: 1.1rem; margin-top: 2px; letter-spacing: -0.01em; }
.pcard .pbal.pos { color: var(--green); }
.pcard .pbal.neg { color: var(--red); }
.pcard .pdrinks { color: var(--beer); font-size: 0.78rem; margin-top: 2px; }
.pcard .pbuyin { color: rgba(255,255,255,0.55); font-size: 0.7rem; margin-top: 2px; letter-spacing: 0.01em; }
.home-cash { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 3px; }
.home-cash.bad { color: #ff6b6b; font-weight: 700; }
.result-line .kor-net { color: rgba(255,255,255,0.5); font-size: 0.8em; font-weight: 600; }
.pcard { cursor: pointer; }
.pcard .pbuyin-hint { display: block; font-size: 0.62rem; color: rgba(255,255,255,0.35); margin-top: 3px; }
.pcard .pbadges { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; font-size: 0.85rem; line-height: 1; }
.kalap-display { cursor: pointer; }
.poker-row { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.poker-label { text-align: center; font-weight: 700; color: var(--gold); min-height: 1.4em; font-size: 0.95rem; }
.poker-actions { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 0; }
.poker-result { text-align: center; padding: 10px 16px; font-weight: 700; min-height: 2em; }
.poker-result.win { color: #4ade80; }
.poker-result.lose { color: #ff6b6b; }
.lo-track { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.lo-lane { position: relative; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); overflow: hidden; }
.lo-lane .lo-odds { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 0.72rem; color: rgba(255,255,255,0.45); font-weight: 700; }
.lo-lane .lo-horse { position: absolute; left: 4px; top: 50%; margin-top: -14px; font-size: 1.6rem;
  transform: translateX(0); will-change: transform; }
.lo-lane.nyert { border-color: var(--gold); background: rgba(255,200,60,0.12); }
.lo-lane .lo-nev { position: absolute; left: 44px; top: 50%; transform: translateY(-50%);
  font-size: 0.78rem; color: rgba(255,255,255,0.6); font-weight: 700; }
.lo-bets { padding: 4px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.lo-bets .lo-pick { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lo-tipp { font-size: 0.8rem; color: rgba(255,255,255,0.6); text-align: center; }
.lo-pick-btn { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.lo-btn-fo { font-weight: 800; }
.lo-btn-stat { font-size: 0.68rem; color: rgba(255,255,255,0.5); font-weight: 600; letter-spacing: 0.06em; }
.lo-lane .lo-forma { font-size: 0.6rem; color: rgba(255,255,255,0.35); letter-spacing: 0.08em; }
.lo-lane .lo-odds { text-align: right; line-height: 1.25; }

/* ---- menetrend ----
   Korábban a sáv középre volt igazítva (justify-content: center), ezért a
   menetrend és az indító gomb közé egy ökölnyi üres folt került, a gomb meg
   a képernyő közepén lógott. Most a tartalom felülről indul, az indító gomb
   pedig margin-top: auto-val a talpra ül: mindig ugyanott van, hüvelykujjnyira. */
.schedule-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-evenly;
  gap: 12px;
}
.round-progress {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-align: center;
}
/* NINCS text-transform: uppercase. A tesztek a #round-progress innerText-jében
   a kisbetűs "1/11. játék"-ra illesztenek, a CSS uppercase pedig az innerText-et
   is nagybetűsíti -- három teszt bukott el tőle. A kiemelést betűköz adja. */
/* A 11 csempe fix 46 pixeles: így 390 pixeles telefonon két tömör sorba fut,
   nem három szakadozottba, és 100 pixel magasságot spórol a gombnak. */
.schedule-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--edge);
}
.sched-item {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--surface-2);
  border: 1px solid transparent;
}
.sched-item.done { opacity: 0.28; }
.sched-item.current {
  border: 2px solid var(--gold);
  background: rgba(255,197,49,0.12);
  box-shadow: 0 0 20px rgba(255,197,49,0.4);
  transform: scale(1.14);
  animation: pulse 1.4s infinite;
}
.sched-item.future { opacity: 0.62; }
@keyframes pulse { 50% { box-shadow: 0 0 32px rgba(255,197,49,0.7); } }
.schedule-area .btn-big { max-width: 460px; width: 100%; margin: 0 auto; }
/* A soron következő játék neve a képernyő hőse. Korábban a .round-progress
   halvány színét és betűközét örökölte, ezért ugyanolyan szürke volt, mint a
   fölötte futó apró segédsor. */
.next-game-name {
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-weight: 900;
  text-align: center;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 6px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  flex: 1;
  align-content: start;
}
.game-card {
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--edge);
  border-radius: 20px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, border-color 0.2s;
  text-align: center;
}
.game-card:active { transform: scale(0.96); }
.game-card:hover { border-color: var(--accent); box-shadow: 0 6px 30px rgba(176,67,255,0.25); }
.game-emoji { font-size: 2.4rem; }
.game-name { font-weight: 800; font-size: 1.05rem; }
.game-desc { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.game-card-alt { background: rgba(255,197,49,0.07); }

/* A három másodlagos gomb egy sávba kerül: közös keret, belső elválasztók.
   Külön lebegő gombokként korábban ugyanolyan hangosak voltak, mint az indító. */
.home-footer {
  display: flex;
  gap: 0;
  margin-top: 14px;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--edge);
}
.home-footer .btn {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 4px;
  min-height: 44px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--muted);
}
.home-footer .btn:active { background: var(--surface-2); color: var(--text); }
.home-footer .btn + .btn { border-left: 1px solid var(--border); border-radius: 0; }

/* ---- detonator ---- */
#screen-detonator { padding: 0; max-width: none; }
#det-setup { padding: 16px; }
#det-game { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.det-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.det-mult {
  font-size: clamp(4rem, 18vw, 9rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(255,197,49,0.3);
  z-index: 2;
}
.det-mult.boom { background: linear-gradient(180deg, #fff, var(--red)); -webkit-background-clip: text; background-clip: text; }
/* kockázati skála a szorzó alatt */
.det-risk { width: min(86%, 420px); z-index: 2; margin-top: 2px; }
.det-risk-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.det-risk-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #3dff9a;
  transition: width 0.12s linear, background 0.4s ease;
}
.det-risk-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.det-risk-label { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; }
.det-risk-pct { font-size: 0.68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.det-bomb { font-size: clamp(3rem, 10vw, 5rem); margin-top: 8px; z-index: 2; }
.det-bomb.shake { animation: shake 0.3s infinite; }
@keyframes shake {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  25% { transform: translate(-3px,2px) rotate(-4deg); }
  75% { transform: translate(3px,-2px) rotate(4deg); }
}
.det-fuse {
  position: absolute;
  bottom: 0; left: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--gold), var(--red));
  width: 100%;
  transform-origin: left;
  z-index: 1;
}
body.explode { animation: explode-shake 0.5s; }
@keyframes explode-shake {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-12px,8px); }
  30% { transform: translate(10px,-10px); }
  50% { transform: translate(-8px,-6px); }
  70% { transform: translate(8px,6px); }
  90% { transform: translate(-4px,2px); }
}
.det-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  flex: 0 0 auto;
}
.det-pbtn {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  color: #10091c;
  background: var(--pc);
  border: none;
  border-radius: 18px;
  padding: 20px 10px;
  cursor: pointer;
  box-shadow: 0 0 20px var(--pc);
  transition: transform 0.08s, opacity 0.2s;
}
.det-pbtn:active { transform: scale(0.93); }
.det-pbtn.out {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  box-shadow: none;
  border: 2px solid var(--pc);
}
.det-pbtn.busted {
  background: rgba(255,77,94,0.15);
  color: var(--red);
  box-shadow: none;
  border: 2px solid var(--red);
}
.det-pbtn .sub { display: block; font-size: 0.8rem; font-weight: 700; margin-top: 3px; }

/* ---- soron lévő játékos sávja ---- */
.turn-banner {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 14px;
  min-height: 1.6em;
}

/* ---- wheel ---- */
.wheel-wrap { position: relative; display: flex; justify-content: center; margin: 14px 0; }
#wheel-canvas { max-width: min(86vw, 360px); height: auto; }
.wheel-pointer {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--gold);
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ---- hilo ---- */
#hilo-game { display: flex; flex-direction: column; align-items: center; flex: 1; padding-top: 10px; }
.hilo-info { font-size: 1.15rem; font-weight: 800; margin-bottom: 14px; }
.hilo-cards { display: flex; gap: 20px; margin-bottom: 16px; }
.playing-card {
  width: 120px;
  height: 170px;
  border-radius: 14px;
  background: #fdfbf5;
  color: #1b1b1b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.playing-card.red { color: #d0202e; }
.playing-card.back {
  background: repeating-linear-gradient(45deg, #2a1b4d, #2a1b4d 8px, #34255c 8px, #34255c 16px);
  color: var(--accent);
  border: 2px solid var(--accent);
}
.hilo-pot { font-size: 1.6rem; font-weight: 900; color: var(--gold); margin-bottom: 16px; }
.hilo-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; padding: 0 16px 16px; }

/* ---- dice ---- */
#dice-game { display: flex; flex-direction: column; flex: 1; width: 100%; max-width: 700px; margin: 0 auto; }
.dice-pot {
  text-align: center;
  font-weight: 800;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 0 2px;
}
.dice-pot b { color: var(--gold); font-size: 1.15rem; }
.dice-arena {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  min-height: 0;
  padding: 10px 2px calc(10px + env(safe-area-inset-bottom));
}
.dice-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px 8px;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 0.3s;
}
.dice-side.winner { border-color: var(--green); box-shadow: 0 0 30px rgba(61,255,154,0.28); }
.dice-side.loser { opacity: 0.55; }
.dice-vs { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; opacity: 0.8; }
.dice-name { font-size: clamp(0.95rem, 4vw, 1.2rem); font-weight: 900; text-align: center; line-height: 1.2; }
.dice-sum {
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-height: 1em;
}
.dice-sum.pending { color: var(--muted); }
.dice-cubes { display: flex; gap: 8px; justify-content: center; }
.die {
  width: clamp(42px, 15vw, 62px);
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(155deg, #fffdf6, #e6ddc7);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.18), 0 6px 14px rgba(0,0,0,0.45);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 14%;
  gap: 4%;
}
.die i {
  background: #241a33;
  border-radius: 50%;
  width: 100%;
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
}
.dice-cubes.rolling .die { animation: die-tumble 0.32s infinite ease-in-out; }
.dice-cubes.rolling .die:nth-child(2) { animation-delay: 0.09s; }
@keyframes die-tumble {
  0%   { transform: translateY(0) rotate(0deg); }
  30%  { transform: translateY(-16px) rotate(-14deg); }
  60%  { transform: translateY(0) rotate(10deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
.die.landed { animation: die-land 0.35s; }
@keyframes die-land {
  0% { transform: scale(1.18) rotate(-6deg); }
  60% { transform: scale(0.96) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
#screen-dice { max-width: 700px; justify-content: flex-start; }

/* ---- rank ---- */
.rank-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pc);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--edge);
}
.rank-row .drinks { flex-shrink: 0; }
/* A "+1400 Ft" korábban két sorba tört és belelógott a kártya szélébe:
   a név vitte el a helyet (flex: 1 minimum szélesség nélkül). A név most
   zsugorodhat és három pontot kap, a nyereség sosem törik. */
/* :first-child KELL ide. A nyereség spanje `class="profit pos"` (pos = pozitív),
   ezért a puszta .pos szelektor ráhúzta a helyezés-szám 1.6em fix szélességét,
   és a "+1400 Ft" 32 pixelbe préselve kilógott a kártyából. */
.rank-row .pos:first-child { font-size: 1.25rem; font-weight: 900; width: 1.6em; flex-shrink: 0; color: var(--dim); }
.rank-row .name { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .profit { font-weight: 800; flex-shrink: 0; white-space: nowrap; }
.rank-row .profit.pos { color: var(--green); }
.rank-row .profit.neg { color: var(--red); }
.rank-row .drinks { color: var(--beer); font-size: 0.9rem; }
.rank-card { display: block; }
.rank-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rank-head .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 1.05rem; }
.rank-head .pos { flex-shrink: 0; }
.rank-head .profit { flex-shrink: 0; white-space: nowrap; font-weight: 800; }
.rank-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.rank-sub b { color: var(--text); }
.rank-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 14px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 2px 0;
}
.stat-row b { color: var(--text); }
@media (max-width: 420px) { .rank-stats { grid-template-columns: 1fr; } }

.ach-list { display: flex; flex-direction: column; gap: 6px; }
.ach-item { color: var(--muted); font-size: 0.95rem; padding: 6px 4px; }
.ach-item b { color: var(--text); }

/* ---- settle ---- */
#settle-table table { width: 100%; border-collapse: collapse; }
#settle-table th, #settle-table td { padding: 11px 6px; text-align: right; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
#settle-table tr:last-child td { border-bottom: none; }
#settle-table th:first-child, #settle-table td:first-child { text-align: left; }
#settle-table th { color: var(--dim); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.settle-kalap {
  font-size: 1.15rem; font-weight: 800; text-align: center; color: var(--gold);
  margin: 16px 0 10px; padding: 12px;
  border-radius: 16px;
  background: rgba(255,197,49,0.09);
  border: 1px solid rgba(255,197,49,0.22);
}
.settle-actions { display: flex; flex-direction: column; gap: 8px; }
td.pos { color: var(--green); font-weight: 700; }
td.neg { color: var(--red); font-weight: 700; }

/* ---- overlay ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,5,16,0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.overlay-box {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 26px 22px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: pop 0.25s;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 24px 60px rgba(0,0,0,0.6);
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.overlay-box h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.overlay-box .big-emoji { font-size: 3.4rem; display: block; margin-bottom: 8px; }
.overlay-box p { margin-bottom: 10px; line-height: 1.4; }
.overlay-box .result-line { font-size: 1.05rem; margin: 4px 0; font-weight: 700; }
.overlay-box .result-line.win { color: var(--green); }
.overlay-box .result-line.lose { color: var(--red); }
.overlay-box .result-line.beer { color: var(--beer); }
.overlay-box .btn { margin-top: 14px; }
.overlay-box .howto {
  text-align: left;
  margin: 10px 0 12px 1.4em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.overlay-box .howto li { margin-bottom: 5px; padding-left: 4px; }
.overlay-box .howto li::marker { color: var(--gold); font-weight: 800; }

/* ---- toast ---- */
/* ---------- ranglista-villanás ---------- */
.rank-flash {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 6, 20, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.rank-flash.show { opacity: 1; }
.rank-flash-box {
  width: min(90vw, 420px);
  background: linear-gradient(160deg, #241a3d, #17102a);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 18px 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.rf-title {
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 12px;
}
.rf-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 12px;
  animation: rf-in 0.34s ease both;
}
.rf-row:nth-child(even) { background: rgba(255,255,255,0.04); }
@keyframes rf-in {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.rf-pos { width: 26px; font-weight: 800; }
.rf-emoji { font-size: 1.15rem; }
.rf-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-up   { color: var(--green); font-size: 0.72rem; font-weight: 800; }
.rf-down { color: var(--red);   font-size: 0.72rem; font-weight: 800; }
.rf-same { color: var(--muted); font-size: 0.72rem; }
.rf-net { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 74px; text-align: right; }
.rf-net.plus  { color: var(--green); }
.rf-net.minus { color: var(--red); }

.toast-holder {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: linear-gradient(120deg, rgba(176,67,255,0.95), rgba(255,61,139,0.95));
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: toast-in 0.3s, toast-out 0.4s 3.3s forwards;
}
.toast.ach { background: linear-gradient(120deg, #ffb300, #ffd75e); color: #3a2a00; }
@keyframes toast-in { from { transform: translateY(-30px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-20px); opacity: 0; } }

/* ---- confetti ---- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 70;
}

/* ---- settings ---- */
.settings-panel {
  position: fixed;
  inset: 0;
  background: rgba(8,5,16,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55;
  padding: 20px;
}
.settings-panel .card { width: 100%; max-width: 420px; max-height: 88vh; max-height: 88dvh; overflow-y: auto; }
.setting-block { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.setting-block .btn { width: 100%; }
.setting-block .hint { margin: 0 0 8px; font-size: 0.82rem; text-align: left; }
.setting-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.setting-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.setting-row select {
  font-family: inherit;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.4);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---- feles-rulett ---- */
.roul-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}
.roul-pot { color: var(--muted); font-weight: 700; font-size: 0.95rem; line-height: 1.45; }
.roul-pot b { color: var(--gold); }

/* a tár: ahány játékos hátravan, annyi kamra, egyben az egyik éles */
.roul-cylinder {
  position: relative;
  width: min(62vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #4a4458, #221c30 60%, #16121f);
  border: 3px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 12px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.4s;
}
.roul-cylinder.hot { box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 42px rgba(255,77,94,0.55); }
.roul-chambers { position: absolute; inset: 0; }
.roul-chambers.spin { animation: cyl-spin 0.9s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes cyl-spin { from { transform: rotate(0); } to { transform: rotate(540deg); } }
.chamber {
  position: absolute;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0c0812;
  border: 2px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.9);
  transform: translate(-50%, -50%);
  transition: background 0.3s, border-color 0.3s, opacity 0.3s;
}
.chamber.spent { background: #1d1a26; border-color: rgba(255,255,255,0.08); opacity: 0.45; }
.chamber.live { background: radial-gradient(circle at 35% 30%, #ff8f9c, #b3242f); border-color: #ff4d5e; }
.roul-odds {
  position: relative;
  z-index: 2;
  text-align: center;
  font-weight: 900;
  line-height: 1.15;
}
.roul-odds .big { display: block; font-size: clamp(1.8rem, 9vw, 2.6rem); color: var(--red); }
.roul-odds .sub { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; }
.roul-status { color: var(--muted); font-size: 1.05rem; min-height: 1.4em; }
.roul-player { font-size: clamp(1.4rem, 6.5vw, 2.1rem); font-weight: 900; min-height: 1.3em; }
.roul-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.roul-survivors { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 1.4rem; min-height: 1.6em; }
.roul-survivors span { animation: pop 0.3s; }
#btn-trigger { font-size: 1.25rem; }
#screen-roulette.blast { animation: recoil 0.35s; }
@keyframes recoil { 30% { transform: translateX(-14px) rotate(-2deg); } }

/* ---- villámkéz ---- */
#screen-reflex { padding: 0; max-width: none; }
.reflex-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  min-height: 45vh;
}
.reflex-stage.wait { background: radial-gradient(circle at 50% 50%, rgba(255,77,94,0.25), transparent 70%); }
.reflex-stage.go { background: radial-gradient(circle at 50% 50%, rgba(61,255,154,0.35), transparent 70%); }
.reflex-signal { font-size: clamp(2rem, 10vw, 4.5rem); font-weight: 900; text-align: center; }
.reflex-stage.go .reflex-signal { color: var(--green); text-shadow: 0 0 40px rgba(61,255,154,0.8); animation: pop 0.15s; }

/* ---- virtuális foci ---- */
.foci-teams { display: flex; gap: 10px; margin-bottom: 12px; }
.foci-team-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--tc);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: center;
}
.foci-team-card .tname { font-weight: 900; font-size: 1.05rem; margin-bottom: 6px; }
.foci-team-card .trow { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); padding: 3px 0; }
.foci-team-card .trow b { color: var(--text); }
.foci-team-card .tstar { font-size: 0.8rem; color: var(--gold); margin-top: 6px; }
.foci-odds { color: var(--muted); font-size: 0.85rem; text-align: center; margin-bottom: 10px; }

/* a ket csapat szembeallitva, hogy telefonon egy kepernyon osszehasonlithato legyen */
.foci-cmp {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 12px 10px; margin-bottom: 12px;
}
.cmp-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.cmp-head b { font-size: 0.9rem; font-weight: 900; line-height: 1.2; }
.cmp-head b:last-child { text-align: right; }
.cmp {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 0.95rem;
}
.cmp > span { font-size: 0.72rem; color: var(--muted); text-align: center; white-space: nowrap; }
.cmp > b { font-weight: 800; }
.cmp > b:last-child { text-align: right; }
.cmp .cwin { color: var(--gold); }
.cmp-star b { font-size: 0.75rem; color: var(--gold); font-weight: 700; }
/* utolso 5 meccs: valodi eredmeny, a szin mondja meg, nyertek-e */
.foci-last { margin-bottom: 10px; }
.fl-team { font-size: 0.82rem; font-weight: 800; }
.fl-team span { color: var(--muted); font-weight: 600; font-size: 0.72rem; }
.foci-last .hint { margin: 2px 0 0; font-size: 0.7rem; }
.fformrow { display: flex; gap: 5px; justify-content: flex-start; margin: 6px 0 2px; }
.fform {
  font-size: 0.75rem; font-weight: 900; line-height: 1; text-align: center;
  padding: 5px 6px; border-radius: 6px; min-width: 34px;
}
.f-GY { background: #1d6b45; color: #9ff5c8; }
.f-D  { background: #5c5324; color: #ffe9a3; }
.f-V  { background: #6d2434; color: #ffb3c1; }

/* gyozelmi eselyek egy savon */
.foci-bar { display: flex; height: 30px; border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.fb-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #0d0a16; min-width: 0; overflow: hidden;
}
.fb-home { background: #3dd6ff; }
.fb-draw { background: #8b86a8; }
.fb-away { background: #ff5e7e; }
.foci-bar-key { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--muted); margin-bottom: 12px; }
.foci-bar-key span:nth-child(2) { text-align: center; }
.foci-bar-key span:last-child { text-align: right; }

.foci-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.ffact {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 10px; font-size: 0.78rem; color: var(--muted);
}
.ffact b { color: var(--text); font-size: 0.9rem; white-space: nowrap; }

.foci-lines {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px;
}
.fl-title { font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.fl-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 2px 0; }
.fl-row b { font-weight: 800; }
.fl-row span { color: var(--muted); }
.foci-note { font-size: 0.72rem; color: var(--muted); line-height: 1.45; margin: 0 0 4px; }
.foci-markets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.market-btn {
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.market-btn .modds { color: var(--gold); font-weight: 900; font-size: 1.05rem; }
.market-btn.selected { background: linear-gradient(120deg, var(--accent), var(--accent2)); border: none; box-shadow: 0 0 20px rgba(176,67,255,0.5); }
.market-btn.taken-hint { opacity: 0.85; }
.foci-scoreboard {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin: 10px auto;
  max-width: 640px;
  width: 100%;
}
.foci-sb-team { flex: 1; text-align: center; font-weight: 900; font-size: clamp(0.95rem, 3.5vw, 1.25rem); }
.foci-sb-mid { text-align: center; }
.foci-score { font-size: clamp(2rem, 9vw, 3.2rem); font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.foci-score.goal-flash { animation: bump 0.5s; color: var(--green); }
.foci-minute { color: var(--muted); font-weight: 700; }
.foci-feed {
  flex: 1;
  overflow-y: auto;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  padding: 4px 2px 16px;
}
.feed-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.95rem;
  animation: feed-in 0.25s;
}
.feed-item.goal { border-color: var(--green); background: rgba(61,255,154,0.1); font-weight: 800; }
.feed-item.card-y { border-color: var(--gold); }
.feed-item.card-r { border-color: var(--red); background: rgba(255,77,94,0.12); font-weight: 800; }
@keyframes feed-in { from { transform: translateY(-8px); opacity: 0; } }
#foci-match { display: flex; flex-direction: column; flex: 1; min-height: 0; max-width: 640px; margin: 0 auto; width: 100%; }

/* a meccsóra csíkja */
.foci-clock {
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 0 auto 10px;
  max-width: 640px;
  width: 100%;
}
.foci-clock-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.15s linear;
}

/* a pálya */
.foci-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 34vh;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.16);
  background: repeating-linear-gradient(90deg, #186a3f 0 9%, #145c37 9% 18%);
  box-shadow: inset 0 0 60px rgba(0,0,0,0.45);
  margin-bottom: 10px;
  flex: 0 0 auto;
}
.pitch-line { position: absolute; background: rgba(255,255,255,0.5); }
.pitch-mid { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-1px); }
.pitch-circle {
  position: absolute;
  left: 50%; top: 50%;
  width: 26%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
}
.pitch-box {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 15%; height: 54%;
  border: 2px solid rgba(255,255,255,0.5);
}
.pitch-box-l { left: 0; border-left: none; border-radius: 0 8px 8px 0; }
.pitch-box-r { right: 0; border-right: none; border-radius: 8px 0 0 8px; }
.pitch-goal {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 4%; height: 24%;
  background: rgba(255,255,255,0.32);
}
.pitch-goal-l { left: 0; border-radius: 0 6px 6px 0; }
.pitch-goal-r { right: 0; border-radius: 6px 0 0 6px; }
.foci-ball {
  position: absolute;
  left: 50%; top: 50%;
  font-size: clamp(1.4rem, 6vw, 2rem);
  line-height: 1;
  transform: translate(-50%, -50%);
  transition: left 0.5s cubic-bezier(0.34, 1.2, 0.5, 1), top 0.5s ease-out;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
  z-index: 2;
}
.foci-ball.kick { animation: ball-spin 0.5s linear; }
@keyframes ball-spin { to { rotate: 360deg; } }
.foci-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.6rem, 8vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 4px 14px rgba(0,0,0,0.7);
}
.foci-flash.show { animation: flash-in 1.1s ease-out; }
@keyframes flash-in {
  0% { opacity: 0; transform: scale(0.6); }
  25% { opacity: 1; transform: scale(1.08); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}
.foci-pitch.danger-l { box-shadow: inset 24px 0 50px rgba(255,77,94,0.45), inset 0 0 60px rgba(0,0,0,0.45); }
.foci-pitch.danger-r { box-shadow: inset -24px 0 50px rgba(255,77,94,0.45), inset 0 0 60px rgba(0,0,0,0.45); }

/* élő fogadás-szelvények */
.foci-tickets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.foci-ticket {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: border-color 0.3s, background 0.3s;
}
.foci-ticket.live-win { border-color: var(--green); background: rgba(61,255,154,0.12); }
.foci-ticket.live-lose { border-color: var(--red); background: rgba(255,77,94,0.1); opacity: 0.75; }
.foci-ticket .tk-mark { font-size: 0.9rem; }

/* ---- félkarú rabló ---- */
.slots-wrap { text-align: center; }
.slots-reels { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.reel {
  width: clamp(84px, 24vw, 120px);
  height: clamp(100px, 28vw, 140px);
  font-size: clamp(3rem, 12vw, 4.5rem);
  background: linear-gradient(180deg, #241a3f, #17102b);
  border: 2px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
  color: var(--text);
}
.reel.spinning { animation: reel-blur 0.09s infinite; }
@keyframes reel-blur { 50% { transform: translateY(3px); filter: blur(1px); } }
.reel.held { border-color: var(--gold); box-shadow: 0 0 22px rgba(255,197,49,0.5); transform: scale(1.05); }
.reel:disabled { cursor: default; opacity: 1; }

/* ---- kassza-ellenőrzés (kassza-szünet és Kalap-nyeremény) ---- */
.cash-check {
  margin: 14px auto 4px;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,0.28);
  text-align: left;
}
.cc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; padding: 3px 0; }
.cc-row span { color: var(--muted); }
.cc-row b { font-variant-numeric: tabular-nums; }
.cc-sum {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: #9ce6ad;
}
.cash-check.bad { border-color: #ff6b6b; }
.cash-check.bad .cc-sum { color: #ff8b8b; font-weight: 700; }

/* kétsoros gomb: fő felirat + alatta a költség, hogy ne lógjon ki telefonon */
.btn-sub { line-height: 1.05; padding-top: 10px; padding-bottom: 10px; }
.btn-sub small { display: block; font-size: 0.62em; font-weight: 600; opacity: 0.85; margin-top: 3px; }

/* ---- slots nyerőtábla (kategóriák) ---- */
.slots-table {
  margin: 14px auto 6px;
  max-width: 340px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.st-row {
  display: grid;
  grid-template-columns: 1fr 62px 62px;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.86rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.st-row:first-child { border-top: 0; }
.st-row b { text-align: right; font-variant-numeric: tabular-nums; }
.st-head {
  background: rgba(255,255,255,0.06);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.st-head b { font-weight: 600; }
.st-t1 { background: rgba(120,180,255,0.12); }
.st-t1 b { color: #8fc4ff; }
.st-t2 { background: rgba(255,197,49,0.10); }
.st-t2 b { color: var(--gold); }
.st-t3 b { color: #b9f6c3; }
.st-t4 { color: var(--muted); }
.st-t4 b { color: #cfcfe0; }
.st-t5 { color: var(--muted); }
.st-t5 b { color: #ff8b8b; }

/* ---- mystery box ---- */
.mystery-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.mbox {
  aspect-ratio: 1;
  font-size: clamp(2.4rem, 10vw, 4rem);
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.2s, box-shadow 0.2s;
  color: var(--text);
}
.mbox:active { transform: scale(0.93); }
.mbox.opened { background: rgba(255,197,49,0.1); border-color: var(--gold); font-size: clamp(1.8rem, 7vw, 2.6rem); }
.mbox.shaking { animation: shake 0.3s infinite; }
.mystery-picks { display: flex; flex-direction: column; gap: 6px; }
.mpick { font-size: 0.95rem; color: var(--muted); }
.mpick b { color: var(--text); }
@media (max-width: 420px) { .mystery-boxes { grid-template-columns: repeat(2, 1fr); } }

/* ---- kaparós sorsjegy ---- */
.scratch-prizes {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 5px; margin-bottom: 14px; font-size: 0.78rem;
}
.sp-label { color: var(--muted); width: 100%; text-align: center; margin-bottom: 2px; font-size: 0.85rem; }
.sp-chip {
  padding: 3px 7px; border-radius: 999px; font-weight: 800; white-space: nowrap;
  background: rgba(255,197,49,0.12); border: 1px solid rgba(255,197,49,0.4); color: var(--gold);
}
.sp-chip.sp-bomb { background: rgba(255,77,94,0.12); border-color: rgba(255,77,94,0.45); color: var(--red); }
.scratch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.scell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900;
  color: var(--text);
  background: linear-gradient(145deg, #6d6a86, #46435c);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s, filter 0.2s;
}
.scell:active { transform: scale(0.94); }
.scell:disabled { cursor: default; }
.scell.scratching { animation: shake 0.18s infinite; filter: brightness(1.3); }
.scell.money { background: rgba(61,255,154,0.14); border-color: var(--green); color: var(--green); font-size: 1.15rem; }
.scell.bomb { background: rgba(255,77,94,0.2); border-color: var(--red); }
.scell.missed { background: rgba(255,255,255,0.04); border-color: var(--border); color: var(--muted); opacity: 0.55; font-size: 1.05rem; }
.scratch-acc { text-align: center; font-size: 1.9rem; font-weight: 900; color: var(--muted); }
.scratch-acc.live { color: var(--gold); text-shadow: 0 0 18px rgba(255,197,49,0.4); }
.scratch-risk { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 6px 0 4px; min-height: 1.2em; }

/* ---- rulett ---- */
.rlt-wrap { display: flex; flex-direction: column; flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 12px 14px 18px; gap: 10px; overflow-y: auto; }
.rlt-wrap h2 { text-align: center; margin: 0; }
.rlt-strip-wrap {
  position: relative; overflow: hidden;
  height: 62px; border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.rlt-strip { display: flex; gap: 6px; padding: 8px 0; height: 100%; will-change: transform; }
.rlt-chip {
  flex: 0 0 44px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-weight: 900; font-size: 1.05rem; color: #fff;
}
.rlt-chip.red { background: #c0233a; }
.rlt-chip.black { background: #23202f; border: 1px solid rgba(255,255,255,0.18); }
.rlt-chip.green { background: #1d8f5a; }
.rlt-pointer {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; margin-left: -1.5px;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
}
.rlt-markets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.rlt-mkt {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 11px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  font-weight: 700; font-size: 0.92rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.rlt-mkt:active { transform: scale(0.97); }
.rlt-mkt.on { border-color: var(--gold); background: rgba(255,197,49,0.14); }
.rlt-mkt.red { background: rgba(192,35,58,0.28); }
.rlt-mkt.black { background: rgba(0,0,0,0.4); }
.rlt-mkt.num { grid-column: 1 / -1; justify-content: center; gap: 10px; }
.rlt-mult { color: var(--gold); font-weight: 900; }
.rlt-numbers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 10px; }
.rlt-num {
  aspect-ratio: 1; border-radius: 8px; border: 1px solid transparent;
  font-weight: 800; font-size: 0.85rem; color: #fff; cursor: pointer;
}
.rlt-num.red { background: #c0233a; }
.rlt-num.black { background: #23202f; border-color: rgba(255,255,255,0.18); }
.rlt-num.green { background: #1d8f5a; grid-column: span 2; aspect-ratio: auto; }
.rlt-num.on { outline: 3px solid var(--gold); outline-offset: 1px; }
.rlt-tickets { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; color: var(--muted); }
.rlt-status { text-align: center; font-size: 1.05rem; font-weight: 700; min-height: 1.4em; }
.rlt-res { font-size: 1.5rem; font-weight: 900; padding: 2px 12px; border-radius: 10px; color: #fff; }
.rlt-res.red { background: #c0233a; }
.rlt-res.black { background: #23202f; }
.rlt-res.green { background: #1d8f5a; }

/* ---- blackjack ---- */
.bj-wrap { display: flex; flex-direction: column; flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 12px 14px 18px; gap: 12px; overflow-y: auto; }
.bj-wrap h2 { text-align: center; margin: 0; }
.bj-side { display: flex; flex-direction: column; gap: 6px; }
.bj-label { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.bj-total {
  display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text); font-weight: 900;
}
.bj-total.good { background: rgba(61,255,154,0.2); color: var(--green); }
.bj-total.bust { background: rgba(255,77,94,0.2); color: var(--red); }
.bj-cards { display: flex; gap: 8px; flex-wrap: wrap; min-height: 92px; }
.bj-card {
  width: 62px; height: 88px; border-radius: 10px;
  background: #fdfbf5; color: #1b1b1b;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 900;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  animation: bj-deal 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.bj-card.red { color: #d0202e; }
.bj-card.back {
  background: repeating-linear-gradient(45deg, #2a1b4d, #2a1b4d 7px, #34255c 7px, #34255c 14px);
  color: var(--accent); border: 2px solid var(--accent);
}
@keyframes bj-deal { from { opacity: 0; transform: translateY(-18px) rotate(-6deg); } }
.bj-msg { text-align: center; font-size: 1.1rem; min-height: 1.4em; }
.bj-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }

/* ---- prémium polish ---- */
.screen { animation: screen-in 0.3s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } }
.kalap-amount { background-size: 200% auto; animation: shimmer 3s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.overlay-box .big-emoji { animation: emoji-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes emoji-bounce { 0% { transform: scale(0.2) rotate(-15deg); } 70% { transform: scale(1.15) rotate(5deg); } }
.btn-accent, .btn-gold { position: relative; overflow: hidden; }
.btn-accent::after, .btn-gold::after {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shine 3.2s infinite;
}
@keyframes shine { 0% { left: -80%; } 40%, 100% { left: 130%; } }

@media (max-width: 480px) {
  .det-buttons { grid-template-columns: 1fr 1fr; }
  .playing-card { width: 100px; height: 145px; font-size: 2.4rem; }
  .foci-teams { flex-direction: column; }
}
