/* Easy color editing: change these values to reskin the site. */
:root {
  --red-950: #160306;
  --red-900: #2a0409;
  --red-800: #53000f;
  --red-700: #8d071c;
  --gold: #f3c76d;
  --cream: #fff3d6;
  --ink: #12080a;
  --muted: #d9bda0;
  --panel: rgba(37, 4, 10, 0.88);
  --line: rgba(243, 199, 109, 0.32);
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

/* Ensure the hidden attribute always hides elements regardless of display overrides */
[hidden] { display: none !important; }

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #070405;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--cream);
  background: linear-gradient(145deg, var(--red-950), #070405 76%);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  background: rgba(15, 3, 5, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.hero-actions,
.demo-widget,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  background: linear-gradient(145deg, #ffe39d, var(--gold));
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(243, 199, 109, 0.16);
}

.main-nav {
  gap: 0.35rem;
}

.main-nav a {
  min-height: 2.5rem;
  padding: 0.7rem 0.95rem;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 7rem clamp(1rem, 5vw, 5rem) 4rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 1, 4, 0.96) 0%, rgba(16, 1, 4, 0.78) 45%, rgba(16, 1, 4, 0.56) 100%),
    url("assets/casino-hero.png") center / cover no-repeat;
  opacity: 0.58;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 2rem));
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: 0.94;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.hero-copy,
.demo-widget p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 560px;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-weight: 800;
  font: inherit;
  cursor: pointer;
}

.button.primary {
  color: var(--ink);
  background: linear-gradient(145deg, #ffe39d, var(--gold));
  box-shadow: 0 10px 26px rgba(243, 199, 109, 0.22);
}

.button.secondary {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.custom-section {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  scroll-margin-top: 6rem;
}

.custom-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.custom-section {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
}

.section-heading {
  margin-bottom: 1.25rem;
}

.custom-stage {
  min-height: 9rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.login-main {
  width: min(980px, calc(100% - 2rem));
  min-height: calc(100vh - 5rem);
  margin: 0 auto;
  padding: 8rem 0 clamp(4rem, 8vw, 6rem);
}

.login-shell {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-shell h1 {
  max-width: none;
  margin-bottom: 0.85rem;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.page-copy {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.blackjack-game {
  position: relative;
  display: grid;
  gap: 1.25rem;
  overflow: hidden;
}

.game-topline,
.hand-label,
.game-controls {
  display: flex;
  align-items: center;
}

.game-topline {
  justify-content: space-between;
  gap: 1rem;
}

.game-topline p,
.game-status {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.game-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.game-badge,
.shoe-badge,
.wallet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-badge {
  color: var(--ink);
  background: var(--gold);
}

.shoe-badge,
.wallet-badge {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.game-status {
  min-height: 3rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trust-headline {
  padding: 1rem;
  background: linear-gradient(145deg, rgba(243, 199, 109, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(243, 199, 109, 0.38);
  border-radius: 8px;
}

.trust-headline h3 {
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.trust-headline p {
  margin-bottom: 0;
  color: var(--cream);
  line-height: 1.55;
}

.game-account-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-account-strip div {
  display: grid;
  gap: 0.2rem;
  min-height: 3rem;
  justify-content: start;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(243, 199, 109, 0.18);
  border-radius: 8px;
}

.game-account-strip span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-account-strip strong {
  color: var(--gold);
}

.blackjack-game[data-play-mode="demo"] .game-account-strip,
.blackjack-game[data-play-mode="demo"] .wallet-badge {
  display: none;
}

.account-panel,
.owner-panel,
.mode-panel,
.match-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.owner-panel[hidden] {
  display: none;
}

.account-copy p,
.owner-copy p,
.mode-copy p,
.match-copy p,
.auth-message,
.owner-message,
.match-status {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mode-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mode-options {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(8rem, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(243, 199, 109, 0.22);
  border-radius: 999px;
}

.mode-option {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-option:has(input:checked) {
  color: var(--ink);
  background: linear-gradient(145deg, #ffe39d, var(--gold));
}

.mode-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.7;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.auth-card,
.wallet-card,
.owner-transfer,
.match-card {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(243, 199, 109, 0.2);
  border-radius: 8px;
}

.auth-card label,
.owner-transfer label,
.stake-field {
  display: grid;
  gap: 0.45rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stake-field[hidden],
.bet-options[hidden] {
  display: none;
}

.auth-card input,
.owner-transfer input,
.owner-transfer select,
.stake-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.auth-card input:focus,
.owner-transfer input:focus,
.owner-transfer select:focus,
.stake-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(243, 199, 109, 0.14);
}

.google-signin-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.google-signin-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 199, 109, 0.22);
  border-radius: 10px;
  flex-wrap: wrap;
}

.google-signin-copy {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  color: var(--cream);
  font-size: 0.95rem;
  white-space: nowrap;
}

.google-signin-copy svg {
  flex-shrink: 0;
}

#google-signin-btn,
[data-google-btn] {
  flex-shrink: 0;
}

.google-status {
  width: 100%;
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.88rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.wallet-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.6rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.wallet-line span {
  color: var(--muted);
}

.wallet-line strong {
  color: var(--gold);
}

.match-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.match-card div {
  display: grid;
  gap: 0.25rem;
}

.match-card span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-card strong {
  color: var(--gold);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.auth-message,
.owner-message,
.match-status {
  min-height: 2.5rem;
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.owner-transfer {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.42fr) auto;
  align-items: end;
}

.owner-tools-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.owner-tool-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(243, 199, 109, 0.2);
  border-radius: 8px;
}

.owner-tool-card h5 {
  margin: 0;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.owner-tool-card label {
  display: grid;
  gap: 0.45rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-tool-card input,
.owner-tool-card select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.owner-tool-card input:focus,
.owner-tool-card select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(243, 199, 109, 0.14);
}

.button.danger,
.button--danger {
  background: #b91c1c;
  color: #fff;
  border-color: #7f1d1d;
}

.button.danger:hover,
.button--danger:hover {
  background: #991b1b;
}

.rules-per-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

@media (max-width: 600px) {
  .rules-per-game-grid {
    grid-template-columns: 1fr;
  }
}

.rules-card {
  padding: 1rem;
}

.rules-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.rules-game-icon {
  font-size: 1.1rem;
  color: var(--gold);
  line-height: 1;
}

.rules-card-head h4 {
  margin: 0;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.rules-card h4 {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.rules-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rules-field {
  display: grid;
  gap: 0.45rem;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rules-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.rules-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(243, 199, 109, 0.14);
}

.rules-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rules-status {
  flex: 1;
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.85rem;
}

.owner-dashboard {
  display: grid;
  gap: 1rem;
  padding-top: 0.5rem;
}

.owner-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.owner-dashboard-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.stats-grid,
.monitor-grid {
  display: grid;
  gap: 0.75rem;
}

.stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card--revenue strong {
  color: #7cf7a8;
}

.monitor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.monitor-card {
  min-width: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(243, 199, 109, 0.2);
  border-radius: 8px;
}

.stat-card {
  display: grid;
  gap: 0.35rem;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--gold);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.monitor-card h4 {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.monitor-list,
.activity-list {
  display: grid;
  gap: 0.65rem;
}

.monitor-alert,
.activity-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.monitor-alert {
  border-left: 4px solid var(--gold);
}

.monitor-alert.warn {
  border-left-color: #ffcd5b;
}

.monitor-alert.info {
  border-left-color: #8ecbff;
}

.monitor-alert strong,
.activity-item strong {
  color: var(--cream);
}

.monitor-alert span,
.activity-item span,
.activity-item time,
.empty-state {
  color: var(--muted);
  line-height: 1.45;
}

.activity-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.activity-item time {
  font-size: 0.78rem;
  white-space: nowrap;
}

.empty-state {
  margin-bottom: 0;
}

.owner-table-wrap {
  overflow-x: auto;
}

.owner-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
}

.owner-table th,
.owner-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.owner-table th {
  color: var(--gold);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.owner-table td {
  color: var(--cream);
  font-size: 0.88rem;
}

.owner-table--wide {
  min-width: 52rem;
}

/* Player monitor header + search */
.player-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.player-monitor-head h4 {
  margin: 0;
}

.player-search-form {
  display: flex;
  gap: 0.45rem;
  flex: 1;
  max-width: 22rem;
}

.player-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.42rem 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(243, 199, 109, 0.3);
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.88rem;
}

.player-search-input::placeholder { color: var(--muted); }
.player-search-input:focus { outline: none; border-color: var(--gold); }

/* Advantage player */
.advantage-row { background: rgba(255, 160, 0, 0.07); }

.advantage-badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 160, 0, 0.18);
  border: 1px solid rgba(255, 160, 0, 0.55);
  border-radius: 4px;
  color: #ffa500;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

.advantage-value { color: #ffa500; font-weight: 700; }

.monitor-username {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.monitor-username:hover { color: var(--gold); }

/* Player profile card */
.player-profile-card { margin-top: 0; }

.player-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.player-profile-head h4 { margin: 0; }

.profile-sub {
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.profit-positive { color: #7cf7a8; }
.profit-negative { color: #ff7070; }

.outcome-win { color: #7cf7a8; font-weight: 700; }
.outcome-loss { color: #ff7070; font-weight: 700; }
.outcome-push { color: var(--muted); }

.profile-hands-wrap h5 {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bet-panel,
.table-bet-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bet-copy p,
.bet-result {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.bet-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.bet-option {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 199, 109, 0.22);
  border-radius: 8px;
  color: var(--cream);
  cursor: pointer;
  font-weight: 800;
}

.bet-option input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold);
}

.bet-option:has(input:checked) {
  color: var(--ink);
  background: linear-gradient(145deg, #ffe39d, var(--gold));
  border-color: var(--gold);
}

.bet-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.72;
}

.bet-result {
  min-height: 2.5rem;
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.bet-result.is-win {
  color: #d8ffb8;
  border-color: rgba(142, 255, 115, 0.55);
  box-shadow: 0 0 24px rgba(95, 255, 91, 0.14);
}

.bet-result.is-loss {
  color: #ffd3d3;
  border-color: rgba(255, 120, 120, 0.42);
}

.blackjack-table {
  position: relative;
  display: grid;
  gap: 0.85rem;
  min-height: 52rem;
  padding: clamp(1.1rem, 2.5vw, 1.8rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, rgba(35, 110, 75, 0.88), rgba(9, 45, 30, 0.94) 58%, rgba(6, 27, 19, 0.98)),
    linear-gradient(145deg, rgba(243, 199, 109, 0.14), rgba(0, 0, 0, 0));
  border: 1px solid rgba(243, 199, 109, 0.36);
  border-radius: 12px;
  box-shadow: inset 0 0 0 10px rgba(70, 13, 16, 0.36), inset 0 0 80px rgba(0, 0, 0, 0.3);
}

.blackjack-table::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 2px solid rgba(243, 199, 109, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.blackjack-table::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.16;
  pointer-events: none;
}

.hand-area,
.table-center {
  position: relative;
  z-index: 1;
}

.hand-area {
  min-height: 11.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.13);
  border: 1px solid rgba(243, 199, 109, 0.18);
  border-radius: 8px;
}

.opponent-area,
.player-area {
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.table-center {
  display: grid;
  align-items: center;
  justify-content: center;
}

.table-bet-panel {
  width: min(34rem, 100%);
  background: rgba(18, 8, 10, 0.62);
  border-color: rgba(243, 199, 109, 0.3);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.table-bet-row {
  display: grid;
  grid-template-columns: minmax(9rem, 0.8fr) minmax(8rem, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.table-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.table-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 199, 109, 0.22);
  border-radius: 8px;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.table-btn:hover:not(:disabled) {
  background: rgba(243, 199, 109, 0.12);
  border-color: rgba(243, 199, 109, 0.5);
}

.table-btn.is-selected {
  color: var(--ink);
  background: linear-gradient(145deg, #ffe39d, var(--gold));
  border-color: var(--gold);
}

.table-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.table-btn-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  opacity: 0.75;
}

.table-btn.is-selected .table-btn-label {
  opacity: 0.6;
}

.table-btn-stake {
  font-size: 1rem;
  font-weight: 800;
}

.table-pill {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 0.35rem 0.8rem;
  color: rgba(255, 243, 214, 0.84);
  background: rgba(22, 3, 6, 0.72);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hand-label {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hand-label h3 {
  margin-bottom: 0;
}

.hand-label span {
  color: var(--gold);
  font-weight: 800;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  min-height: 7.4rem;
}

.playing-card {
  display: grid;
  width: 4.7rem;
  height: 6.6rem;
  grid-template-rows: auto 1fr;
  padding: 0.6rem;
  color: #111;
  background: #fff7e4;
  border: 2px solid #c8a25a;
  border-radius: 8px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
  animation: deal-card 780ms cubic-bezier(0.18, 0.84, 0.22, 1) both;
  animation-delay: calc(var(--card-index, 0) * 135ms);
  backface-visibility: hidden;
  transform-origin: 50% 120%;
  will-change: transform, opacity, filter;
}

.playing-card span {
  font-size: 1rem;
  font-weight: 900;
}

.playing-card strong {
  align-self: center;
  justify-self: center;
  font-size: 2rem;
  line-height: 1;
}

.red-card {
  color: #a70622;
}

.card-back {
  place-items: center;
  color: var(--gold);
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(243, 199, 109, 0.36) 42% 58%, transparent 58%),
    linear-gradient(45deg, transparent 0 42%, rgba(243, 199, 109, 0.24) 42% 58%, transparent 58%),
    var(--red-800);
  border-color: var(--gold);
  font-size: 2rem;
  font-weight: 900;
}

.game-controls {
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes deal-card {
  0% {
    opacity: 0;
    filter: blur(2px);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
    transform: translate(var(--deal-x, 10rem), var(--deal-y, -8rem)) rotate(var(--deal-tilt, 9deg)) rotateX(62deg)
      rotateY(24deg) scale(0.66);
  }

  42% {
    opacity: 1;
    filter: blur(0.35px);
    box-shadow: 0 20px 28px rgba(0, 0, 0, 0.3);
    transform: translate(var(--deal-mid-x, 2rem), var(--deal-mid-y, -1.4rem)) rotate(var(--deal-mid-tilt, -3deg))
      rotateX(16deg) rotateY(7deg) scale(0.94);
  }

  72% {
    opacity: 1;
    filter: blur(0);
    transform: translate(-0.18rem, 0.12rem) rotate(-1.4deg) rotateX(0deg) rotateY(0deg) scale(1.03);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate(0, 0) rotate(0deg) rotateY(0deg) scale(1);
  }
}

.blackjack-game.player-won .player-area {
  animation: player-win-glow 1500ms ease both;
}

.win-effect {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
}

.win-effect span {
  padding: 0.45rem 1.1rem;
  color: var(--ink);
  background: linear-gradient(145deg, #fff7ba, var(--gold));
  border: 2px solid #fff1ac;
  border-radius: 999px;
  box-shadow: 0 16px 44px rgba(243, 199, 109, 0.34);
  font-size: clamp(2.4rem, 9vw, 5.5rem);
  font-weight: 900;
}

.win-effect::before,
.win-effect::after {
  content: "";
  position: absolute;
  width: min(36rem, 84vw);
  height: min(36rem, 84vw);
  background:
    radial-gradient(circle at 20% 25%, #ffe39d 0 0.35rem, transparent 0.38rem),
    radial-gradient(circle at 76% 18%, #ffffff 0 0.28rem, transparent 0.31rem),
    radial-gradient(circle at 82% 70%, #ff3152 0 0.36rem, transparent 0.39rem),
    radial-gradient(circle at 30% 78%, #ffe39d 0 0.3rem, transparent 0.33rem),
    radial-gradient(circle at 56% 52%, #ffffff 0 0.25rem, transparent 0.28rem);
}

.win-effect::after {
  transform: rotate(38deg);
}

.blackjack-game.player-won .win-effect {
  animation: win-pop 1900ms ease both;
}

@keyframes player-win-glow {
  0%,
  100% {
    box-shadow: none;
    transform: translateY(0);
  }

  36%,
  68% {
    box-shadow: 0 0 34px rgba(243, 199, 109, 0.46), inset 0 0 28px rgba(243, 199, 109, 0.14);
    transform: translateY(-0.15rem);
  }
}

@keyframes win-pop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  16%,
  74% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

.demo-widget {
  gap: 1rem;
  min-height: 5.6rem;
}

.demo-widget > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.demo-chip {
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 auto;
  background:
    linear-gradient(90deg, transparent 42%, #fff4cf 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, #fff4cf 42% 58%, transparent 58%),
    radial-gradient(circle, transparent 34%, #fff4cf 35% 43%, transparent 44%),
    var(--red-700);
  border: 5px solid #b98a37;
  border-radius: 50%;
}

.site-footer {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 4rem);
  color: var(--muted);
  background: #070405;
  border-top: 1px solid var(--line);
}

.site-footer span:first-child {
  color: var(--cream);
  font-weight: 800;
}

/* ── Lobby system ── */

.lobby-ui {
  display: grid;
  gap: 0.6rem;
}

.lobby-browse {
  display: grid;
  gap: 0.55rem;
}

.lobby-create-bar {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.lobby-bet-input {
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.28);
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  outline: none;
  -moz-appearance: textfield;
}

.lobby-bet-input::-webkit-outer-spin-button,
.lobby-bet-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.lobby-bet-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(243, 199, 109, 0.18);
}

.lobby-list {
  display: grid;
  gap: 0.35rem;
  max-height: 9rem;
  overflow-y: auto;
}

.lobby-empty {
  margin: 0.3rem 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.lobby-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 199, 109, 0.14);
  border-radius: 6px;
}

.lobby-item-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.lobby-item-host {
  color: var(--cream);
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-item-bet {
  color: var(--gold);
  font-weight: 900;
  font-size: 0.85rem;
  white-space: nowrap;
}

.lobby-item-commission {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.lobby-hosting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(243, 199, 109, 0.07);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
}

.lobby-hosting-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lobby-hosting-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.lobby-hosting-bet {
  color: var(--gold);
  font-size: 1.2rem;
  font-weight: 900;
}

.tbl-result-bar {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.65rem;
  padding: 0.9rem;
  background: rgba(18, 8, 10, 0.72);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.tbl-result-bar .bet-result {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.rematch-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.rematch-row .button {
  min-height: 2.4rem;
  padding: 0.45rem 1.2rem;
  font-size: 0.88rem;
}

.rematch-status {
  color: var(--muted);
  font-size: 0.82rem;
  flex: 1;
  min-width: 0;
  font-style: italic;
}

/* ── Games hub page ── */

.games-main {
  padding-top: 5rem;
}

.games-hero {
  padding: 3.5rem clamp(1rem, 5vw, 5rem) 2rem;
  text-align: center;
}

.games-hero-title {
  max-width: none;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.games-hero-copy {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 480px;
  margin: 0 auto;
}

.games-grid-section {
  padding: 2rem clamp(1rem, 5vw, 5rem) 6rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
  padding: 1.75rem;
  background: rgba(22, 3, 6, 0.82);
  border: 1px solid rgba(243, 199, 109, 0.28);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.game-card:hover {
  border-color: rgba(243, 199, 109, 0.5);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(243, 199, 109, 0.14);
}

.game-card-suit {
  font-size: 3.2rem;
  line-height: 1;
  color: var(--gold);
}

.game-card-body {
  display: grid;
  gap: 0.6rem;
}

.game-card-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--cream);
  line-height: 1;
}

.game-card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.game-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.game-pill {
  padding: 0.25rem 0.6rem;
  background: rgba(243, 199, 109, 0.1);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-card-cta {
  justify-self: start;
  min-height: 2.75rem;
}

.games-wallet-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.75rem clamp(1rem, 5vw, 5rem);
  background: rgba(10, 2, 4, 0.92);
  border-top: 1px solid rgba(243, 199, 109, 0.2);
  backdrop-filter: blur(12px);
}

.games-wallet-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto;
}

.games-wallet-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.games-wallet-label {
  color: var(--muted);
}

.games-wallet-sep {
  color: var(--muted);
  opacity: 0.5;
}

/* ── New table-integrated layout ── */

.tbl-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(243, 199, 109, 0.18);
  border-radius: 8px;
}

.tbl-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tbl-head-mode {
  display: flex;
  align-items: center;
}

.tbl-head-mode .mode-options {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(6rem, 1fr));
  padding: 0.2rem;
  border-radius: 999px;
}

.tbl-head-mode .mode-option {
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.tbl-head-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tbl-acct-name {
  color: var(--cream);
  font-weight: 800;
  font-size: 0.88rem;
}

.tbl-acct-bal {
  color: var(--gold);
  font-weight: 800;
  font-size: 0.88rem;
  padding: 0.25rem 0.55rem;
  background: rgba(243, 199, 109, 0.1);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 999px;
}

.tbl-sm-btn {
  min-height: 2rem !important;
  padding: 0.3rem 0.75rem !important;
  font-size: 0.8rem !important;
}

.tbl-mode-msg {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.tbl-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tbl-opp-display {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.tbl-opp-display span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tbl-opp-display strong {
  color: var(--gold);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 800;
}

.tbl-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(243, 199, 109, 0.15);
  border-radius: 8px;
}

.tbl-controls .game-status {
  flex: 1;
  min-width: 0;
  min-height: auto;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 0.9rem;
}

.tbl-btns {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav a {
    flex: 1;
    text-align: center;
  }

  .hero {
    min-height: 72vh;
    padding-top: 9rem;
  }

  .demo-widget {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-account-strip {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-monitor-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-search-form {
    max-width: 100%;
    width: 100%;
  }

  .mode-panel,
  .mode-options {
    grid-template-columns: 1fr;
  }

  .mode-options {
    width: 100%;
    border-radius: 8px;
  }

  .table-bet-row {
    grid-template-columns: 1fr;
  }

  .bet-options {
    grid-template-columns: 1fr;
  }

  .account-grid,
  .owner-transfer,
  .match-card,
  .stats-grid,
  .monitor-grid {
    grid-template-columns: 1fr;
  }

  .owner-dashboard-head,
  .activity-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .owner-dashboard-head {
    flex-direction: column;
  }

  .auth-actions {
    grid-template-columns: 1fr;
  }

  /* Table header: collapse to rows */
  .tbl-head {
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.6rem;
  }

  .tbl-head-left {
    order: 1;
    width: 100%;
    justify-content: space-between;
  }

  .tbl-head-mode {
    order: 2;
    width: 100%;
  }

  .tbl-head-mode .mode-options {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    border-radius: 8px;
  }

  .tbl-head-right {
    order: 3;
    width: 100%;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  /* Lobby create: stack input + buttons on medium screens */
  .lobby-create-bar {
    flex-wrap: wrap;
  }

  .lobby-create-bar .lobby-bet-input {
    flex-basis: 100%;
  }

  /* Controls row */
  .tbl-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .tbl-btns {
    justify-content: stretch;
    gap: 0.4rem;
  }

  .tbl-btns .button {
    flex: 1;
  }

  /* Result bar + rematch row */
  .tbl-result-bar {
    padding: 0.7rem;
  }

  .rematch-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .rematch-row .button {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .brand {
    max-width: 100%;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-copy {
    max-width: 21rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .bet-options {
    grid-template-columns: 1fr;
  }

  .blackjack-table {
    min-height: unset;
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .hand-area {
    min-height: 9rem;
    padding: 0.75rem;
  }

  .playing-card {
    width: 4.1rem;
    height: 5.8rem;
    padding: 0.45rem;
  }

  .playing-card strong {
    font-size: 1.6rem;
  }

  .tbl-acct-name {
    display: none;
  }

  .tbl-head-right {
    gap: 0.3rem;
  }

  .tbl-head-right .tbl-acct-bal {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
  }

  .tbl-sm-btn {
    padding: 0.3rem 0.55rem !important;
    font-size: 0.75rem !important;
  }

  .table-bet-panel {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .tbl-opp-display strong {
    font-size: 1rem;
  }

  .lobby-hosting {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .lobby-hosting .tbl-sm-btn {
    width: 100%;
    justify-content: center;
  }

  .bet-result {
    font-size: 0.82rem;
    padding: 0.6rem 0.7rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2FA + ACCOUNT SECURITY
═══════════════════════════════════════════════════════════════════════════ */

/* 2FA login overlay (appears in the login shell after password) */
.twofa-overlay {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(243,199,109,0.3);
  border-radius: 14px;
  padding: 2rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(6px);
}

.twofa-card {
  display: grid;
  gap: 0.85rem;
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
}

.twofa-card h3 { color: var(--gold); margin: 0; }

.twofa-desc {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.twofa-code-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-align: center;
  color: var(--cream);
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(243,199,109,0.35);
  border-radius: 10px;
  font-family: monospace;
  outline: none;
  box-sizing: border-box;
}

.twofa-code-input:focus { border-color: var(--gold); }

.twofa-msg {
  color: #f87171;
  font-size: 0.83rem;
  min-height: 1.2em;
  margin: 0;
}

.twofa-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Account Security panel */
.security-panel {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.security-heading {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.security-msg {
  color: var(--cream);
  font-size: 0.88rem;
  margin: 0 0 1rem;
  min-height: 1.2em;
}

.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.security-card {
  display: grid;
  gap: 0.75rem;
}

.security-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.security-card-head h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  color: var(--cream);
}

.security-sub {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.security-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  flex-shrink: 0;
}

.security-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 2FA setup area */
.twofa-setup-area {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.twofa-setup-intro {
  color: var(--muted);
  font-size: 0.83rem;
  margin: 0;
}

.twofa-qr-img {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 8px;
  margin: 0 auto;
  background: #fff;
  padding: 4px;
}

.twofa-manual-label {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}

.twofa-secret-code {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--gold);
  word-break: break-all;
  background: rgba(255,255,255,0.06);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

.twofa-confirm-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.twofa-confirm-row .twofa-code-input {
  flex: 1;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  min-height: 2.5rem;
}

@media (max-width: 700px) {
  .security-grid { grid-template-columns: 1fr; }
  .twofa-confirm-row { flex-direction: column; }
  .twofa-confirm-row .twofa-code-input { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   POKER
═══════════════════════════════════════════════════════════════════════════ */

.poker-main {
  display: grid;
  min-height: calc(100vh - 4rem);
}

/* Lobby */
.poker-lobby-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  width: 100%;
}

.poker-lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.poker-create-form {
  display: grid;
  gap: 0.75rem;
}

.poker-create-form select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.poker-hosting-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.poker-seat-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.poker-seat-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--cream);
}

.poker-seat-list li::before {
  content: "●";
  color: var(--gold);
  font-size: 0.55rem;
}

.poker-hosting-actions {
  display: flex;
  gap: 0.65rem;
}

.poker-browse-card .monitor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.poker-browse-card .monitor-card-head h3 {
  margin: 0;
}

.poker-lobby-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}

.poker-lobby-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.poker-lobby-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.poker-lobby-item-info {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.poker-lobby-item-host {
  font-weight: 700;
  color: var(--cream);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-lobby-item-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

/* Table */
.poker-table-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 2rem;
}

.poker-table {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  gap: 0.75rem;
}

.poker-tbl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 1rem;
  flex-wrap: wrap;
}

.poker-tbl-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.poker-phase-badge {
  padding: 0.25rem 0.6rem;
  background: rgba(243, 199, 109, 0.15);
  border: 1px solid rgba(243, 199, 109, 0.3);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.poker-tbl-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* Opponents */
.poker-opponents {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  min-height: 8rem;
}

.poker-opponent-seat {
  display: grid;
  gap: 0.35rem;
  align-items: center;
  justify-items: center;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  min-width: 90px;
  transition: border-color 0.2s;
}

.poker-opponent-seat.is-turn {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(243, 199, 109, 0.25);
}

.poker-opponent-seat.is-folded {
  opacity: 0.4;
}

.poker-opponent-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cream);
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-opponent-chips {
  font-size: 0.72rem;
  color: var(--gold);
}

.poker-opponent-bet {
  font-size: 0.7rem;
  color: var(--muted);
}

.poker-opponent-cards {
  display: flex;
  gap: 4px;
}

.poker-opponent-hand-name {
  font-size: 0.7rem;
  color: var(--gold);
  text-align: center;
  font-weight: 700;
}

/* Community cards area */
.poker-center {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 0.75rem;
  background: rgba(0, 80, 0, 0.12);
  border: 1px solid rgba(0, 180, 0, 0.12);
  border-radius: 12px;
}

.poker-community-wrap {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.poker-community {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.poker-pot-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poker-pot-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.poker-pot-amount {
  color: var(--gold);
  font-size: 1.1rem;
}

.poker-blind-info {
  color: var(--muted);
  font-size: 0.75rem;
}

.poker-turn-msg {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 1.4em;
  text-align: center;
}

/* Poker cards */
.poker-card {
  width: 52px;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 7px;
  font-size: 1rem;
  font-weight: 900;
  color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  line-height: 1.1;
  cursor: default;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.poker-card.red { color: #c0392b; }

.poker-card .card-rank {
  font-size: 1.05rem;
  font-weight: 900;
}

.poker-card .card-suit {
  font-size: 1.2rem;
}

.poker-card.back {
  background: linear-gradient(135deg, #1a4a7a 25%, #0f2f50 100%);
  color: transparent;
}

.poker-card.back::after {
  content: "🂠";
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.3);
  position: absolute;
}

.poker-card-placeholder {
  width: 52px;
  height: 76px;
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.poker-card-sm {
  width: 34px;
  height: 50px;
  font-size: 0.7rem;
  border-radius: 5px;
}

.poker-card-sm .card-rank { font-size: 0.7rem; }
.poker-card-sm .card-suit { font-size: 0.85rem; }
.poker-card-sm.back::after { font-size: 1.3rem; }

/* My hand area */
.poker-my-area {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(243, 199, 109, 0.2);
  border-radius: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.poker-my-hand {
  display: flex;
  gap: 0.5rem;
}

.poker-my-info {
  display: grid;
  gap: 0.2rem;
}

.poker-my-name {
  font-weight: 700;
  color: var(--gold);
}

.poker-my-chips {
  font-size: 0.85rem;
  color: var(--cream);
}

.poker-my-bet {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Result bar */
.poker-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  flex-wrap: wrap;
}

.poker-result-msg {
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

/* Action bar */
.poker-action-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  flex-wrap: wrap;
}

.poker-raise-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poker-raise-input {
  width: 110px;
  min-height: 2.5rem;
  padding: 0.5rem 0.65rem;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 199, 109, 0.24);
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.poker-raise-input:focus {
  border-color: var(--gold);
}

.poker-action-msg {
  flex: 1;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Status */
.poker-status {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.35rem 0;
}

/* Win effect override */
.poker-win-effect {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* Dealer/blind badges on seats */
.poker-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.poker-badge-d { background: var(--gold); color: #1a1005; }
.poker-badge-sb { background: #3b82f6; color: #fff; }
.poker-badge-bb { background: #ef4444; color: #fff; }

.button.danger {
  background: #b91c1c;
  color: #fff;
  border-color: #7f1d1d;
}

.button.danger:hover {
  background: #991b1b;
}

@media (max-width: 900px) {
  .poker-lobby-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .poker-card { width: 42px; height: 62px; font-size: 0.85rem; }
  .poker-card-placeholder { width: 42px; height: 62px; }
  .poker-action-bar { flex-direction: column; align-items: stretch; }
  .poker-raise-group { flex-direction: column; }
  .poker-raise-input { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RPS — Rock Paper Scissors
   ═══════════════════════════════════════════════════════════════════════════ */

.rps-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Lobby ─────────────────────────────────────────────────────────────────── */
.rps-lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 600px) {
  .rps-lobby-grid { grid-template-columns: 1fr; }
}

.rps-hosting-meta {
  color: var(--cream);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.rps-browse-card { min-height: 160px; }

.rps-lobby-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rps-lobby-empty {
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.rps-lobby-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  gap: 0.75rem;
}

.rps-lobby-info { display: flex; gap: 0.75rem; align-items: baseline; flex: 1; min-width: 0; }
.rps-lobby-host { font-weight: 700; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rps-lobby-stake { color: var(--gold); font-size: 0.85rem; font-weight: 700; white-space: nowrap; }

/* ── Arena ─────────────────────────────────────────────────────────────────── */
.rps-arena-section { position: relative; }

.rps-arena {
  background: var(--card-bg);
  border: 1px solid rgba(243,199,109,0.14);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 700px;
  margin: 2rem auto 0;
}

.rps-arena-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rps-arena-info { display: flex; align-items: center; gap: 0.5rem; }
.rps-arena-badge {
  background: rgba(243,199,109,0.12);
  color: var(--gold);
  border: 1px solid rgba(243,199,109,0.3);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.rps-arena-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--cream);
  flex-wrap: wrap;
}

/* ── Versus ──────────────────────────────────────────────────────────────── */
.rps-versus {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 1.25rem;
}

.rps-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
}

.rps-player-label {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
}

.rps-choice-display {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(243,199,109,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s;
}

.rps-player--me .rps-choice-display { border-color: rgba(243,199,109,0.4); }
.rps-player--opp .rps-choice-display { border-color: rgba(99,102,241,0.4); }

.rps-choice-icon {
  font-size: 2.5rem;
  line-height: 1;
  user-select: none;
}

.rps-player-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
}

.rps-vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.75rem;
  color: rgba(255,255,255,0.35);
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rps-pot-info {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* ── Timer ───────────────────────────────────────────────────────────────── */
.rps-timer-wrap {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rps-timer-bar {
  flex: 1;
  height: 6px;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.25s linear, background 0.3s;
}

.rps-timer-bar.rps-timer-urgent { background: #ef4444; }

.rps-timer-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cream);
  min-width: 2.5em;
  text-align: right;
}

/* ── Choice buttons ──────────────────────────────────────────────────────── */
.rps-choice-btns {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.rps-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.9rem 1.4rem;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(243,199,109,0.2);
  border-radius: 12px;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  min-width: 100px;
}

.rps-choice-btn:hover:not(:disabled) {
  background: rgba(243,199,109,0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.rps-choice-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.rps-choice-btn.chosen { border-color: var(--gold); background: rgba(243,199,109,0.18); }
.rps-choice-btn.unchosen { opacity: 0.35; }

.rps-btn-icon { font-size: 2rem; line-height: 1; }
.rps-btn-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }

/* ── Result ──────────────────────────────────────────────────────────────── */
.rps-result-bar {
  text-align: center;
  padding: 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.rps-result-msg {
  font-size: 1rem;
  color: var(--cream);
  margin: 0 0 0.75rem;
}

.result-sub { color: rgba(255,255,255,0.55); font-size: 0.85rem; }

.rps-result-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Status ──────────────────────────────────────────────────────────────── */
.rps-status {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin: 0.5rem 0 0;
}

/* ── Win effect ──────────────────────────────────────────────────────────── */
.rps-win-effect {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
