/* webitest Poker – vzhled, 2026-10-28 */
@font-face { font-family: "Inter"; src: url(inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(jbm-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --bg: #0b1018; --bg-2: #101722; --surface: #151d2b; --surface-2: #1b2536; --line: #243045; --line-2: #2f3d56;
  --text: #eef2f8; --text-2: #b6c0d2; --text-3: #8090a8;
  --brand: #2dd4bf; --indigo: #818cf8;
  --grad: linear-gradient(120deg, #0f766e 0%, #0d9488 42%, #6366f1 100%);
  --felt-1: #138a5f; --felt-2: #0b5a43; --felt-3: #073a2d; --rail: #3b2a1c;
  --red: #e11d48; --black: #111827; --gold: #fbbf24;
  --cw: 54px;               /* šířka karty na stole */
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--text); background: radial-gradient(70rem 40rem at 50% -10%, #12324a 0%, transparent 60%), var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 1040px; margin: 0 auto; }

/* horní lišta */
.top { flex: none; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 14px; padding-top: env(safe-area-inset-top); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; }
.brand b { background: linear-gradient(100deg, #2dd4bf, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.level { flex: 1; text-align: right; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.level b { color: var(--text); font-weight: 600; }
.icon-btn { border: 0; background: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); font-size: 18px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* obrazovky */
.screen { flex: 1; min-height: 0; }
.screen.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 20px; }
.home, .lobby { overflow-y: auto; padding: 4px 14px 24px; display: flex; flex-direction: column; gap: 12px; max-width: 620px; width: 100%; margin: 0 auto; }
.hero h1 { margin: 8px 0 2px; font-size: clamp(28px, 7vw, 40px); letter-spacing: -.02em; font-weight: 800; background: linear-gradient(100deg, #f8fafc, #2dd4bf 55%, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 0 12px; color: var(--text-2); }
.name-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-3); font-weight: 600; }
.name-field input { font: 600 16px var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; outline: none; }
.name-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
.tile { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 10px 30px -18px rgba(0,0,0,.8); }
.tile.invite { border-color: var(--brand); background: linear-gradient(135deg, rgba(45,212,191,.12), var(--surface)); }
.tile-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); font: 800 20px var(--font); color: var(--brand); }
.tile-ico.ai { background: var(--grad); color: #fff; font-size: 15px; }
.tile-ico.red { color: #fb7185; }
.tile-body { flex: 1; min-width: 0; }
.tile h2 { margin: 0 0 2px; font-size: 16px; }
.tile p { margin: 0; font-size: 13px; color: var(--text-2); }
.tile .btn { flex: none; height: 44px; padding: 0 16px; }
.btn:not(.btn-primary):not(.btn-fold):not(.btn-call):not(.btn-raise) { background: var(--surface-2); border: 1px solid var(--line-2); }
.btn-ghost { background: none !important; border: 0 !important; color: var(--text-3); }
.stepper { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.stepper button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 700; }
.stepper b { min-width: 16px; text-align: center; font: 700 16px var(--mono); color: var(--text); }
.home-foot { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.home-foot a { color: var(--text-2); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--line-2); border-top-color: var(--brand); animation: spin 1s linear infinite; }
.muted { color: var(--text-3); font-size: 13.5px; }
.lobby h2 { margin: 10px 0 0; }
.lobby > p { margin: 0; color: var(--text-2); }
.invite-link { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 12px; }
.invite-link code { flex: 1; min-width: 0; font: 12.5px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand); }
.invite-link .btn { height: 38px; flex: none; }
.lobby-seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lobby-seats li { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.lobby-seats li.empty { color: var(--text-3); border-style: dashed; background: none; }
.host-only { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* stůl */
.game { display: flex; flex-direction: column; padding: 0 10px; gap: 6px; }
.felt { flex: 1; min-height: 260px; position: relative;
  background: radial-gradient(ellipse at 50% 42%, var(--felt-1) 0%, var(--felt-2) 55%, var(--felt-3) 100%);
  border-radius: 46% / 30%; border: 10px solid var(--rail); margin: 36px 6px 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), inset 0 10px 40px rgba(0,0,0,.45), 0 20px 50px -20px rgba(0,0,0,.8), 0 0 0 1px #000; }
.felt::before { content: ""; position: absolute; inset: 12px; border-radius: inherit; border: 1.5px solid rgba(255,255,255,.08); pointer-events: none; }
.middle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.board { display: flex; gap: 5px; justify-content: center; min-height: calc(var(--cw) * 1.4); }
.slot { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: 8px; border: 1.5px dashed rgba(255,255,255,.14); }
.pot { font: 650 14px var(--font); background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.12); padding: 4px 14px; border-radius: 999px; display: flex; align-items: center; gap: 8px; }
.pot .chip { width: 14px; height: 14px; }
.pot b { font-family: var(--mono); color: var(--gold); }
.status { min-height: 18px; font-size: 12.5px; color: rgba(255,255,255,.78); text-align: center; padding: 0 30px; }
.seats { position: absolute; inset: 0; pointer-events: none; }
.opp { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: auto; width: 92px; }
.opp .ava { width: 42px; height: 42px; }
.ava .ini { font: 800 17px var(--font); color: #fff; }
.opp .tag2 { position: absolute; bottom: -4px; right: -6px; font: 800 9px var(--font); padding: 1px 4px; border-radius: 5px; background: var(--grad); color: #fff; }
.opp .nm { font-size: 12px; font-weight: 650; max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(11,16,24,.82); padding: 1px 8px; border-radius: 8px; border: 1px solid var(--line); }
.opp .st { font: 600 11.5px var(--mono); color: var(--gold); }
.opp .mini { display: flex; gap: 2px; position: absolute; top: 2px; left: calc(50% + 18px); --cw: 22px; }
.opp .mini .card { box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.opp.showdown .mini { --cw: 34px; left: 50%; top: -30px; transform: translateX(-50%); }
.opp .act { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #e2e8f0; background: rgba(0,0,0,.45); padding: 1px 7px; border-radius: 6px; }
.opp.folded { opacity: .45; }
.opp.sitout .nm::after { content: " ⏸"; }
.opp .badge-row { position: absolute; top: -6px; left: calc(50% - 30px); display: flex; gap: 2px; }
.badge { width: 19px; height: 19px; border-radius: 50%; font: 800 9.5px var(--font); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.badge.d { background: #f8fafc; color: #0f172a; } .badge.sb { background: #38bdf8; color: #082f49; } .badge.bb { background: #fbbf24; color: #422006; }
.ring { position: absolute; inset: -5px; border-radius: 50%; }
.opp .bubble, .seat-me .bubble { position: absolute; top: -40px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 150px; background: #f8fafc; color: #0f172a; font-size: 12.5px; line-height: 1.3; padding: 6px 10px; border-radius: 12px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); z-index: 8; }
.opp .bubble.b-left { left: 20%; transform: none; border-radius: 4px 12px 12px 12px; top: 100%; margin-top: 4px; }
.opp .bubble.b-right { left: auto; right: 20%; transform: none; border-radius: 12px 4px 12px 12px; top: 100%; margin-top: 4px; }
.opp .bubble.b-down { top: 100%; margin-top: 4px; }
.bubble.fresh { animation: pop .3s cubic-bezier(.2,.9,.3,1.3); }
.bets { position: absolute; inset: 0; pointer-events: none; }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; font: 650 12px var(--mono); color: #fff; background: rgba(0,0,0,.4); padding: 2px 8px 2px 3px; border-radius: 999px; animation: chipin .35s ease-out; white-space: nowrap; }
@keyframes chipin { from { opacity: 0; } }
.chip { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff 0 28%, transparent 30%), repeating-conic-gradient(#dc2626 0 30deg, #fff 30deg 45deg); box-shadow: 0 1px 2px rgba(0,0,0,.6); flex: none; }
.seat-me { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding-bottom: 2px; }
.who { display: flex; align-items: center; gap: 10px; background: rgba(21, 29, 43, .9); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; box-shadow: 0 8px 24px -12px rgba(0,0,0,.6); }
.who-txt { line-height: 1.2; }
.name { font-weight: 650; font-size: 14px; }
.stack { font: 600 13px var(--mono); color: var(--gold); }
.badges { display: flex; gap: 3px; }
.seat-me.turn .who { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45,212,191,.16); }
.made { font-size: 12.5px; color: var(--text-2); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.made b { color: var(--brand); font-weight: 650; }
.timer { width: 180px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--brand); transition: width 1s linear; }
.timer.low i { background: #f87171; }
.ava { border-radius: 50%; display: grid; place-items: center; background: #0f1724; border: 2px solid var(--line-2); position: relative; flex: none; }
.ava.thinking::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--brand); border-right-color: var(--indigo); animation: spin 1s linear infinite; }
.ava.turn { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(45,212,191,.2); }
.ava img { width: 26px; height: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pop { from { opacity: 0; scale: .8; } }

/* karty */
.hand { display: flex; gap: 6px; min-height: 10px; }
.hand-you { --cw: 66px; gap: 8px; }
.card { width: var(--cw); height: calc(var(--cw) * 1.4); border-radius: calc(var(--cw) * .13); background: linear-gradient(160deg, #ffffff 0%, #f1f5f9 100%); color: var(--black); position: relative; box-shadow: 0 6px 16px -6px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.08); flex: none; user-select: none; }
.card.red { color: var(--red); }
.card .cr { position: absolute; top: 5%; left: 9%; font: 750 calc(var(--cw) * .34)/1 var(--font); letter-spacing: -.04em; }
.card .cs { position: absolute; top: 31%; left: 9%; width: calc(var(--cw) * .25); height: calc(var(--cw) * .25); fill: currentColor; }
.card .cbig { position: absolute; right: 8%; bottom: 7%; width: calc(var(--cw) * .5); height: calc(var(--cw) * .5); fill: currentColor; opacity: .92; }
.card.back { background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 4px, transparent 4px 8px), linear-gradient(140deg, #0f766e, #4f46e5); box-shadow: 0 6px 16px -6px rgba(0,0,0,.7), inset 0 0 0 3px rgba(255,255,255,.85), inset 0 0 0 4px rgba(0,0,0,.15); }
.card.back::after { content: ""; position: absolute; inset: 22%; background: url(logo.svg) center / contain no-repeat; opacity: .55; filter: brightness(2) grayscale(1); }
.card.deal { animation: deal .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes deal { from { opacity: 0; transform: translateY(-40px) rotate(-8deg) scale(.85); } }
.card.flip { animation: flip .5s ease-out both; }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: none; } }
.card.win { box-shadow: 0 0 0 3px var(--gold), 0 0 22px 2px rgba(251,191,36,.55); transform: translateY(-4px); transition: transform .3s; }
.card.dim { filter: brightness(.55) saturate(.6); }
.card.fold { opacity: .35; transform: translateY(6px); }

/* výsledek */
.banner { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 8px 8px 8px 16px; min-height: 52px; animation: up .3s ease-out; }
.banner-txt { flex: 1; min-width: 0; }
.banner-title { font-weight: 750; font-size: 16px; letter-spacing: -.01em; line-height: 1.25; }
.banner-title.win { color: var(--brand); } .banner-title.lose { color: #fca5a5; }
.banner-sub { color: var(--text-2); font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ovládání */
.actions { flex: none; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); position: relative; }
.btns { display: grid; grid-template-columns: 1fr 1.25fr 1.25fr; gap: 8px; }
.btn { border: 0; border-radius: 14px; height: 52px; font-weight: 700; font-size: 15px; letter-spacing: .01em; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform .12s, filter .15s, opacity .15s; padding: 0 10px; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .35; cursor: default; }
.btn small { font: 600 12.5px var(--mono); opacity: .85; }
.btn-fold { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.btn-call { background: #1e3a5f; border: 1px solid #2c5282; color: #e0ecff; }
.btn-raise, .btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(20,184,166,.7); }
.btn-primary { height: 44px; padding: 0 20px; flex: none; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.kbd { font: 600 10px var(--mono); opacity: .5; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.sizer { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 6px); z-index: 7; background: rgba(21,29,43,.97); border: 1px solid var(--line-2); border-radius: 16px; padding: 10px; animation: up .2s ease-out; box-shadow: 0 -10px 30px -12px rgba(0,0,0,.7); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.presets button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 10px; padding: 7px 2px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.presets button.on { border-color: var(--brand); color: var(--text); background: rgba(45,212,191,.12); }
.slider-row { display: flex; align-items: center; gap: 10px; }
.step { width: 36px; height: 36px; flex: none; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 18px; font-weight: 700; }
input[type=range] { flex: 1; accent-color: var(--brand); height: 28px; }

/* panely */
.sheet-scrim { position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 41; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); background: var(--bg-2); border-left: 1px solid var(--line); padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; animation: slide .25s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(100%); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 16px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 12px 10px; border-radius: 12px; text-align: left; font-size: 15px; color: var(--text); }
.menu-item:hover { background: var(--surface); }
.mi-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 14px; color: var(--brand); }
.menu-group { padding: 10px; margin: 4px 0; border: 1px solid var(--line); border-radius: 14px; }
.menu-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 8px 4px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.3); }
.menu-note { font-size: 12.5px; color: var(--text-3); margin: 8px 2px 0; }
.learn { font-size: 13.5px; color: var(--text-2); }
.learn .style { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 8px; }
.learn .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.learn .grid div { background: var(--surface); border-radius: 10px; padding: 6px 9px; }
.learn .grid b { display: block; font: 700 16px var(--mono); color: var(--brand); }
.learn ul { margin: 6px 0; padding-left: 18px; }
.learn li { margin: 3px 0; }
.learn .small { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.record { margin: 14px 10px; font-size: 13px; color: var(--text-3); }
.menu-link { display: block; margin: 4px 10px; color: var(--brand); font-size: 14px; text-decoration: none; }
.log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.log li { padding: 6px 2px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.log li.st { color: var(--text); font-weight: 650; padding-top: 12px; }
.log li .who-ai { color: var(--indigo); font-weight: 600; } .log li .who-you { color: var(--brand); font-weight: 600; }
.log .mini { font-family: var(--mono); }
.fair p, .rules p, .rules li { font-size: 14px; color: var(--text-2); }
.rules ul { padding-left: 18px; }
.fair code { display: block; font: 12px/1.5 var(--mono); word-break: break-all; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); margin: 4px 0 10px; }
.fair .ok { color: #4ade80; font-weight: 650; } .fair .bad { color: #f87171; font-weight: 650; }
.fair .btn { height: 42px; width: 100%; }
.toast { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); background: #f8fafc; color: #0f172a; font-size: 14px; padding: 8px 16px; border-radius: 999px; z-index: 60; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }

/* větší obrazovky */
@media (min-width: 720px) {
  :root { --cw: 62px; }
  .hand-you { --cw: 80px; }
  .game { padding: 6px 24px; }
  .felt { border-width: 14px; border-radius: 50% / 40%; margin: 44px 40px 0; }
  .board { gap: 8px; }
  .opp { width: 120px; } .opp .ava { width: 50px; height: 50px; } .opp .nm { max-width: 120px; font-size: 13px; }
  .opp .mini { --cw: 28px; left: calc(50% + 22px); }
  .opp.showdown .mini { --cw: 44px; top: -40px; }
  .actions { max-width: 680px; margin: 0 auto; width: 100%; }
}
@media (max-height: 680px) { .hand-you { --cw: 54px; } :root { --cw: 44px; } .btn { height: 46px; } .felt { margin-top: 30px; } }
@media (max-width: 380px) { :root { --cw: 44px; } .opp { width: 80px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
