/* ============================================================
   Royal Hold'em Casino — style.css
   Luxury casino: dark room, green felt, gold trim, glass.
   7 themes via CSS variables. All animations are transform/
   opacity based (60fps friendly).
   ============================================================ */

:root {
  --bg: #05060d;
  --bg-glow-1: rgba(212, 175, 55, 0.06);
  --bg-glow-2: rgba(76, 29, 149, 0.10);
  --felt-light: #1d9e55;
  --felt: #0e6b35;
  --felt-dark: #06401e;
  --felt-rim-1: #6b4a1f;
  --felt-rim-2: #3a2a12;
  --gold: #d4af37;
  --gold-bright: #ffd700;
  --gold-soft: rgba(212, 175, 55, 0.18);
  --panel: rgba(13, 14, 26, 0.92);
  --panel-border: rgba(212, 175, 55, 0.22);
  --text: #ece9e2;
  --muted: #9a97a3;
  --red: #e63946;
  --green: #2ecc71;
  --blue: #3498db;
  --orange: #e67e22;
  --purple: #6c5ce7;
  --cardback: #7a1f2b;
  --cardback-2: #b8860b;
  --glow: rgba(212, 175, 55, 0.25);
  --radius: 14px;
  --speed: 1;
}

/* ---------- themes ---------- */
body[data-theme="classic"] {
  --felt-light:#1d9e55; --felt:#0e6b35; --felt-dark:#06401e; --gold:#d4af37; --cardback:#7a1f2b;
}
body[data-theme="luxury-gold"] {
  --felt-light:#7a5c1e; --felt:#4e3a10; --felt-dark:#2b1f07; --gold:#ffd700; --gold-bright:#ffe066;
  --cardback:#8a6d1f; --bg-glow-1: rgba(255,215,0,0.10);
}
body[data-theme="las-vegas"] {
  --felt-light:#b3303c; --felt:#7d1a24; --felt-dark:#4a0d13; --gold:#ffd700; --cardback:#1f3a8a;
  --bg-glow-1: rgba(255,60,80,0.08);
}
body[data-theme="monte-carlo"] {
  --felt-light:#2aa8a0; --felt:#126f6a; --felt-dark:#073c39; --gold:#e8d9a0; --cardback:#123f6b;
}
body[data-theme="cyber"] {
  --felt-light:#6b2fb3; --felt:#3c1a6b; --felt-dark:#1e0d38; --gold:#00e5ff; --gold-bright:#7cf5ff;
  --cardback:#0e2a3f; --glow: rgba(0,229,255,0.25);
}
body[data-theme="royal-red"] {
  --felt-light:#a3372b; --felt:#6d1f16; --felt-dark:#3c0f0a; --gold:#f0c060; --cardback:#2b2b7a;
}
body[data-theme="emerald"] {
  --felt-light:#2fbf6f; --felt:#178a4a; --felt-dark:#0a5229; --gold:#c9a24b; --cardback:#14532d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg-glow-1), transparent 60%),
              radial-gradient(1000px 700px at 50% 110%, var(--bg-glow-2), transparent 60%),
              var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ambient particle canvas */
#ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55;
}

/* ---------- site nav ---------- */
.site-nav{position:relative;top:0;left:0;z-index:100;width:100%;padding:4px 0;background:rgba(7,7,18,0.85);backdrop-filter:blur(8px);border-bottom:1px solid rgba(108,92,231,0.1)}
.site-nav-inner{display:flex;align-items:center;gap:8px;padding:8px 20px;max-width:1100px;margin:0 auto;flex-wrap:wrap}
.site-nav .logo{font-size:18px;font-weight:800;margin-right:auto;color:#fff}
.site-nav .logo span{background:linear-gradient(135deg,#6366f1,#8b5cf6,#ffd700);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.site-nav a{color:#8e95a5;text-decoration:none;font-size:13px;padding:6px 12px;border-radius:6px;transition:all .2s}
.site-nav a:hover{color:#fff;background:#1a1f2e}
.site-nav a.active{color:#ffd700;background:rgba(255,215,0,0.1)}

/* ---------- layout ---------- */
#game {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 10px 14px 190px;
  display: flex; flex-direction: column; align-items: center;
}

/* ---------- HUD ---------- */
#hud-left, #hud-right {
  position: absolute; top: 12px; z-index: 30;
  display: flex; gap: 8px; align-items: flex-start;
}
#hud-left { left: 14px; }
#hud-right { right: 14px; }
.hud-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
  min-width: 150px;
}
.hud-box .lbl { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.hud-box .val { color: var(--gold-bright); font-weight: 700; font-size: 15px; }
.hud-box .val.plain { color: var(--text); }
.hud-btn {
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 15px;
  transition: transform .15s, border-color .2s;
  line-height: 1;
}
.hud-btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.hud-btn.on { border-color: var(--gold); box-shadow: 0 0 12px var(--glow); }

/* ---------- table ---------- */
#table-wrap { position: relative; width: 100%; max-width: 1000px; margin-top: 46px; }
#table {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.5;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.55));
}
.table-rim {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255,255,255,.10), transparent 42%),
    repeating-linear-gradient(90deg, var(--felt-rim-1) 0 22px, var(--felt-rim-2) 22px 26px),
    linear-gradient(160deg, #8a6526, #4a3413 55%, #6b4a1f);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.4), inset 0 -18px 40px rgba(0,0,0,.45), inset 0 18px 30px rgba(255,220,140,.12);
}
.table-felt {
  position: absolute; inset: 17px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 40%, var(--felt-light) 0%, var(--felt) 55%, var(--felt-dark) 100%);
  box-shadow: inset 0 0 80px rgba(0,0,0,.55), inset 0 0 8px rgba(255,255,255,.06);
  overflow: hidden;
}
.table-felt::before {   /* glass reflection */
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.09) 0%, rgba(255,255,255,.02) 22%, transparent 42%);
}
.table-felt::after {    /* gold inner ring */
  content: ''; position: absolute; inset: 5%; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(255, 215, 0, 0.18);
  box-shadow: inset 0 0 30px rgba(0,0,0,.25);
}
.felt-pattern {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.6px),
    radial-gradient(rgba(0,0,0,.12) 1px, transparent 1.6px);
  background-size: 26px 26px, 26px 26px;
  background-position: 0 0, 13px 13px;
  opacity: .5;
}

/* deck position (dealing origin) */
#deck-pos {
  position: absolute; left: 50%; top: 6%; transform: translateX(-50%);
  width: 52px; height: 72px;
}
#deck-pos .card { position: absolute; inset: 0; }

/* ---------- community + pot ---------- */
#center-area {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 5; pointer-events: none;
}
#community { display: flex; gap: 8px; min-height: 96px; }
#community .slot { width: 64px; height: 90px; }
#pot-display {
  font-size: 14px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 20px; padding: 3px 14px;
  backdrop-filter: blur(2px);
}
#pot-display .amt { color: var(--gold-bright); }
#pot-chips { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); pointer-events: none; z-index: 4; }

/* ---------- seats ---------- */
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 158px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  z-index: 10;
  transition: opacity .3s;
}
.seat.away { opacity: .35; filter: saturate(.4); }
.seat-badge {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(160deg, rgba(20,22,40,.95), rgba(10,11,22,.95));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 30px;
  padding: 4px 12px 4px 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  min-width: 132px;
}
.seat.active .seat-badge { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px var(--glow), 0 6px 18px rgba(0,0,0,.5); }
.seat.folded .seat-badge { opacity: .45; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.3);
  flex: none;
}
.seat-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.seat-name { font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.seat-stack { font-size: 10.5px; color: var(--gold-bright); font-weight: 700; }
.seat .dealer-btn {
  position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #cfd3dc 60%, #9aa0ad);
  border: 1px solid #666;
  font-size: 9px; font-weight: 900; color: #333;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
  animation: dealerPulse 2.4s ease-in-out infinite;
}
@keyframes dealerPulse { 0%,100% { box-shadow: 0 2px 6px rgba(0,0,0,.5); } 50% { box-shadow: 0 2px 14px rgba(255,255,255,.8); } }
.seat .thinking {
  position: absolute; right: -16px; top: 50%; transform: translateY(-50%);
  display: none; gap: 3px;
}
.seat .thinking span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-bright); animation: think 1s infinite; }
.seat .thinking span:nth-child(2){ animation-delay: .15s; } .seat .thinking span:nth-child(3){ animation-delay: .3s; }
@keyframes think { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.seat-hole { display: flex; gap: 2px; min-height: 52px; }
.seat-hole .card { width: 34px; height: 49px; }
.seat-bet {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,215,0,.3);
  border-radius: 14px; padding: 1px 9px;
  min-height: 20px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .25s, transform .25s;
}
.seat-bet.show { opacity: 1; transform: translateY(0); }
.seat-fold-tag {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-8deg);
  font-size: 10px; font-weight: 900; letter-spacing: .12em; color: #b9b6c2;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2);
  padding: 1px 8px; border-radius: 6px;
  display: none;
}
.seat.folded .seat-fold-tag { display: block; }
.seat.winner .seat-badge { border-color: var(--gold-bright); box-shadow: 0 0 0 2px var(--gold-bright), 0 0 34px var(--glow); animation: winGlow 1.4s ease-in-out infinite; }
@keyframes winGlow { 0%,100% { box-shadow: 0 0 0 2px var(--gold-bright), 0 0 20px var(--glow); } 50% { box-shadow: 0 0 0 3px var(--gold-bright), 0 0 46px var(--glow); } }
.seat .chip-pile { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; max-width: 90px; }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: linear-gradient(150deg, #ffffff 0%, #f4f2ec 70%, #e9e6dd 100%);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.12);
  font-family: 'Georgia', 'Times New Roman', serif;
  flex: none;
}
.card .corner {
  position: absolute; top: 3px; left: 4px; text-align: center; line-height: 1;
  font-weight: 800; font-size: 12px;
}
.card .corner .s { font-size: 10px; display: block; margin-top: 1px; }
.card .big-suit {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; opacity: .9;
}
.card.red { color: #d02130; }
.card.black { color: #1c1f26; }
.card.back {
  background: linear-gradient(140deg, var(--cardback-2) 0%, var(--cardback) 50%, #2c0f18 100%);
  border: 2px solid #f4e2b8;
}
.card.back::before {
  content: ''; position: absolute; inset: 4px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.35);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.10) 0 3px, transparent 3px 6px);
}
.card.back::after {
  content: 'RH'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: rgba(255, 220, 140, .85); letter-spacing: .06em;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.card.flip { transition: transform .35s cubic-bezier(.3,.8,.3,1); transform-style: preserve-3d; }
.card.flip .face { backface-visibility: hidden; position: absolute; inset: 0; border-radius: 6px; }
.card.flip .face.front-face {
  background: linear-gradient(150deg, #ffffff 0%, #f4f2ec 70%, #e9e6dd 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  transform: rotateY(0deg);
}
.card.flip .face.back-face {
  transform: rotateY(180deg);
  background: linear-gradient(140deg, var(--cardback-2) 0%, var(--cardback) 50%, #2c0f18 100%);
  border: 2px solid #f4e2b8;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.3);
}
.card.flip .face.back-face::before {
  content: ''; position: absolute; inset: 4px; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.35);
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.10) 0 3px, transparent 3px 6px);
}
.card.flip .face.back-face::after {
  content: 'RH'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: rgba(255, 220, 140, .85); letter-spacing: .06em;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.card.flip.back-visible { transform: rotateY(180deg); }
.card.fly {
  position: absolute; z-index: 40;
  transition: transform var(--fly-ms, 420ms) cubic-bezier(.25,.6,.3,1), opacity .2s;
  will-change: transform;
  pointer-events: none;
}
.card.pop { animation: cardPop .28s cubic-bezier(.2,1.4,.4,1); }
@keyframes cardPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* card face content */
.card { width: 34px; height: 49px; }
#community .slot .card { width: 64px; height: 90px; }
#community .slot .card .big-suit { font-size: 30px; }
#community .slot .card .corner { font-size: 12px; }
.seat-hole .card .big-suit { font-size: 15px; }
.seat-hole .card .corner { font-size: 8px; }
.seat-hole .card .corner .s { font-size: 7px; }

/* ---------- chips ---------- */
.chip {
  width: 22px; height: 22px; border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 55%), var(--chip-color);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.28), 0 2px 5px rgba(0,0,0,.5);
  font-size: 8px; font-weight: 900; color: rgba(0,0,0,.75);
  display: inline-flex; align-items: center; justify-content: center;
}
.chip::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed rgba(0,0,0,.35); }
.chip.sm { width: 16px; height: 16px; font-size: 6px; }
.chip.big { width: 34px; height: 34px; font-size: 11px; }
.chip.fly {
  position: fixed; z-index: 60; pointer-events: none;
  transition: transform var(--fly-ms, 460ms) cubic-bezier(.3,.5,.4,1), opacity .25s;
  will-change: transform;
}
@keyframes chipBounce { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-26px) scale(1.05); } 100% { transform: translateY(0) scale(1); } }
.chip.bounce { animation: chipBounce .5s ease-in-out 2; }

/* ---------- bet controls ---------- */
#bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(8,9,18,.0), rgba(8,9,18,.94) 22%);
  padding: 10px 16px 14px;
  display: flex; justify-content: center;
}
#player-dock {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 10px 18px;
  box-shadow: 0 -6px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,215,0,.06);
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
#player-dock .avatar { width: 40px; height: 40px; font-size: 17px; }
#player-dock .pname { font-size: 13px; font-weight: 700; }
#player-dock .pstack { font-size: 15px; font-weight: 800; color: var(--gold-bright); }
#human-cards { display: flex; gap: 8px; }
#human-cards .card { width: 58px; height: 82px; }
#human-cards .card .corner { font-size: 15px; }
#human-cards .card .corner .s { font-size: 12px; }
#human-cards .card .big-suit { font-size: 38px; }

#bet-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.btn {
  padding: 10px 18px; border: none; border-radius: 10px;
  font-weight: 800; font-size: 13.5px; cursor: pointer;
  transition: transform .12s, box-shadow .2s, opacity .2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .3; cursor: default; }
.btn.green { background: linear-gradient(160deg, #35d97b, #1fa958); color: #04260f; box-shadow: 0 4px 14px rgba(46,204,113,.35); }
.btn.red { background: linear-gradient(160deg, #f05563, #c92a37); color: #fff; box-shadow: 0 4px 14px rgba(230,57,70,.35); }
.btn.blue { background: linear-gradient(160deg, #4aa9e8, #2878c4); color: #fff; box-shadow: 0 4px 14px rgba(52,152,219,.3); }
.btn.orange { background: linear-gradient(160deg, #f29c4a, #d67a1e); color: #fff; box-shadow: 0 4px 14px rgba(230,126,34,.35); }
.btn.purple { background: linear-gradient(160deg, #8b7cf6, #5f4bd8); color: #fff; box-shadow: 0 4px 14px rgba(108,92,231,.35); }
.btn.gold { background: linear-gradient(160deg, #ffe066, #d4af37); color: #3a2a00; box-shadow: 0 4px 14px rgba(255,215,0,.3); }
.btn.gray { background: #3a3f52; color: #cfd3e0; }
.btn.sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }

#raise-slider-wrap { display: none; align-items: center; gap: 8px; }
#raise-slider-wrap.show { display: flex; }
#raise-slider { width: 150px; accent-color: var(--gold); }
#raise-amount { min-width: 74px; text-align: center; font-weight: 800; color: var(--gold-bright); font-size: 13px; }

/* ---------- overlays / panels ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 5, 12, 0.82);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.overlay.show { display: flex; }
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 26px;
  max-width: 560px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0,0,0,.7), 0 0 0 1px rgba(255,215,0,.07);
  position: relative;
}
.panel h2 {
  font-size: 20px; margin-bottom: 4px;
  background: linear-gradient(120deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.panel .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.panel-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer;
}
.panel-close:hover { color: #fff; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.field { flex: 1; min-width: 130px; }
.field label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.field select, .field input[type=number] {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  background: #101224; color: var(--text);
  border: 1px solid rgba(255,255,255,.14); font-size: 13px; font-family: inherit;
}
.seg { display: flex; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; overflow: hidden; flex-wrap: wrap; }
.seg button {
  flex: 1; padding: 8px 12px; background: #101224; color: var(--muted);
  border: none; cursor: pointer; font-size: 12px; font-weight: 700; font-family: inherit;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.seg button.on { background: var(--gold-soft); color: var(--gold-bright); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.theme-cell {
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px;
  cursor: pointer; text-align: center; font-size: 11.5px; color: var(--muted);
  background: #101224; transition: border-color .15s, transform .15s;
}
.theme-cell:hover { transform: translateY(-2px); }
.theme-cell.on { border-color: var(--gold); color: var(--gold-bright); }
.theme-swatch { width: 100%; height: 26px; border-radius: 6px; margin-bottom: 6px; border: 1px solid rgba(255,255,255,.15); }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-box { background: #101224; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px; text-align: center; }
.stat-box .v { font-size: 17px; font-weight: 800; color: var(--gold-bright); }
.stat-box .k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
#graph { width: 100%; height: 120px; background: #0a0c18; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; }
.ach-list { display: flex; flex-direction: column; gap: 8px; }
.ach {
  display: flex; align-items: center; gap: 10px;
  background: #101224; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 9px 12px;
}
.ach .ic { font-size: 20px; }
.ach .tx { flex: 1; }
.ach .tx .t { font-size: 13px; font-weight: 700; }
.ach .tx .d { font-size: 11px; color: var(--muted); }
.ach.locked { opacity: .45; filter: grayscale(.7); }
.ach.locked .ic { filter: grayscale(1); }

/* toasts */
#toasts { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: linear-gradient(135deg, rgba(20,16,4,.95), rgba(40,28,4,.95));
  border: 1px solid var(--gold);
  border-radius: 30px; padding: 8px 20px;
  font-size: 13px; font-weight: 700; color: var(--gold-bright);
  box-shadow: 0 8px 30px rgba(0,0,0,.5), 0 0 20px var(--glow);
  animation: toastIn .35s cubic-bezier(.2,1.2,.4,1), toastOut .4s ease-in 3.2s forwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-18px) scale(.8); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px) scale(.9); } }

/* winner overlay + confetti */
#confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
#gameover-overlay .panel { text-align: center; }
#gameover-overlay .trophy { font-size: 64px; margin-bottom: 6px; }
#gameover-overlay h2 { font-size: 30px; }
.payout-row { display: flex; justify-content: space-between; padding: 8px 14px; background: #101224; border-radius: 10px; margin-bottom: 6px; font-size: 14px; }
.payout-row .p { color: var(--gold-bright); font-weight: 800; }
.payout-row.first { border: 1px solid var(--gold); }

/* help */
.help-section { margin-bottom: 14px; }
.help-section h3 { font-size: 14px; color: var(--gold-bright); margin-bottom: 4px; }
.help-section p, .help-section li { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.help-section ul { padding-left: 18px; }

/* status pill under table */
#hand-status {
  text-align: center; margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 20px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px; padding: 4px 18px; display: inline-block;
  backdrop-filter: blur(3px);
}
#hand-status .hl { color: var(--gold-bright); font-weight: 700; }

/* ---------- pro info (practice mode) ---------- */
#pro-info {
  font-size: 11.5px; color: var(--muted); font-weight: 700;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,215,0,.18);
  border-radius: 10px; padding: 5px 10px;
  max-width: 340px; text-align: center;
}

/* ---------- missions ---------- */
.mission-list { display: flex; flex-direction: column; gap: 10px; }
.mission {
  background: #101224; border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 12px 14px;
}
.mission .m-top { display: flex; align-items: center; gap: 10px; }
.mission .m-ic { font-size: 22px; }
.mission .m-name { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.mission .m-reward { font-size: 12px; font-weight: 800; color: var(--gold-bright); }
.mission .m-bar { height: 7px; background: rgba(255,255,255,.09); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.mission .m-bar div { height: 100%; background: linear-gradient(90deg, #ffd700, #f59e0b); border-radius: 4px; transition: width .4s; }
.mission.done { border-color: rgba(74,222,128,.4); }
.mission.done .m-name { color: #4ade80; }

/* ---------- hand history ---------- */
.hand-row {
  background: #101224; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 6px;
  font-size: 12px; line-height: 1.5; color: var(--muted);
}
.hand-row .h-num { color: var(--gold-bright); font-weight: 800; }
.hand-row .h-win { color: #4ade80; font-weight: 800; }
.hand-row .h-loss { color: #f87171; font-weight: 800; }
.hand-row .h-actions { color: #b9b6c2; }

/* ---------- leaderboard ---------- */
.board-row {
  display: flex; align-items: center; gap: 10px;
  background: #101224; border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; font-size: 13px;
}
.board-row .b-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-bright); font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; }
.board-row .b-txt { flex: 1; }
.board-row .b-txt .t { font-weight: 800; color: var(--text); font-size: 13px; }
.board-row .b-txt .d { font-size: 11px; color: var(--muted); }
.board-row .b-val { font-weight: 900; color: var(--gold-bright); }

/* responsive */
@media (max-width: 760px) {
  #game { padding: 10px 8px 210px; }
  .hud-box { min-width: 0; padding: 6px 10px; font-size: 11px; }
  #community .slot { width: 52px; height: 74px; }
  #community .card { transform: scale(.85); }
  #human-cards .card { width: 48px; height: 68px; }
  .btn { padding: 8px 12px; font-size: 12px; }
  #raise-slider { width: 100px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  #player-dock { gap: 10px; padding: 10px 12px; }
}

/* ── hand review + drills cards ── */
.rv-card{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:52px;padding:4px 8px;margin:2px;border-radius:8px;background:#f5f0e1;color:#111;font-weight:800;font-size:18px;border:1px solid #0003;box-shadow:0 2px 6px rgba(0,0,0,.35)}
.rv-red{color:#c0392b}
