:root {
  --bg: #07110d;
  --panel: #101b16;
  --panel2: #15241e;
  --text: #ecfff6;
  --muted: #9fb7aa;
  --line: rgba(255,255,255,.12);
  --gold: #f2c14e;
  --green: #0f7b4a;
  --green2: #14a062;
  --red: #c0392b;
  --felt: #096b42;
  --felt2: #07472d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(20,160,98,.18), transparent 34%),
    linear-gradient(145deg, #030605, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

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

button,
.button {
  border: none;
  background: linear-gradient(180deg, var(--gold), #c99422);
  color: #241800;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-block;
}

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

button.danger {
  background: linear-gradient(180deg, #ff6b5d, var(--red));
  color: white;
}

input,
select {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 10px;
  width: 100%;
}

label {
  color: var(--muted);
  font-size: 13px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-card {
  width: min(460px, 92vw);
  background: rgba(16,27,22,.94);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

.login-card h1 {
  margin: 10px 0 4px;
  font-size: 34px;
}

.login-card form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.brand-chip,
.pill {
  background: rgba(242,193,78,.15);
  color: var(--gold);
  border: 1px solid rgba(242,193,78,.35);
  border-radius: 999px;
  padding: 7px 12px;
  display: inline-block;
  font-weight: 800;
  font-size: 12px;
}

.sub,
.muted,
.footer-note {
  color: var(--muted);
}

.disclaimer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.alert {
  background: rgba(242,193,78,.14);
  border: 1px solid rgba(242,193,78,.36);
  color: #ffe3a0;
  padding: 12px 14px;
  border-radius: 14px;
  margin: 12px 0;
}

.topbar {
  height: 68px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3,6,5,.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar nav {
  display: flex;
  gap: 12px;
}

.topbar nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}

.topbar nav a:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.page {
  width: min(1240px, 94vw);
  margin: 0 auto;
  padding: 28px 0 60px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-size: 40px;
}

.hero p {
  color: var(--muted);
}

.balance-card {
  background: linear-gradient(160deg, rgba(242,193,78,.18), rgba(255,255,255,.06));
  border: 1px solid rgba(242,193,78,.28);
  border-radius: 20px;
  padding: 18px;
  min-width: 210px;
}

.balance-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.balance-card strong {
  font-size: 26px;
}

.grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.panel,
.table-card {
  background: rgba(16,27,22,.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
}

.table-card h2,
.table-card h3,
.panel h2 {
  margin-top: 0;
}

.compact {
  padding: 16px;
}

.mini-table {
  height: 120px;
  display: grid;
  place-items: center;
}

.mini-felt {
  width: 210px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--felt), var(--felt2));
  border: 8px solid #4d2e13;
  box-shadow: inset 0 0 35px rgba(0,0,0,.4), 0 16px 30px rgba(0,0,0,.35);
}

.stack-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 8px;
  align-items: center;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.poker-stage {
  display: grid;
  place-items: center;
  margin: 28px 0;
}

.poker-table {
  position: relative;
  width: min(100%, 980px);
  height: 540px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.08), transparent 36%),
    radial-gradient(circle, var(--felt), var(--felt2));
  border: 18px solid #5a3618;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.55),
    0 35px 90px rgba(0,0,0,.48);
}

.center-area {
  position: absolute;
  inset: 35% 24%;
  display: grid;
  place-items: center;
  text-align: center;
}

.pot {
  color: #ffe3a0;
  font-size: 20px;
  margin-bottom: 14px;
}

.community,
.hole-cards {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card {
  width: 54px;
  height: 76px;
  border-radius: 9px;
  background: #f8f3e7;
  color: #151515;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(0,0,0,.34);
}

.card.back {
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), transparent),
    #1b4f8f;
  color: white;
}

.round-label {
  margin-top: 12px;
  color: var(--muted);
}

.seat {
  position: absolute;
  width: 150px;
  min-height: 96px;
  background: rgba(3,6,5,.74);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  padding: 10px;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

.seat strong,
.seat span {
  display: block;
}

.seat span {
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  width: 38px;
  height: 38px;
  margin: -28px auto 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), #b9821c);
  color: #201400;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 3px solid rgba(255,255,255,.2);
}

.seat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  margin-top: 8px;
}

.seat-form input {
  padding: 7px;
}

.seat-form button {
  padding: 7px 10px;
}

.seat-1 { left: 50%; top: 4%; }
.seat-2 { left: 78%; top: 13%; }
.seat-3 { left: 95%; top: 42%; }
.seat-4 { left: 84%; top: 78%; }
.seat-5 { left: 62%; top: 95%; }
.seat-6 { left: 38%; top: 95%; }
.seat-7 { left: 16%; top: 78%; }
.seat-8 { left: 5%; top: 42%; }
.seat-9 { left: 22%; top: 13%; }

.action-panel {
  background: rgba(16,27,22,.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .hero,
  .action-panel,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
  }

  .poker-table {
    height: 720px;
    border-radius: 80px;
  }

  .seat {
    width: 138px;
  }

  .center-area {
    inset: 38% 12%;
  }
}

.winner-banner {
  margin-top: 12px;
  background: rgba(242,193,78,.18);
  border: 1px solid rgba(242,193,78,.45);
  color: #ffe3a0;
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 360px;
}

.dealer-dot,
.blind-dot {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 10px;
  margin-left: 4px;
  padding: 0 5px;
  color: #201400;
  background: var(--gold);
}

.blind-dot {
  background: #9ee7c0;
}

.mini-cards {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}

.tiny-card {
  width: 34px;
  height: 46px;
  border-radius: 7px;
  background: #f8f3e7;
  color: #141414;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
}

.status-folded,
.status-allin,
.turn-badge {
  display: inline-block;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.status-folded {
  background: rgba(255,255,255,.12);
  color: #ddd;
}

.status-allin {
  background: rgba(192,57,43,.22);
  color: #ffb7b0;
}

.turn-badge {
  background: rgba(242,193,78,.22);
  color: #ffe3a0;
  border: 1px solid rgba(242,193,78,.5);
}

.raise-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.raise-form input {
  width: 100px;
}

.live-table-panel {
  margin-bottom: 22px;
}

.live-table-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.live-game-status {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.live-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.winner-line {
  color: #ffe3a0;
  font-weight: 800;
}

.inline-card {
  display: inline-grid;
  margin-right: 4px;
}

/* Better playing-card graphics */
.card,
.tiny-card {
  position: relative;
  background:
    linear-gradient(145deg, #ffffff, #e9e1d1);
  color: #111;
  border: 1px solid rgba(0,0,0,.18);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.55),
    0 10px 22px rgba(0,0,0,.35);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -1px;
}

.card {
  width: 64px;
  height: 90px;
  border-radius: 10px;
  font-size: 25px;
}

.tiny-card {
  width: 38px;
  height: 52px;
  border-radius: 7px;
  font-size: 14px;
}

.card.red-card,
.tiny-card.red-card {
  color: #c42032;
}

.card.black-card,
.tiny-card.black-card {
  color: #111;
}

.card.back,
.tiny-card.back {
  color: transparent;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.18) 0 10%, transparent 11%),
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.18) 0 4px,
      transparent 4px 8px
    ),
    linear-gradient(145deg, #174e9d, #082a5f);
  border: 2px solid rgba(255,255,255,.55);
}

.card.back::after,
.tiny-card.back::after {
  content: "PMB";
  position: absolute;
  inset: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 7px;
  color: rgba(255,255,255,.85);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 7px;
  border: 1px solid rgba(0,0,0,.08);
  pointer-events: none;
}

.card-face-large {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.community {
  gap: 12px;
}

.hole-cards .card {
  transform: translateY(-3px);
}

.hole-cards .card:nth-child(2) {
  margin-left: -8px;
}

.inline-card {
  vertical-align: middle;
}

.sound-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sound-toggle {
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
}

.sound-toggle.sound-on {
  background: linear-gradient(180deg, var(--gold), #c99422);
  color: #241800;
}

.chat-panel {
  margin-top: 24px;
}

.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chat-head h2 {
  margin-bottom: 4px;
}

.chat-messages {
  height: 220px;
  overflow-y: auto;
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
}

.chat-row {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.chat-row:last-child {
  border-bottom: none;
}

.chat-meta {
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 4px;
}

.chat-meta span {
  color: var(--muted);
}

.chat-text {
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.chat-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-form input {
  min-width: 0;
}

.chat-notice {
  color: #ffb7b0;
  background: rgba(192,57,43,.18);
  border: 1px solid rgba(192,57,43,.35);
  border-radius: 12px;
  margin: 6px 0;
}

.hand-log-panel {
  margin-top: 24px;
}

.hand-log-box {
  margin-top: 14px;
  max-height: 230px;
  overflow-y: auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
}

.hand-log-row {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 12px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.hand-log-row:last-child {
  border-bottom: none;
}

.hand-log-time {
  color: var(--muted);
  font-size: 12px;
}

.hand-log-text {
  color: var(--text);
  font-weight: 700;
}

.live-hand-log {
  margin: 10px 0 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  line-height: 1.55;
}

.replay-board-panel {
  margin-bottom: 22px;
}

.replay-community {
  margin-top: 12px;
  justify-content: flex-start;
}

.replay-winner {
  margin-top: 18px;
}

.replay-player-grid {
  margin-top: 14px;
}

.replay-player-card h3 {
  margin-bottom: 12px;
}

.replay-hole-cards {
  margin: 12px 0;
}

.replay-log-box {
  max-height: 420px;
}

.bot-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.bot-button-row form {
  margin: 0;
}

.turn-timer {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  width: 260px;
}

.turn-timer strong {
  font-size: 24px;
  color: var(--gold);
  margin: 0 4px;
}

.timer-bar {
  margin-top: 8px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green2), var(--gold));
  border-radius: 999px;
  transition: width .35s linear;
}

.table-settings-details {
  margin: 12px 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}

.table-settings-details summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 900;
}

.table-settings-form {
  margin-top: 12px;
}

.mini-admin-form {
  min-width: 190px;
  max-width: 240px;
}

.mini-admin-form input,
.mini-admin-form select {
  padding: 8px;
}

.mini-admin-form button {
  padding: 8px 10px;
}

.mini-note-form {
  min-width: 230px;
  max-width: 320px;
}

.danger-text {
  color: #ffb7b0;
  font-weight: 800;
}

.report-grid {
  margin-bottom: 24px;
}

.report-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
