:root {
  --background: #071b20;
  --panel: #061a1f;
  --panel-edge: #166e65;
  --green: #45e09b;
  --green-soft: #a7f4d4;
  --muted: #9bb7b7;
  --red: #e46d72;
  --gold: #e7bf6a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: #effaf5; background: var(--background); }
button { font: inherit; cursor: pointer; }
.is-hidden { display: none !important; }
.site-footer { position: fixed; right: 14px; bottom: 9px; left: 14px; z-index: 5; color: rgba(171, 207, 199, .48); font-size: 9px; letter-spacing: .01em; text-align: center; }
.site-footer a { color: rgba(167, 244, 212, .62); text-decoration: none; }
.site-footer a:hover { color: var(--green-soft); text-decoration: underline; }
.demo-screen { display: grid; place-items: center; min-height: 100vh; padding: 26px; background: radial-gradient(circle at 50% 35%, rgba(17, 114, 99, .28), transparent 36%), var(--background); }
.demo-label { position: fixed; top: 24px; left: 28px; color: rgba(178, 231, 213, .55); letter-spacing: .15em; font-size: 10px; font-weight: 700; }
.auth-shell { width: min(100%, 360px); }
.auth-panel { padding: 26px; border: 1px solid var(--panel-edge); border-radius: 18px; background: linear-gradient(155deg, #082329, var(--panel)); box-shadow: 0 20px 55px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(194, 255, 228, .06); }
.auth-kicker { color: var(--green); letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.auth-panel h1 { margin: 9px 0 6px; color: #f2fff9; font-size: 27px; }
.auth-panel p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-field { display: grid; gap: 6px; margin-top: 16px; color: var(--green-soft); font-size: 11px; font-weight: 700; }
.auth-field input { width: 100%; padding: 11px 12px; border: 1px solid rgba(154, 210, 195, .24); border-radius: 8px; outline: none; color: #effaf5; background: rgba(3, 20, 24, .8); font-size: 14px; }
.auth-field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(69, 224, 155, .13); }
.auth-remember { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.auth-remember input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.auth-submit { width: 100%; margin-top: 20px; padding: 11px; border: 0; border-radius: 8px; color: #05241c; background: var(--green); font-weight: 800; }
.auth-submit:disabled { cursor: wait; opacity: .55; }
.auth-error { min-height: 20px; margin-top: 12px !important; color: #ff9d9f !important; font-size: 12px !important; }
.auth-toggle { display: block; margin: 3px auto 0; border: 0; color: var(--green-soft); background: transparent; font-size: 12px; }
.auth-toggle:hover { color: var(--green); }
.player-widget { position: relative; width: 192px; padding: 13px 11px 11px; border: 1px solid var(--panel-edge); border-radius: 17px; background: linear-gradient(155deg, #071f24, var(--panel)); box-shadow: 0 0 0 5px rgba(26, 164, 132, .08), 0 18px 45px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(194, 255, 228, .06); }
.widget-header { display: flex; align-items: center; gap: 6px; margin: 0 1px 9px; color: var(--green-soft); letter-spacing: .1em; font-size: 9px; }
.player-session { display: flex; align-items: center; justify-content: space-between; margin: -2px 1px 8px; color: #d5e9e3; font-size: 9px; }
.player-session button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 9px; }
.player-session button:hover { color: var(--red); }
.table-players { display: grid; gap: 3px; margin: -3px 0 8px; }
.table-player { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; padding: 3px 5px; border: 1px solid rgba(154, 210, 195, .18); border-radius: 5px; color: var(--muted); background: rgba(3, 20, 24, .52); font-size: 8px; }
.table-player.is-you { border-color: rgba(69, 224, 155, .52); color: var(--green-soft); }
.table-player.is-folded { opacity: .55; text-decoration: line-through; }
.table-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-player-roles { flex: 0 0 auto; padding: 1px 5px; border-radius: 999px; color: #05241c; background: var(--green); font-size: 7px; font-weight: 900; letter-spacing: .04em; }
.table-player-roles.small-blind { color: #05241c; background: var(--green-soft); }
.table-player-roles.big-blind { color: #30230b; background: var(--gold); }
.table-player-roles:empty { display: none; }
.buy-chips-link { display: block; margin: -3px auto 8px; padding: 3px 8px; border: 1px solid rgba(231, 191, 106, .5); border-radius: 999px; color: var(--gold); background: rgba(91, 57, 11, .35); font-size: 8px; }
.buy-chips-link:hover { color: #30230b; background: var(--gold); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.status-dot.waiting { background: var(--gold); box-shadow: 0 0 9px var(--gold); }
.hole-cards { display: flex; gap: 9px; }
.table-meta { display: flex; justify-content: space-between; align-items: center; margin: 11px 1px 6px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.table-meta strong { color: var(--green-soft); font-size: 9px; }
.community-cards { display: flex; justify-content: center; gap: 4px; min-height: 39px; }
.made-hand { min-height: 16px; margin: 9px 0 7px; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-align: center; }
.hand-separator { width: 78%; height: 1px; margin: 0 auto 7px; border-top: 1px dotted rgba(169, 220, 204, .46); }
.card { display: grid; place-items: center; width: clamp(68px, 19vw, 92px); height: clamp(100px, 27vw, 138px); border: 1px solid #d4dfdf; border-radius: 7px; color: #17292a; background: linear-gradient(145deg, #fff 0%, #e9f0ef 100%); box-shadow: 0 5px 10px rgba(0, 0, 0, .2); font: clamp(28px, 5vw, 42px) Georgia, serif; }
.card.small { width: 30px; height: 39px; border-radius: 4px; font-size: 13px; }
.card.small .suit { margin-top: -2px; font-size: 10px; }
.card-back { color: var(--green-soft); background: repeating-linear-gradient(135deg, #10434a 0 4px, #0c3037 4px 8px); border-color: #277f76; font: 15px Georgia, serif; }
.decision:disabled { cursor: not-allowed; opacity: .3; filter: grayscale(.35); }
.card.red { color: #c64751; }
.card .suit { display: block; margin-top: -6px; font-size: clamp(21px, 4vw, 31px); }
.widget-footer { display: flex; justify-content: space-between; align-items: center; margin: 8px 1px 0; color: var(--muted); font-size: 9px; }.widget-footer strong { color: #d5e9e3; font-size: 9px; font-weight: 600; }
.decision-divider { height: 1px; margin: 11px 0 9px; background: rgba(144, 214, 192, .14); }
.decision-label { margin-bottom: 7px; color: rgba(179, 226, 211, .6); letter-spacing: .12em; font-size: 8px; font-weight: 700; }
.bet-tools { display: grid; grid-template-columns: 1fr 92px; gap: 6px; align-items: center; margin: 0 0 7px; }
.bet-tools label { color: rgba(179, 226, 211, .62); font-size: 8px; letter-spacing: .08em; }
.bet-tools input { grid-column: 1; min-width: 0; width: 100%; box-sizing: border-box; padding: 7px 8px; border: 1px solid rgba(154, 210, 195, .25); border-radius: 6px; color: #d9fff0; background: rgba(4, 27, 32, .9); font-size: 10px; }
.bet-tools .all-in { grid-column: 2; grid-row: 1 / span 2; width: 100%; padding: 7px 3px; color: #fff1c3; border-color: rgba(231, 191, 106, .55); background: rgba(91, 57, 11, .75); transform: translateY(10px); }
.decision-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.decision { min-width: 0; padding: 7px 3px; border: 1px solid rgba(154, 210, 195, .2); border-radius: 6px; color: #c9ddda; background: rgba(17, 51, 55, .75); font-size: 9px; }.decision:hover, .decision.selected { border-color: var(--green); color: #05241c; background: var(--green); }.decision.primary { border-color: rgba(231, 191, 106, .45); color: var(--gold); }.decision.primary:hover, .decision.primary.selected { color: #30230b; background: var(--gold); }.decision.danger:hover, .decision.danger.selected { border-color: var(--red); color: #310e12; background: var(--red); }
.decision-feedback { min-height: 13px; margin: 8px 0 0; color: rgba(171, 207, 199, .65); text-align: center; font-size: 8px; }
.turn-alert { display: none; margin: -2px auto 8px; padding: 5px 12px; border: 1px solid rgba(69, 224, 155, .55); border-radius: 999px; color: #05241c; background: var(--green); box-shadow: 0 0 0 rgba(69, 224, 155, 0); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-align: center; transform-origin: center; }
.turn-alert.is-visible { display: block; animation: turnPop 1.15s ease-in-out infinite; }
.action-clock { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; align-items: center; margin: -2px 1px 8px; padding: 5px 6px; border: 1px solid rgba(231, 191, 106, .45); border-radius: 7px; color: var(--gold); background: rgba(91, 57, 11, .28); font-size: 8px; letter-spacing: .06em; }
.action-clock strong { color: #fff1c3; font-size: 12px; }
.action-clock button { grid-column: 1 / span 2; padding: 4px 6px; border: 1px solid rgba(231, 191, 106, .65); border-radius: 5px; color: #fff1c3; background: rgba(91, 57, 11, .6); font-size: 8px; }
.action-clock button:hover, .action-clock button.armed { color: #30230b; background: var(--gold); }
.action-clock button:disabled { cursor: not-allowed; opacity: .45; }
.player-widget.your-turn .status-dot { animation: turnDot 1s ease-in-out infinite; }
@keyframes turnPop { 0%, 100% { transform: scale(1) rotate(-2deg); box-shadow: 0 0 0 rgba(69, 224, 155, 0); } 45% { transform: scale(1.08) rotate(2deg); box-shadow: 0 0 22px rgba(69, 224, 155, .48); } 70% { transform: scale(.98) rotate(0deg); } }
@keyframes turnDot { 50% { transform: scale(1.55); box-shadow: 0 0 16px var(--green); } }
.winner-celebration { position: absolute; z-index: 5; inset: 250px 10px 10px; display: grid; place-items: center; align-content: center; gap: 8px; overflow: hidden; border: 1px solid rgba(231, 191, 106, .72); border-radius: 15px; color: #05241c; background: radial-gradient(circle at 50% 35%, rgba(69, 224, 155, .28), rgba(8, 68, 61, .52) 72%), rgba(2, 9, 12, .28); box-shadow: 0 0 0 4px rgba(69, 224, 155, .1), 0 12px 30px rgba(0, 0, 0, .28); backdrop-filter: blur(1px); text-align: center; }
.winner-celebration.is-hidden { display: none !important; }
.winner-celebration > strong { color: #f6ffcc; font-size: 15px; letter-spacing: .08em; text-shadow: 0 2px 5px rgba(0, 0, 0, .35); }
.winner-celebration > p { max-width: 180px; margin: 0; color: #d9fff0; font-size: 10px; line-height: 1.35; }
.celebration-sparkles { position: absolute; top: 12px; color: #fff4a8; font-size: 19px; animation: sparkleFloat 1.4s ease-in-out infinite; }
.reward-chest { position: relative; width: 88px; height: 68px; border: 0; cursor: pointer; background: transparent; filter: drop-shadow(0 9px 8px rgba(0, 0, 0, .35)); animation: chestBounce 1.1s ease-in-out infinite; }
.reward-chest:disabled { cursor: default; }
.chest-body, .chest-lid { position: absolute; left: 8px; width: 72px; border: 2px solid #8c4a22; background: linear-gradient(145deg, #f1b04d, #a84d1f); }
.chest-body { bottom: 5px; height: 39px; border-radius: 5px 5px 9px 9px; }
.chest-lid { top: 9px; height: 22px; border-radius: 12px 12px 5px 5px; transform-origin: bottom center; }
.chest-lock { position: absolute; z-index: 2; left: 36px; top: 27px; color: #ffeaa0; font-size: 17px; }
.reward-chest.opening .chest-lid { transform: rotateX(65deg) translateY(-7px); transition: transform .55s ease; }
.reward-chest.opening { animation: chestOpen .65s ease forwards; }
.winner-celebration.opened .reward-chest { animation: none; opacity: .65; }
.defeat-celebration { position: absolute; z-index: 5; inset: 280px 28px 70px; display: grid; place-items: center; align-content: center; gap: 9px; overflow: hidden; border: 1px solid rgba(228, 109, 114, .72); border-radius: 18px; color: #fff2f2; background: radial-gradient(circle at 50% 30%, rgba(228, 109, 114, .28), rgba(74, 18, 27, .52) 72%), rgba(8, 2, 5, .28); box-shadow: 0 0 0 4px rgba(228, 109, 114, .1), 0 12px 30px rgba(0, 0, 0, .28); backdrop-filter: blur(1px); text-align: center; }
.defeat-celebration.is-hidden { display: none !important; }
.defeat-icon { display: grid; place-items: center; width: 66px; height: 66px; border: 3px solid #ffd9d9; border-radius: 50%; color: #fff; background: rgba(86, 12, 23, .72); box-shadow: 0 0 0 7px rgba(255, 217, 217, .13); font-size: 33px; font-weight: 900; }
.defeat-celebration > strong { color: #fff; font-size: 16px; letter-spacing: .1em; text-shadow: 0 2px 5px rgba(0, 0, 0, .35); }
.defeat-celebration > p { margin: 0; color: #ffe4e4; font-size: 10px; }
.chips-modal { position: absolute; z-index: 12; inset: 12px; display: grid; place-items: center; padding: 12px; border: 1px solid rgba(231, 191, 106, .8); border-radius: 15px; background: rgba(2, 9, 12, .86); backdrop-filter: blur(5px); }
.chips-modal-panel { width: min(100%, 290px); padding: 20px; border: 1px solid var(--panel-edge); border-radius: 15px; background: linear-gradient(155deg, #082329, var(--panel)); box-shadow: 0 15px 35px rgba(0, 0, 0, .45); }
.chips-modal-panel h2 { margin: 8px 0 5px; color: #f2fff9; font-size: 22px; }
.chips-modal-panel p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.chips-modal-panel .auth-field { margin-top: 14px; }
.chips-modal-panel .auth-submit { margin-top: 14px; }
.chips-modal-panel .auth-error { min-height: 16px; margin-top: 8px !important; }
.login-prompt { position: absolute; z-index: 13; inset: 12px; display: grid; place-items: center; padding: 12px; border: 1px solid rgba(69, 224, 155, .7); border-radius: 15px; background: rgba(2, 9, 12, .88); backdrop-filter: blur(5px); }
.login-prompt-panel { width: min(100%, 290px); padding: 24px 20px; border: 1px solid var(--panel-edge); border-radius: 15px; background: linear-gradient(155deg, #082329, var(--panel)); box-shadow: 0 15px 35px rgba(0, 0, 0, .45); text-align: center; }
.login-prompt-panel h2 { margin: 8px 0 5px; color: #f2fff9; font-size: 21px; }
.login-prompt-panel p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.login-prompt-panel .auth-submit { margin-top: 18px; }
.rematch-modal { position: absolute; z-index: 15; inset: 12px; display: grid; place-items: center; padding: 12px; border: 1px solid rgba(69, 224, 155, .75); border-radius: 15px; background: rgba(2, 9, 12, .9); backdrop-filter: blur(5px); }
.rematch-modal.is-hidden { display: none !important; }
.rematch-panel { width: min(100%, 320px); padding: 26px 22px 20px; border: 1px solid var(--panel-edge); border-radius: 17px; background: linear-gradient(155deg, #082329, var(--panel)); box-shadow: 0 15px 35px rgba(0, 0, 0, .45); text-align: center; }
.rematch-panel h2 { margin: 9px 0 7px; color: #f2fff9; font-size: 24px; }
.rematch-panel > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rematch-actions { display: grid; gap: 9px; margin-top: 20px; }
.rematch-actions .auth-submit { margin-top: 0; }
.rematch-actions .auth-submit.accepted { color: #d9fff0; border: 1px solid rgba(167, 244, 212, .65); background: #1f8f68; cursor: default; opacity: .9; }
.auth-secondary { width: 100%; padding: 11px; border: 1px solid rgba(154, 210, 195, .25); border-radius: 8px; color: var(--green-soft); background: rgba(17, 51, 55, .75); font-weight: 800; }
.auth-secondary:hover { border-color: var(--green); color: #05241c; background: var(--green); }
.rematch-actions button:disabled { cursor: wait; opacity: .55; }
.rematch-feedback { min-height: 16px; margin-top: 12px !important; color: var(--green-soft) !important; font-size: 10px !important; }
@keyframes chestBounce { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes chestOpen { 45% { transform: scale(1.18) rotate(-3deg); } 100% { transform: scale(1); } }
@keyframes sparkleFloat { 50% { transform: scale(1.2) rotate(10deg); } }
@media (min-width: 561px) {
  .auth-shell { width: min(100%, 430px); }
  .auth-panel { padding: 34px; border-radius: 22px; }
  .auth-panel h1 { font-size: 31px; }
  .player-widget { width: min(100%, 430px); padding: 20px 22px 20px; border-radius: 24px; }
  .widget-header { margin-bottom: 12px; font-size: 11px; }
  .player-session { margin-bottom: 12px; font-size: 11px; }
  .player-session button { font-size: 11px; }
  .hole-cards { justify-content: center; gap: 14px; margin: 10px 0 8px; }
  .card { width: 112px; height: 156px; font-size: 45px; }
  .card .suit { font-size: 33px; }
  .table-meta { margin: 14px 2px 8px; font-size: 11px; }
  .table-meta strong { font-size: 11px; }
  .community-cards { min-height: 58px; gap: 7px; }
  .card.small { width: 48px; height: 58px; border-radius: 5px; font-size: 15px; }
  .card.small .suit { font-size: 12px; }
  .made-hand { min-height: 18px; margin: 10px 0 9px; font-size: 11px; }
  .hand-separator { width: 84%; margin-bottom: 9px; }
  .widget-footer { margin-top: 12px; font-size: 11px; }
  .widget-footer strong { font-size: 11px; }
  .decision-divider { margin: 15px 0 12px; }
  .decision-label { margin-bottom: 9px; font-size: 10px; }
  .bet-tools { gap: 8px; margin-bottom: 9px; }
  .bet-tools label { font-size: 10px; }
  .bet-tools input { padding: 9px 10px; font-size: 12px; }
  .bet-tools .all-in { padding: 9px 6px; font-size: 12px; }
  .decision-actions { gap: 8px; }
  .decision { padding: 10px 6px; border-radius: 8px; font-size: 12px; }
  .decision-feedback { margin-top: 11px; font-size: 10px; }
  .action-clock { margin: -2px 2px 10px; padding: 7px 8px; font-size: 10px; }
  .action-clock strong { font-size: 14px; }
  .action-clock button { padding: 6px; font-size: 10px; }
  .winner-celebration { inset: 300px 12px 12px; border-radius: 20px; }
  .defeat-celebration { inset: 320px 22px 70px; border-radius: 20px; }
}
@media (max-width: 560px) {
  .demo-screen { min-height: 100svh; width: 100vw; padding: 0; display: flex; align-items: stretch; justify-content: stretch; }
  .demo-label { top: 17px; left: 20px; z-index: 2; }
  .auth-shell { width: 100%; min-height: 100svh; display: flex; align-items: stretch; }
  .auth-panel { width: 100%; min-height: 100svh; padding: 76px 24px 28px; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
  .player-widget { width: 100%; min-height: 100svh; padding: 76px 22px 54px; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
  .widget-header { font-size: 11px; margin-bottom: 18px; }
  .action-clock { width: min(100%, 420px); margin: -5px auto 11px; padding: 8px 10px; font-size: 10px; }
  .action-clock strong { font-size: 15px; }
  .action-clock button { padding: 7px; font-size: 11px; }
  .player-session { font-size: 11px; }
  .hole-cards { justify-content: center; gap: 14px; margin: 20px 0 8px; }
  .card { width: min(104px, 25vw); height: clamp(136px, 35vw, 154px); font-size: clamp(42px, 10vw, 52px); }
  .card .suit { margin-top: -8px; font-size: clamp(30px, 7vw, 38px); }
  .table-meta { width: min(100%, 420px); margin: 14px auto 7px; font-size: 11px; }
  .table-meta strong { font-size: 11px; }
  .community-cards { min-height: 51px; gap: 6px; }
  .made-hand { min-height: 18px; margin: 8px 0 9px; font-size: 11px; }
  .hand-separator { width: 82%; margin-bottom: 9px; }
  .card.small { width: 39px; height: 51px; font-size: 18px; }
  .card.small .suit { margin-top: -4px; font-size: 13px; }
  .widget-footer { margin-top: 14px; font-size: 11px; }
  .widget-footer strong { font-size: 12px; }
  .decision-divider { margin-top: 24px; }
  .decision-label { font-size: 10px; margin-bottom: 11px; }
  .bet-tools { width: min(100%, 420px); margin: 0 auto 9px; gap: 9px; }
  .bet-tools label { font-size: 10px; }
  .bet-tools input { padding: 11px 9px; font-size: 13px; }
  .bet-tools .all-in { padding: 11px 6px; font-size: 13px; }
  .decision-actions { width: min(100%, 420px); margin: 0 auto; gap: 9px; }
  .decision { padding: 13px 6px; border-radius: 8px; font-size: 13px; }
  .decision-feedback { margin-top: 13px; font-size: 11px; }
  .winner-celebration { inset: 270px 24px 45px; border-radius: 22px; }
  .winner-celebration > strong { font-size: 19px; }
  .winner-celebration > p { max-width: 245px; font-size: 12px; }
  .reward-chest { transform: scale(1.18); }
  .defeat-celebration { inset: 290px 24px 70px; border-radius: 22px; }
  .defeat-celebration > strong { font-size: 19px; }
  .defeat-celebration > p { font-size: 12px; }
}
