:root {
  color-scheme: dark;
  --page: #081b18;
  --panel: #102622;
  --panel-light: #17332d;
  --felt: #145547;
  --felt-dark: #0e453a;
  --gold: #e4bd70;
  --cream: #f5f0e5;
  --muted: #9ab0a6;
  --line: rgba(233, 239, 226, .12);
  --red: #d76562;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 75% 48%, rgba(32, 92, 75, .2), transparent 44%),
    var(--page);
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 42px; }

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--cream); text-decoration: none; font-size: 15px; font-weight: 800; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(228,189,112,.7); border-radius: 12px; color: var(--gold); font-size: 20px; font-family: Georgia, serif; }
.brand-light { color: var(--gold); }
.brand small { display: block; margin-top: 4px; color: var(--muted); font: 9px Consolas, "Courier New", monospace; letter-spacing: .19em; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.chip-badge { color: var(--gold); font: 10px Consolas, "Courier New", monospace; letter-spacing: .1em; }
.chip-badge span { margin-right: 7px; color: #80c397; }

.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 700; transition: background .15s, transform .15s, opacity .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-outline { border-color: var(--line); background: transparent; color: var(--cream); font-size: 12px; }
.button-outline:not(:disabled):hover { background: rgba(255,255,255,.07); }
.button-primary { background: var(--gold); color: #201b11; }
.button-primary:not(:disabled):hover { background: #f1d08c; }
.button-secondary { border-color: rgba(228,189,112,.26); background: rgba(228,189,112,.12); color: var(--gold); }
.button-secondary:not(:disabled):hover { background: rgba(228,189,112,.2); }
.button-fold { border-color: var(--line); background: transparent; color: #d8cfc0; }
.button-fold:not(:disabled):hover { border-color: rgba(215,101,98,.6); color: #ffaaa6; }

.game-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 36px; align-items: start; padding: 44px 0 32px; }
.game-sidebar { padding: 11px 0; }
.eyebrow, .table-topline, .table-info span, .pot-label, .raise-control > span, .footer, .street-pill { font-family: Consolas, "Courier New", monospace; letter-spacing: .12em; }
.eyebrow { color: var(--gold); font-size: 10px; }
.game-sidebar h1 { margin: 13px 0 8px; font-size: 31px; letter-spacing: -.045em; }
.intro { max-width: 245px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.mode-picker { display: grid; gap: 9px; margin-top: 27px; }
.mode-button { display: grid; grid-template-columns: 35px 1fr 18px; align-items: center; gap: 9px; min-height: 66px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); text-align: left; cursor: pointer; }
.mode-button:hover { border-color: rgba(228,189,112,.4); }
.mode-button.selected { border-color: rgba(228,189,112,.72); background: rgba(228,189,112,.08); }
.mode-icon { color: var(--gold); font-size: 21px; text-align: center; }
.mode-button strong, .mode-button small { display: block; }
.mode-button strong { font-size: 13px; letter-spacing: .04em; }
.mode-button small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.mode-check { color: var(--gold); font-size: 13px; opacity: 0; }
.mode-button.selected .mode-check { opacity: 1; }
.rules-note { display: flex; gap: 10px; margin-top: 17px; padding: 12px; border-radius: 9px; background: rgba(255,255,255,.035); }
.rules-icon { display: grid; flex: 0 0 17px; place-items: center; height: 17px; margin-top: 1px; border: 1px solid rgba(228,189,112,.5); border-radius: 50%; color: var(--gold); font: 11px Georgia, serif; }
.rules-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.table-info { display: grid; gap: 12px; margin-top: 27px; padding-top: 17px; border-top: 1px solid var(--line); }
.table-info div { display: flex; justify-content: space-between; align-items: center; }
.table-info span { color: #778e83; font-size: 9px; }
.table-info strong { color: #dbe1d8; font-size: 11px; font-weight: 600; }

.table-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: rgba(16,38,34,.78); box-shadow: 0 25px 70px rgba(0,0,0,.2); }
.table-topline { display: flex; justify-content: space-between; align-items: center; height: 51px; padding: 0 21px; color: #91a69b; font-size: 9px; }
.separator { padding: 0 6px; color: #4b665a; }
.street-pill { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--gold); font-size: 8px; }
.felt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-height: 440px; margin: 0 17px; overflow: hidden; border: 10px solid #342e26; border-radius: 48% / 34%; background:
  radial-gradient(ellipse at center, rgba(42,121,96,.7), transparent 65%),
  linear-gradient(145deg, #15584a, #10483c 65%, #0c4036);
  box-shadow: inset 0 0 0 2px rgba(228,189,112,.3), inset 0 0 60px rgba(0,0,0,.22), 0 4px 0 #201c18;
}
.felt::before { position: absolute; inset: 14px; border: 1px solid rgba(228,189,112,.16); border-radius: inherit; content: ""; pointer-events: none; }
.table-rail { position: absolute; inset: -10px; border: 1px solid rgba(228,189,112,.34); border-radius: inherit; pointer-events: none; }
.seat { z-index: 1; display: flex; flex-direction: column; align-items: center; }
.seat-opponent { padding-top: 18px; }
.seat-player { padding-bottom: 12px; }
.seat-avatar { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; font-size: 10px; font-weight: 800; }
.bot-avatar { background: #183c34; color: var(--gold); font-family: Georgia, serif; font-size: 17px; }
.player-avatar { background: #dbb76e; color: #222016; font-size: 8px; }
.seat-name { margin-top: 5px; font-size: 10px; font-weight: 700; }
.seat-status { margin-left: 4px; color: #c2b897; font: 8px Consolas, "Courier New", monospace; letter-spacing: .06em; }
.seat-stack { margin-top: 3px; color: #cee0d4; font: 9px Consolas, "Courier New", monospace; }
.hole-cards { display: flex; justify-content: center; min-height: 67px; margin-top: 9px; }
.playing-card { display: flex; flex-direction: column; justify-content: space-between; width: 45px; height: 64px; padding: 5px 5px 4px; border: 1px solid #dcd7ca; border-radius: 6px; background: #f5f0e5; color: #18251f; box-shadow: 0 4px 9px rgba(0,0,0,.22); font: 700 14px Georgia, serif; line-height: 1; }
.playing-card + .playing-card { margin-left: -7px; }
.playing-card.red { color: #bd4d4d; }
.playing-card .card-suit { align-self: flex-end; font-size: 15px; }
.playing-card.card-back { display: grid; place-items: center; border: 1px solid #e4bd70; background: repeating-linear-gradient(45deg, #174f42, #174f42 4px, #1d5e4d 4px, #1d5e4d 8px); color: #e4bd70; font-size: 21px; }
.opponent-cards { min-height: 45px; margin-top: 5px; }
.opponent-cards .playing-card { width: 34px; height: 47px; font-size: 11px; }
.opponent-cards .playing-card .card-suit { font-size: 12px; }
.opponent-cards .playing-card.card-back { font-size: 17px; }
.pot-display { z-index: 1; margin: -1px 0 7px; text-align: center; }
.pot-label { color: #bfd2c5; font-size: 8px; }
.pot-amount { margin-top: 3px; color: var(--gold); font: 500 17px Consolas, "Courier New", monospace; }
.pot-amount small { color: #c4d2c8; font-size: 8px; }
.board-cards { z-index: 1; display: flex; justify-content: center; min-height: 72px; margin-top: -3px; }
.board-cards .playing-card { width: 48px; height: 68px; }
.table-message { z-index: 1; min-height: 16px; max-width: 92%; color: #e9dec6; font-size: 10px; text-align: center; }
.bet-marker { position: absolute; display: grid; place-items: center; min-width: 39px; height: 24px; padding: 0 6px; border: 1px solid rgba(228,189,112,.55); border-radius: 999px; background: #142a24; color: var(--gold); font: 9px Consolas, "Courier New", monospace; }
.seat-opponent .bet-marker { top: 40%; left: calc(50% + 118px); }
.seat-player .bet-marker { top: 40%; right: calc(50% + 118px); }
.player-details { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.player-details .seat-name { margin-top: 0; }

.action-area { padding: 19px 21px 17px; }
.turn-prompt { min-height: 19px; margin-bottom: 13px; color: #d9e3da; font-size: 12px; text-align: center; }
.action-controls { display: flex; justify-content: center; align-items: center; gap: 9px; }
.action-controls .button { min-width: 87px; }
.raise-control { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 8px 0 11px; border: 1px solid var(--line); border-radius: 9px; color: #a7b9ac; }
.raise-control > span { white-space: nowrap; font-size: 8px; }
.raise-control input { width: 62px; border: 0; outline: 0; background: transparent; color: var(--cream); text-align: right; font: 11px Consolas, "Courier New", monospace; }
.raise-control input:disabled { opacity: .5; }
.action-footnote { margin-top: 12px; color: #80968b; font-size: 9px; text-align: center; }

.footer { display: flex; justify-content: space-between; padding: 17px 0 23px; color: #6f877b; font-size: 8px; }

@media (max-width: 950px) {
  .app-shell { padding: 0 23px; }
  .game-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 23px; }
  .felt { min-height: 420px; margin: 0 10px; }
}

@media (max-width: 680px) {
  .app-shell { padding: 0 15px; }
  .topbar { height: 67px; }
  .brand { font-size: 13px; }
  .brand-mark { width: 34px; height: 34px; }
  .chip-badge { display: none; }
  .button-outline { min-height: 37px; padding: 0 11px; }
  .game-layout { grid-template-columns: 1fr; gap: 17px; padding-top: 24px; }
  .game-sidebar { padding: 0; }
  .game-sidebar h1 { margin-top: 8px; font-size: 26px; }
  .intro { max-width: 420px; }
  .mode-picker { grid-template-columns: 1fr 1fr; margin-top: 15px; }
  .mode-button { grid-template-columns: 24px 1fr 11px; gap: 6px; min-height: 57px; padding: 8px; }
  .mode-icon { font-size: 17px; }
  .mode-button strong { font-size: 11px; }
  .mode-button small { font-size: 9px; }
  .rules-note { margin-top: 10px; padding: 9px; }
  .table-info { display: none; }
  .felt { min-height: 410px; margin: 0 8px; border-width: 7px; border-radius: 48% / 27%; }
  .seat-opponent { padding-top: 13px; }
  .seat-player { padding-bottom: 8px; }
  .playing-card { width: 41px; height: 59px; }
  .board-cards .playing-card { width: 42px; height: 60px; }
  .opponent-cards .playing-card { width: 31px; height: 44px; }
  .seat-opponent .bet-marker { left: calc(50% + 98px); }
  .seat-player .bet-marker { right: calc(50% + 98px); }
  .action-area { padding: 15px 11px 14px; }
  .action-controls { gap: 6px; }
  .action-controls .button { min-width: 0; padding: 0 10px; font-size: 11px; }
  .raise-control { gap: 4px; padding: 0 5px 0 7px; }
  .raise-control input { width: 51px; font-size: 10px; }
  .footer { gap: 10px; font-size: 7px; }
}

@media (max-width: 370px) {
  .felt { min-height: 375px; }
  .action-controls .button { padding: 0 7px; }
  .seat-opponent .bet-marker { left: calc(50% + 83px); }
  .seat-player .bet-marker { right: calc(50% + 83px); }
}
