:root {
  --bg: #0b1a14; --panel: #12251d; --line: #1f3b2f; --text: #e8f1ec; --muted: #8fa89b;
  --gold: #e3b341; --red: #d64545; --felt: #17694a; --felt2: #0f4a33; --rail: #3a2416;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; border-radius: 10px; padding: 12px 16px; cursor: pointer; background: var(--line); }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: var(--gold); color: #1b1300; font-weight: 700; }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.small { padding: 7px 12px; font-size: 13px; }
input { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
input[type=range] { padding: 0; accent-color: var(--gold); background: none; border: 0; }
.hidden { display: none !important; }
.screen { height: 100%; display: flex; flex-direction: column; padding-top: var(--safe-t); }

/* giriş */
#login { overflow-y: auto; }
.login-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 24px; max-width: 380px; width: 100%; margin: auto; }
.logo { width: 76px; height: 76px; border-radius: 18px; }
#login h1 { margin: 0; font-size: 34px; letter-spacing: 1px; }
.sub, .note { color: var(--muted); margin: 0; text-align: center; } .note { font-size: 12px; }
a { color: var(--gold); }
#authForm { display: grid; gap: 10px; width: 100%; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--gold); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; background: var(--panel); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { padding: 8px; background: transparent; border-radius: 8px; }
.seg button.on { background: var(--line); font-weight: 600; }
button.apple { width: 100%; background: #fff; color: #000; font-weight: 600; }
.server { width: 100%; color: var(--muted); font-size: 13px; } .server input { margin-top: 8px; }

/* üst bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.who { display: flex; flex-direction: column; align-items: flex-start; background: none; padding: 0; text-align: left; }
.bar-r { display: flex; gap: 6px; align-items: center; } .bar > span { width: 70px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 4px; vertical-align: top; } .chips { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.title { font-weight: 600; text-align: center; font-size: 14px; }

/* lobi */
.tabs { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; }
.tabs button { padding: 7px 14px; border-radius: 99px; background: transparent; border: 1px solid var(--line); white-space: nowrap; }
.tabs button.on { background: var(--gold); color: #1b1300; border-color: var(--gold); font-weight: 600; }
.list { padding: 4px 14px 24px; display: grid; gap: 10px; overflow-y: auto; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-content: start; }
.trow { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-align: left; width: 100%; }
.trow:hover { border-color: var(--gold); }
.trow .n { font-weight: 700; } .trow .d { color: var(--muted); font-size: 13px; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--line); margin-left: 6px; color: var(--muted); }
.occ { font-variant-numeric: tabular-nums; color: var(--muted); }

/* masa */
#game { overflow: hidden; }
.felt-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 34px 14px; min-height: 0; }
.felt { position: relative; width: min(100%, 860px); aspect-ratio: 2 / 1; border-radius: 999px;
  background: radial-gradient(ellipse at center, var(--felt) 0%, var(--felt2) 75%); border: 12px solid var(--rail);
  box-shadow: inset 0 0 40px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.6); }
@media (max-aspect-ratio: 4/5) { .felt-wrap { padding: 40px 62px; } .felt { aspect-ratio: 1 / 1.6; width: min(100%, 400px); max-height: 100%; }
  .seat { width: 104px; } .plate { min-width: 84px; padding: 3px 6px; } }
.center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; pointer-events: none; }
.pot { background: rgba(0,0,0,.35); padding: 3px 12px; border-radius: 99px; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; min-height: 1em; }
.pot:empty { display: none; }
.board { display: flex; gap: 5px; min-height: 58px; }
.result { font-size: 13px; text-align: center; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 8px; max-width: 80%; }
.result:empty { display: none; }

/* kart */
.card { width: 40px; height: 56px; border-radius: 6px; background: #fbfbf7; color: #111; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; line-height: 1; box-shadow: 0 2px 4px rgba(0,0,0,.4); user-select: none; animation: deal .25s ease-out; }
.card .s { font-size: 18px; } .card.r { color: #c62828; } .card.d { color: #1565c0; } .card.c { color: #2e7d32; }
.card.back { background: repeating-linear-gradient(45deg, #8b1d2c 0 5px, #a8293a 5px 10px); border: 2px solid #fff; }
.card.win { outline: 3px solid var(--gold); transform: translateY(-4px); }
@keyframes deal { from { opacity: 0; transform: translateY(-10px) scale(.9); } }

/* koltuklar */
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; width: 120px; }
.seat .hole { display: flex; height: 44px; }
.seat .hole .card { width: 30px; height: 42px; font-size: 13px; margin-left: -10px; } .seat .hole .card .s { font-size: 13px; }
.seat .hole .card:first-child { margin-left: 0; }
.seat.me .hole { height: 62px; } .seat.me .hole .card { width: 42px; height: 60px; font-size: 18px; margin-left: -12px; } .seat.me .hole .card .s { font-size: 18px; }
.seat.n5 .hole .card { margin-left: -16px; }
.plate { background: rgba(10,20,15,.92); border: 2px solid var(--line); border-radius: 10px; padding: 3px 10px; text-align: center; min-width: 96px; position: relative; }
.plate .nm { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.plate .st { color: var(--gold); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.seat.turn .plate { border-color: var(--gold); box-shadow: 0 0 14px rgba(227,179,65,.6); }
.seat.folded { opacity: .45; }
.seat.empty .plate { border-style: dashed; color: var(--muted); cursor: pointer; background: rgba(0,0,0,.25); }
.bet { position: absolute; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.bet::before { content: '●'; color: var(--gold); margin-right: 4px; }
.dealer { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.tag { font-size: 10px; color: var(--gold); font-weight: 700; }

/* alt panel */
.dock { background: var(--panel); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + var(--safe-b)); }
.buyin { display: grid; gap: 8px; }
.actions { display: grid; gap: 8px; }
.timer { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; } .timer i { display: block; height: 100%; background: var(--gold); width: 0; }
.raise-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .raise-row input { grid-column: 1 / -1; }
.raise-row button { padding: 7px 4px; font-size: 13px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }
.btn-row button { padding: 14px 6px; font-weight: 700; font-size: 15px; }
.fold { background: #3a1d1d; } .call { background: #1d3a2b; } .raise { background: var(--gold); color: #1b1300; }
.waiting { text-align: center; color: var(--muted); padding: 10px; }
.log { font-size: 12px; color: var(--muted); max-height: 54px; overflow-y: auto; margin-top: 6px; }
@media (max-height: 640px) { .log { display: none; } }
.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: #000d; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 9; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; }

/* lobi kartları (sit & go) */
.trow .r { text-align: right; } .trow .gold { color: var(--gold); font-weight: 700; }
.trow.reg { border-color: var(--gold); }
.sng-actions { display: flex; gap: 6px; margin-top: 8px; }
.empty-note { color: var(--muted); padding: 20px; text-align: center; grid-column: 1 / -1; }

/* sit & go şeridi */
.sng-strip { display: flex; justify-content: space-around; gap: 8px; padding: 6px 10px; font-size: 12px; background: #0f2019; border-bottom: 1px solid var(--line); color: var(--muted); }
.sng-strip b { color: var(--text); }

/* sohbet */
.felt-wrap { position: relative; }
.chat { position: absolute; right: 10px; top: 10px; bottom: 10px; width: min(320px, calc(100% - 20px)); background: rgba(10,20,15,.96);
  border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; z-index: 5; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.chat-msgs .m b { color: var(--gold); cursor: pointer; } .chat-msgs .m.self b { color: #7fc8a9; }
.chat-msgs .sys { color: var(--muted); font-style: italic; }
.chat-in { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); } .chat-in input { padding: 8px 10px; }
.bubble { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); background: #fff; color: #111; font-size: 11px; padding: 3px 8px; border-radius: 8px;
  max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: deal .2s; z-index: 2; }
.plate { cursor: pointer; }
.seat .away { font-size: 10px; color: var(--red); }

/* sayfalar */
.page { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; max-width: 560px; width: 100%; margin: 0 auto; padding-bottom: calc(20px + var(--safe-b)); }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.card-box h3 { margin: 0; font-size: 16px; } .card-box.danger { border-color: #4a2323; }
.kv { display: flex; justify-content: space-between; } .kv span, .muted { color: var(--muted); } .muted { margin: 0; font-size: 13px; }
.gold { color: var(--gold); } .wide { width: 100%; } .link { font-size: 14px; }
.inline { display: flex; gap: 8px; } .inline input { flex: 1; }
.row2 { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.hrow { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; width: 100%; text-align: left; }
.hrow .mini { display: flex; gap: 2px; } .hrow .mini .card { width: 24px; height: 34px; font-size: 11px; animation: none; } .hrow .mini .card .s { font-size: 11px; }
.hrow .meta { font-size: 12px; color: var(--muted); }
.pos { color: #6fd39b; font-weight: 700; } .neg { color: #e57373; font-weight: 700; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 8; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; width: min(440px, 100%); max-height: 85vh; overflow-y: auto; display: grid; gap: 10px; }
.modal-box h3 { margin: 0; } .modal-box .cards { display: flex; gap: 4px; flex-wrap: wrap; }
.modal-box .loglines { font-size: 12px; color: var(--muted); max-height: 200px; overflow-y: auto; }
.place { font-size: 46px; text-align: center; }

/* mağaza */
.store-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pkg { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px 12px; display: grid; gap: 6px; text-align: center; }
.pkg.popular { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.pkg .ribbon { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1b1300; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.pkg .stack { font-size: 30px; line-height: 1; }
.pkg .amt { font-size: 20px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.pkg .lbl { font-size: 12px; color: var(--muted); }
.pkg .bonus { font-size: 12px; color: #6fd39b; font-weight: 700; min-height: 1em; }
.pkg button { width: 100%; padding: 10px; font-weight: 700; }
.prow { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.prow:last-child { border-bottom: 0; }
.small-print { font-size: 11px; }
@media (min-width: 700px) { .store-grid { grid-template-columns: repeat(4, 1fr); } }

/* turnuvalar */
.mtt-card { cursor: pointer; }
.mtt-time { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; }
.mtt-time small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.mtt-row { display: flex; gap: 12px; align-items: center; width: 100%; }
.mtt-row .mid { flex: 1; min-width: 0; }
.st-live { color: #6fd39b; } .st-done { color: var(--muted); }
.tag-free { background: #1d4a33; color: #8ee0b2; }
.tag-gtd { background: #4a3a12; color: var(--gold); }
.mtt-actions { display: flex; gap: 8px; } .mtt-actions button { flex: 1; padding: 12px; font-weight: 700; }
.seg.four { grid-template-columns: repeat(4, 1fr); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.kv-grid div { display: flex; flex-direction: column; } .kv-grid span { color: var(--muted); font-size: 12px; } .kv-grid b { font-variant-numeric: tabular-nums; }
.plist { display: grid; gap: 2px; font-size: 13px; }
.plist .pr { display: flex; justify-content: space-between; padding: 5px 2px; border-bottom: 1px solid var(--line); }
.plist .pr.me { color: var(--gold); font-weight: 700; } .plist .pr.out { color: var(--muted); }
.plist .pr.cur { color: var(--gold); font-weight: 700; }
.lb-btn { grid-column: 1 / -1; }

/* turnuva listesi: tek sütun, taşma yok */
.screen { overflow-x: hidden; }
.list.mtt-list { grid-template-columns: 1fr; max-width: 820px; width: 100%; margin: 0 auto; }
.mtt-card { padding: 12px 14px; }
.mtt-row > div:last-child { flex: none; }
.mtt-time { flex: none; width: 78px; }
.mtt-card .n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.mtt-card .n .badge { margin-left: 0; }
.mtt-card .d { overflow-wrap: anywhere; }
@media (max-width: 420px) { .mtt-time { width: 62px; font-size: 18px; } .mtt-row { gap: 8px; } }

/* canlı destek */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.support-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; max-width: 720px; width: 100%; margin: 0 auto; }
.support-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.smsg { max-width: 80%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.smsg.me { align-self: flex-end; background: #2A3B1E; border: 1px solid #3E5A2A; border-bottom-right-radius: 4px; }
.smsg.agent { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.smsg .who { display: block; font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 2px; }
.smsg .t { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; text-align: right; }
.support-empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.support-typing { padding: 0 16px 6px; font-size: 12px; color: var(--muted); font-style: italic; }
.support-faq { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.support-faq button { font-size: 12px; padding: 7px 11px; border-radius: 99px; background: transparent; border: 1px solid var(--line); }
.support-in { display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--panel); }
.support-in textarea { flex: 1; resize: none; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-height: 120px; }
#btnSupport { position: relative; }
