/* ============================================================================
   MaxiPoker v2 — стиль клиента «ПОКЕРОК 2026».
   Почти чёрный фон, строки-плашки с цветной полосой слева, бежевые вкладки,
   красная кнопка действия, бордовое сукно с деревянным бортом, стеки синим,
   деньги золотом. Цифры — Manrope (моноширинные), текст — Golos.
   ============================================================================ */

@font-face { font-family: "Golos"; src: url("/fonts/GolosText-Variable.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-Variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #121212;
  --bg-2: #181818;
  --panel: #1f1f1f;
  --panel-2: #262626;
  --panel-3: #2e2e2e;
  --row: #252525;
  --row-2: #2c2c2c;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .11);
  --txt: #f3f3f3;
  --dim: #a9a9a9;
  --mut: #707070;

  --red: #c3262e;
  --red-hi: #e23a41;
  --red-2: #8e1a20;
  --gold: #f2c14e;
  --gold-2: #c9902a;
  --beige: #e9dcc0;
  --beige-2: #cfbd97;
  --blue: #52b4ff;
  --cyan: #41d1e4;
  --green: #43b649;
  --green-2: #2c7a31;
  --orange: #f08a2c;
  --violet: #8b6cf0;

  --felt: #7d1424;
  --felt-2: #4a0912;
  --wood: #c98b4c;
  --wood-2: #8a5426;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 12px;
  --pill: 999px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);

  --f-ui: "Golos", "Segoe UI", system-ui, sans-serif;
  --f-num: "Manrope", "Golos", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 50% -300px, #262626 0%, transparent 70%);
  color: var(--txt);
  font: 500 15px/1.4 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ico { width: 1em; height: 1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.125em; }
.gold { color: var(--gold); }
.blue { color: var(--blue); }
.cyan { color: var(--cyan); }
.green { color: var(--green); }
.red { color: var(--red-hi); }
.dim { color: var(--dim); }
.mut { color: var(--mut); }

/* ------------------------------- шапка ------------------------------------ */
#top { position: sticky; top: 0; z-index: 40; }
.topbar {
  display: flex; align-items: center; gap: 20px;
  height: 60px; padding: 0 18px;
  background: #0c0c0c; border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04);
  position: sticky; top: 0; z-index: 40;
}
.wordmark { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; font: 900 23px/1 var(--f-ui); letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.wordmark b { font: 800 22px/1 var(--f-num); color: var(--gold); letter-spacing: 0; }
.wordmark .suit { display: none; }

.menu { display: flex; gap: 3px; }
.menu a {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 6px;
  font: 700 13.5px/1 var(--f-ui); color: var(--dim); background: #1b1b1b; border: 1px solid #2a2a2a;
  transition: color .15s, background .15s;
}
.menu a .ico { font-size: 16px; }
.menu a:hover { color: #fff; background: #242424; }
.menu a.on { color: #fff; background: linear-gradient(180deg, #d0323a, #9d1d24); border-color: #d64048; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.top-right .clock { font: 700 16px/1 var(--f-num); color: #fff; }

.status {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px;
  border-radius: 5px; font: 800 11.5px/1 var(--f-ui); letter-spacing: .04em; text-transform: uppercase;
  background: #2a2a2a; color: var(--dim);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.live { color: #fff; background: #b3262d; }
.status.live::before { background: #fff; animation: blink 1.4s infinite; }
.status.pause { color: #1b1200; background: var(--gold); }
.status.pause::before { background: #1b1200; }
.status.break { color: #04223a; background: var(--blue); }
.status.break::before { background: #04223a; }
.status.done { color: #0c2410; background: var(--green); }
.status.done::before { background: #0c2410; }
.status.open { color: #0c2410; background: var(--green); }
@keyframes blink { 50% { opacity: .25; } }

/* ------------------------------- панели ----------------------------------- */
.panel { background: var(--panel); border: 1px solid #2a2a2a; border-radius: var(--r-lg); min-width: 0; box-shadow: var(--shadow); }
.panel-hd {
  display: flex; align-items: center; gap: 9px; padding: 12px 16px;
  font: 700 13px/1 var(--f-ui); color: var(--dim); background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a; border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.panel-hd .ico { font-size: 16px; color: var(--mut); }
.panel-hd .aside { margin-left: auto; font-weight: 600; color: var(--mut); }
.panel-bd { padding: 12px 16px; }

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--dim); font-size: 14px; }
.kv .v { font: 800 18px/1.1 var(--f-num); text-align: right; }

/* строки-плашки как в лобби Покерок: цветная полоса слева */
.rowx {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px 8px 17px;
  background: var(--row); border-radius: 4px; margin-bottom: 4px;
}
.rowx::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; background: var(--acc, var(--green)); }
.rowx:nth-child(even) { background: var(--row-2); }
.rowx.cur { background: linear-gradient(90deg, rgba(195, 38, 46, .35), rgba(195, 38, 46, .12)); --acc: var(--red-hi); }
.rowx.dimmed { opacity: .5; }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 4px; font: 700 12px/1 var(--f-ui); white-space: nowrap; background: var(--green-2); color: #e8ffe9; }
.pill.blue { background: #1d4f73; color: #d7efff; }
.pill.gray { background: #3a3a3a; color: #d4d4d4; }
.pill.red { background: var(--red-2); color: #ffe1e2; }
.pill.gold { background: #6b4b10; color: #ffe7a8; }

/* вкладки как в лобби: активная бежевая */
.tabs { display: inline-flex; gap: 0; padding: 3px; background: #111; border: 1px solid #2a2a2a; border-radius: 8px; }
.tabs button, .tabs a {
  border: 0; background: transparent; cursor: pointer; padding: 9px 16px; border-radius: 6px;
  font: 700 13.5px/1 var(--f-ui); color: var(--dim); white-space: nowrap;
}
.tabs button:hover, .tabs a:hover { color: #fff; }
.tabs .on { background: linear-gradient(180deg, var(--beige), var(--beige-2)); color: #231b0e; }

/* фильтры-таблетки */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid #333; background: #1c1c1c; color: var(--dim); font: 700 13px/1 var(--f-ui); cursor: pointer; }
.chips button.on { background: #f1f1f1; color: #111; border-color: #f1f1f1; }

/* ------------------------------- кнопки ----------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 6px; cursor: pointer; white-space: nowrap;
  font: 700 14.5px/1 var(--f-ui); color: #eaeaea;
  background: linear-gradient(180deg, #3a3a3a, #2c2c2c); border: 1px solid #444;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .08s, filter .15s;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn .ico { font-size: 17px; }
.btn.primary { color: #fff; background: linear-gradient(180deg, #d0323a, #9d1d24); border-color: #d64048; box-shadow: 0 4px 14px rgba(195, 38, 46, .3), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.gold { color: #241800; background: linear-gradient(180deg, #ffd776, #d99c2b); border-color: #ffe39f; }
.btn.green { color: #fff; background: linear-gradient(180deg, #4cbb52, #2c7a31); border-color: #5ccc62; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--dim); }
.btn.danger { color: #ffb0b3; border-color: rgba(226, 58, 65, .45); background: rgba(195, 38, 46, .14); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 16.5px; border-radius: 8px; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 34px; }
.btn.block { width: 100%; }

.input {
  height: 42px; padding: 0 12px; border-radius: 6px; width: 100%;
  background: #141414; border: 1px solid #3a3a3a; color: var(--txt); outline: none;
}
.input:focus { border-color: var(--beige-2); box-shadow: 0 0 0 3px rgba(233, 220, 192, .12); }
label.field { display: grid; gap: 6px; font-size: 12px; color: var(--dim); font-weight: 600; }

/* --------------------------- значок игрока -------------------------------- */
.ava {
  --h: 210; --s: 46px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
  font: 800 calc(var(--s) * .36)/1 var(--f-ui); letter-spacing: .02em; color: #fff;
  background: radial-gradient(circle at 35% 28%, hsl(var(--h) 62% 60%), hsl(var(--h) 52% 36%) 62%, hsl(var(--h) 55% 22%));
  border: 2px solid #0b0b0b;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .22), 0 5px 12px rgba(0, 0, 0, .55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.ava.sm { --s: 30px; border-width: 1.5px; }
.ava.xs { --s: 24px; border-width: 1px; }

/* фишки позиций: D — жёлтая, блайнды — синие */
.pos {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 50%;
  font: 900 10px/1 var(--f-ui); font-style: normal;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .55);
}
.pos.D { background: radial-gradient(circle at 40% 35%, #ffe680, #f0b90b 70%); color: #3a2a00; border: 1px solid #fff2b0; }
.pos.SB, .pos.BB { background: radial-gradient(circle at 40% 35%, #6fc3ff, #1f7fd0 75%); color: #fff; border: 1px solid #a8dcff; border-radius: 11px; }
.tag-moved { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; font: 800 10.5px/1 var(--f-ui); color: #241800; background: var(--gold); }

/* --------------------------- призовые места ------------------------------- */
.medal {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  font: 900 14px/1 var(--f-num); color: #2a1d05;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #f2c14e 45%, #a86f0e);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .22), 0 2px 8px rgba(242, 193, 78, .25);
}
.medal.p2 { color: #1f2328; background: radial-gradient(circle at 35% 30%, #ffffff, #c9d0da 45%, #7d8794); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.medal.p3 { color: #2a1406; background: radial-gradient(circle at 35% 30%, #ffd9b8, #d98c4e 45%, #8b4a1c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.medal.px { color: var(--dim); background: #333; box-shadow: inset 0 0 0 1px #444; }

/* ------------------------------- таблицы ---------------------------------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 3px; }
.tbl th { text-align: left; font: 600 12.5px/1 var(--f-ui); color: var(--mut); padding: 8px 12px; white-space: nowrap; }
.tbl td { padding: 11px 12px; background: var(--row); white-space: nowrap; }
.tbl tbody tr:nth-child(even) td { background: var(--row-2); }
.tbl td:first-child { border-radius: 4px 0 0 4px; box-shadow: inset 4px 0 0 var(--acc, transparent); }
.tbl td:last-child { border-radius: 0 4px 4px 0; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tr.cur td { background: linear-gradient(180deg, var(--beige), var(--beige-2)) !important; color: #231b0e; font-weight: 800; }
.tbl tr.cur td .mut, .tbl tr.cur td .dim { color: #5c4a2a; }
.tbl tr.past td { color: var(--mut); }
.tbl tr.brk td { background: #1b2733 !important; color: var(--blue); }

/* --------------------------- покерный стол --------------------------------
   Бордовое сукно, тонкая золотая линия, светлый деревянный борт — как в клиенте. */
.ptable { position: relative; width: 100%; aspect-ratio: .8; container-type: size; }
.ptable .rail {
  position: absolute; inset: 6% 19%; border-radius: 50%;
  background: linear-gradient(160deg, #e1a565 0%, var(--wood) 30%, var(--wood-2) 75%, #6b3e18 100%);
  box-shadow: 0 26px 50px rgba(0, 0, 0, .65), inset 0 2px 1px rgba(255, 230, 190, .55), inset 0 -4px 10px rgba(60, 30, 5, .6);
}
.ptable .felt {
  position: absolute; inset: 8.6% 22.4%; border-radius: 50%;
  background: radial-gradient(70% 55% at 50% 40%, #a01d30 0%, var(--felt) 45%, var(--felt-2) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(242, 193, 78, .0), inset 0 6px 24px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.4cqh;
}
.ptable .felt::before { content: ""; position: absolute; inset: 5.5%; border-radius: 50%; border: 1.5px solid rgba(242, 193, 78, .55); pointer-events: none; }
.felt .tno { font: 800 6.4cqw/1 var(--f-ui); letter-spacing: .06em; color: rgba(255, 255, 255, .95); text-transform: uppercase; }
.felt .tcount { font: 700 4cqw/1 var(--f-ui); color: var(--gold); }
.felt .wm { font: 900 4.2cqw/1 var(--f-ui); letter-spacing: .06em; color: rgba(255, 255, 255, .13); text-transform: uppercase; margin-top: 1cqh; }

.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 38cqw; z-index: 2; }
.seat .ava { --s: 15cqw; font-size: 5.4cqw; border-width: .6cqw; }
.seat .plate {
  margin-top: -1.8cqw; min-width: 24cqw; max-width: 100%; padding: 1.3cqw 2.4cqw 1.2cqw; border-radius: 1.4cqw;
  background: linear-gradient(180deg, #2a2a2a, #121212); border: 1px solid #3c3c3c;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .6); text-align: center; position: relative; z-index: 1;
}
.seat .nm { font: 700 4.4cqw/1.12 var(--f-ui); white-space: nowrap; display: block; color: #fff; }
.seat .nm small { display: block; font: 600 3.5cqw/1.15 var(--f-ui); color: var(--dim); }
.seat .stk { display: block; margin-top: .5cqw; font: 800 3.9cqw/1 var(--f-num); color: var(--blue); }
.seat .pos { position: absolute; top: 0; right: 7.4cqw; z-index: 3; min-width: 6.8cqw; height: 6.8cqw; padding: 0 1.2cqw; font-size: 3.1cqw; }
.seat .pos.SB, .seat .pos.BB { border-radius: 3.4cqw; }
.seat .mv { position: absolute; top: 0; left: 7.4cqw; z-index: 3; width: 6.8cqw; height: 6.8cqw; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #241800; box-shadow: 0 0 0 .5cqw #111; }
.seat .mv .ico { width: 4cqw; height: 4cqw; stroke-width: 3; }
.seat.moved .plate { border-color: var(--gold); }
.seat.me .plate { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 5px 14px rgba(0, 0, 0, .6); }

/* ------------------------------- окна ------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 14px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.modal-card { width: min(540px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: #1e1e1e; border: 1px solid #3a3a3a; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
.modal-card.wide { width: min(980px, 100%); }
.modal-hd { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #161616; border-bottom: 1px solid #2c2c2c; font: 800 16px/1.2 var(--f-ui); border-radius: 12px 12px 0 0; }
.modal-hd .x { margin-left: auto; }
.modal-bd { padding: 16px 18px; }
.modal-ft { display: flex; gap: 10px; padding: 0 18px 18px; }
.modal-ft .btn { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; z-index: 200;
  padding: 12px 18px; border-radius: 8px; background: #2b2b2b; border: 1px solid #444; box-shadow: var(--shadow);
  font-weight: 600; transition: .2s; pointer-events: none; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--red-hi); color: #ffc0c3; }

.empty { padding: 28px 18px; text-align: center; color: var(--mut); }
.scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }

/* ------------------------------- телефон ---------------------------------- */
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 0 10px; height: 54px; }
  .wordmark { font-size: 18px; gap: 5px; }
  .wordmark b { font-size: 17px; }
  .menu { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .menu a { height: 34px; padding: 0 10px; font-size: 12.5px; }
  .menu a .ico { display: none; }
  .top-right { gap: 6px; }
  .top-right .clock, .top-right .btn, .top-right .status { display: none; }
}
