:root {
  --bg-deep: #06090f;
  --bg-main: #0b101b;
  --bg-card: #121a2b;
  --bg-card-hover: #182238;
  --border: #23304a;
  --border-gold: rgba(245, 197, 24, 0.35);
  --gold: #f5c518;
  --gold-dim: #c79a10;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #38bdf8;
  --purple: #a855f7;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(circle at top center, #121c30 0%, var(--bg-deep) 65%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
}

.hidden { display: none !important; }

/* ==================== BUTTONS & INPUTS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  color: var(--text);
  background: #1e293b;
  text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-gold {
  background: linear-gradient(135deg, #f5c518, #d49b0a);
  color: #0b0f17;
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.28);
}
.btn-green { background: linear-gradient(135deg, #22c55e, #15803d); color: #fff; }
.btn-red { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; }
.btn-blue { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #04131d; }
.btn-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }

.input, .select, .textarea {
  width: 100%;
  background: #080d17;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ==================== TOPBAR ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  border-radius: 9999px;
}
.auth-brand {
  display: flex;
  justify-content: center;
  cursor: default;
}
.brand:focus-visible {
  outline: 2px solid #8cb3ff;
  outline-offset: 4px;
}
.brand-emblem {
  --brand-stroke: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-inline-end: 14px;
  border: var(--brand-stroke) solid transparent;
  border-radius: 9999px;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.brand:hover .brand-emblem {
  transform: scale(1.02);
}
.brand:active .brand-emblem {
  transform: scale(0.98);
}
.auth-brand:hover .brand-emblem,
.auth-brand:active .brand-emblem {
  transform: none;
}
.brand-emblem-circle {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: var(--brand-stroke) solid transparent;
  margin-block: calc(-1 * var(--brand-stroke));
  margin-inline-start: calc(-1 * var(--brand-stroke));
  margin-inline-end: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  flex-shrink: 0;
}
.brand-emblem,
.brand-emblem-circle {
  background:
    linear-gradient(#05050d, #05050d) padding-box,
    linear-gradient(90deg, #ff004c 0%, #ffaa00 16.667%, #00ff66 33.333%, #00eaff 50%, #355cff 66.667%, #a600ff 83.333%, #ff004c 100%) border-box;
  background-size: 100% 100%, 300px 100%;
  background-repeat: no-repeat, repeat-x;
  background-position: 0 0, 0px 50%;
  animation: rainbowEmblemFlow 7.5s linear infinite;
  filter: drop-shadow(0 0 3px rgba(140, 179, 255, 0.4));
}
.brand-emblem-img-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #05050d;
}
.brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.brand-emblem-frame {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  flex-shrink: 0;
}
.brand-emblem-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f4f6fb;
  white-space: nowrap;
}
.brand-emblem-sub {
  font-weight: 400;
  color: var(--text-muted);
}
@keyframes rainbowEmblemFlow {
  0% {
    background-position: 0 0, 0px 50%;
  }
  100% {
    background-position: 0 0, 300px 50%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-emblem,
  .brand-emblem-circle {
    animation: none;
    background-position: 0 0, 0% 50%;
  }
  .brand-emblem {
    transform: none;
    transition: none;
  }
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
}
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.admin-tag {
  background: rgba(245, 197, 24, 0.2);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}

/* ==================== LANDINGPAGE & AUTH ==================== */
::selection {
  background: rgba(245, 197, 24, 0.28);
  color: #fff;
}

.btn:focus-visible,
.input:focus-visible,
.auth-tab:focus-visible,
.landing-nav-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 45% at 20% 0%, rgba(16, 185, 129, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 65% 40% at 85% 10%, rgba(245, 197, 24, 0.11) 0%, transparent 55%),
    var(--bg-deep);
}

.landing-nav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.18s cubic-bezier(0.23, 1, 0.32, 1), background 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}
.landing-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.landing-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  flex: 1;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px);
  gap: 44px;
  align-items: center;
  padding: 18px 0 42px;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.landing-h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 16px;
}

.landing-h1-gold {
  color: var(--gold);
}

.landing-lead {
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Live Tisch-Vorschau */
.landing-felt-preview {
  background: radial-gradient(circle at 30% 35%, #114c37 0%, #09291e 75%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-bottom: 22px;
  max-width: 490px;
}

.felt-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
}

.felt-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d1fae5;
}

.felt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.felt-payout {
  color: var(--gold);
  letter-spacing: 0.06em;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.felt-cards-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-card {
  width: 62px;
  height: 88px;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}

.preview-card-spade { transform: rotate(-4deg); }
.preview-card-gold {
  transform: rotate(4deg);
  color: #b91c1c;
}

.landing-felt-preview:hover .preview-card-spade { transform: rotate(-6deg) translateY(-2px); }
.landing-felt-preview:hover .preview-card-gold { transform: rotate(6deg) translateY(-2px); }

.pc-corner {
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}
.pc-corner small {
  display: block;
  font-size: 11px;
}
.pc-center {
  font-size: 24px;
  align-self: center;
  line-height: 1;
  margin-bottom: 6px;
}

.felt-score-pill {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(6, 9, 15, 0.62);
  border: 1px solid rgba(245, 197, 24, 0.42);
  border-radius: 12px;
  padding: 8px 14px;
}
.felt-score-num {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.05;
}
.felt-score-label {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.landing-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 6px;
}

.landing-stat {
  display: flex;
  flex-direction: column;
}
.landing-stat strong {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.landing-stat span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.auth-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

.auth-card-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.auth-card-head p {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 18px;
  background: #080c14;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.auth-tab {
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s cubic-bezier(0.23, 1, 0.32, 1), color 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}
.auth-tab.active {
  background: var(--gold);
  color: #0b0f17;
}
.error-box {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 12px;
}

.landing-section {
  margin-top: 52px;
}

.landing-section-head {
  margin-bottom: 20px;
}
.landing-section-head h2 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.landing-section-head p {
  font-size: 14px;
  color: var(--text-muted);
}

.landing-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bento-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  transition: border-color 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}
.bento-tile:hover {
  border-color: rgba(245, 197, 24, 0.35);
  transform: translateY(-2px);
}
.bento-wide {
  grid-column: span 2;
}
.bento-accent {
  background: linear-gradient(155deg, rgba(245, 197, 24, 0.11), var(--bg-card) 65%);
  border-color: rgba(245, 197, 24, 0.32);
}

.bento-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
  margin-bottom: 10px;
}
.bento-tile h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.bento-tile p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-rules-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.landing-rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.landing-rules-table th,
.landing-rules-table td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.landing-rules-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: rgba(8, 12, 20, 0.7);
}
.landing-rules-table tr:last-child td {
  border-bottom: none;
}

.rule-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.rule-gold {
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.landing-footer {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.landing-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.landing-footer a:hover {
  color: var(--gold);
}

@media (max-width: 920px) {
  .landing-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
  }
  .landing-bento {
    grid-template-columns: 1fr;
  }
  .bento-wide {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .landing-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-nav-link {
    display: none;
  }
  .landing-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-card,
  .bento-tile,
  .btn,
  .auth-tab {
    transition: none;
  }
}

/* ==================== LOBBY CONTAINER ==================== */
.lobby-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

.lobby-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.nav-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-tab:hover { color: var(--text); border-color: rgba(245, 197, 24, 0.4); }
.nav-tab.active {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.2), rgba(245, 197, 24, 0.08));
  border-color: var(--gold);
  color: var(--gold);
}

/* Partner Refill Alert Banner */
.partner-banner {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.16), rgba(34, 197, 94, 0.12));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 0 24px rgba(245, 197, 24, 0.15);
}

/* 7-Tage Daily Bonus Strip */
.daily-strip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.daily-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.daily-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.day-box {
  background: #090e18;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  position: relative;
}
.day-box.claimed {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.1);
}
.day-box.active-next {
  border-color: var(--gold);
  background: rgba(245, 197, 24, 0.14);
  box-shadow: 0 0 14px rgba(245, 197, 24, 0.2);
}
.day-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.day-amount { font-size: 14px; font-weight: 800; color: var(--gold); margin-top: 3px; }
.day-check { font-size: 11px; color: var(--green); margin-top: 2px; font-weight: 700; }

/* Cards Grid */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.16s, border-color 0.16s;
  position: relative;
  overflow: hidden;
}
.table-card:hover { transform: translateY(-2px); border-color: var(--border-gold); }
.table-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.table-card.theme-emerald::before { background: linear-gradient(90deg, #10b981, #047857); }
.table-card.theme-midnight::before { background: linear-gradient(90deg, #38bdf8, #1d4ed8); }
.table-card.theme-bordeaux::before { background: linear-gradient(90deg, #f43f5e, #881337); }
.table-card.theme-obsidian::before { background: linear-gradient(90deg, #f5c518, #92400e); }

.table-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.table-card h3 { font-size: 17px; font-weight: 800; }
.seat-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.stakes-row {
  display: flex;
  justify-content: space-between;
  background: #090e18;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 13px;
}

/* Private Room Bar */
.private-bar {
  margin-top: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.code-join-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Tournaments */
.tourney-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.tourney-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tourney-card.running { border-color: var(--green); box-shadow: 0 0 22px rgba(34, 197, 94, 0.16); }
.tourney-card.creator { border-color: var(--border-gold); }
.badge-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(245, 197, 24, 0.16);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}
.badge-pill.live {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.5);
}
.badge-pill.done {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border-color: var(--border);
}
.tourney-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12.5px;
}
.tourney-meta-item {
  background: #090e18;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.tourney-meta-item span { display: block; font-size: 10.5px; color: var(--text-dim); }
.tourney-meta-item strong { color: var(--text); font-size: 13.5px; }

/* ==================== BLACKJACK GAME VIEW ==================== */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 16px;
  max-width: 1460px;
  margin: 0 auto;
  padding: 14px 16px 30px;
  min-height: calc(100vh - 66px);
}

.felt-wrapper {
  border-radius: 26px;
  padding: 12px;
  background: linear-gradient(145deg, #3b2314, #1b0f08 60%, #2e1b0f);
  border: 3px solid #6b4423;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.75), 0 18px 45px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
}

.felt-surface {
  flex: 1;
  border-radius: 18px;
  padding: 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 620px;
  border: 2px solid rgba(245, 197, 24, 0.22);
  overflow: hidden;
}
.felt-surface.theme-emerald {
  background: radial-gradient(ellipse at 50% 28%, #166534 0%, #0b3b1e 65%, #062111 100%);
}
.felt-surface.theme-midnight {
  background: radial-gradient(ellipse at 50% 28%, #1e3a8a 0%, #0f1f4d 65%, #071029 100%);
}
.felt-surface.theme-bordeaux {
  background: radial-gradient(ellipse at 50% 28%, #881337 0%, #4c091e 65%, #290410 100%);
}
.felt-surface.theme-obsidian {
  background: radial-gradient(ellipse at 50% 28%, #27272a 0%, #141418 65%, #09090b 100%);
}

.table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}
.table-title-pill {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(245, 197, 24, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.felt-inscription {
  text-align: center;
  color: rgba(245, 197, 24, 0.34);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin: 6px 0;
  user-select: none;
}

/* Dealer Area */
.dealer-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}
.score-badge {
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}
.score-badge.bj { border-color: var(--gold); color: var(--gold); }
.score-badge.bust { border-color: var(--red); color: #fca5a5; }

/* Playing Cards */
.cards-row {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 92px;
}
.playing-card {
  width: 64px;
  height: 92px;
  background: linear-gradient(160deg, #ffffff, #e2e8f0);
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px 7px;
  color: #0f172a;
  font-weight: 900;
  margin-left: -18px;
  animation: cardDeal 0.24s ease-out;
  position: relative;
  user-select: none;
}
.playing-card:first-child { margin-left: 0; }
.playing-card.red { color: #dc2626; }
.playing-card .card-top { font-size: 14px; line-height: 1; text-align: left; }
.playing-card .card-center { font-size: 26px; text-align: center; line-height: 1; }
.playing-card .card-bot { font-size: 13px; line-height: 1; text-align: right; transform: rotate(180deg); }

.playing-card.back {
  background: repeating-linear-gradient(
    45deg,
    #1e293b,
    #1e293b 6px,
    #0f172a 6px,
    #0f172a 12px
  );
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 24px;
}

@keyframes cardDeal {
  from { opacity: 0; transform: translateY(-18px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Seats Row */
.seats-grid {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.seat-box {
  background: rgba(0, 0, 0, 0.36);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 155px;
  max-width: 240px;
  flex: 1 1 165px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.seat-box.is-me { border-color: rgba(245, 197, 24, 0.45); }
.seat-box.active-turn {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(245, 197, 24, 0.38);
  background: rgba(245, 197, 24, 0.08);
}
.seat-box.eliminated { opacity: 0.48; filter: grayscale(0.7); }

.seat-name {
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-bottom: 3px;
}
.seat-chips { font-size: 12px; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.seat-bet-pill {
  display: inline-block;
  background: rgba(245, 197, 24, 0.18);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 800;
  margin-bottom: 6px;
}
.hand-wrapper {
  padding: 5px;
  border-radius: 10px;
  margin-top: 4px;
}
.hand-wrapper.active-hand {
  background: rgba(245, 197, 24, 0.14);
  outline: 1px dashed var(--gold);
}
.result-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
}
.result-pill.win, .result-pill.blackjack { background: rgba(34, 197, 94, 0.25); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.5); }
.result-pill.lose { background: rgba(239, 68, 68, 0.25); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.5); }
.result-pill.push { background: rgba(148, 163, 184, 0.25); color: #e2e8f0; border: 1px solid rgba(148, 163, 184, 0.45); }

/* Action / Bet Controls */
.controls-bar {
  background: rgba(7, 10, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.chip-rack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.casino-chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  font-weight: 900;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s;
}
.casino-chip:hover { transform: translateY(-3px) scale(1.05); }
.chip-10 { background: #2563eb; }
.chip-25 { background: #16a34a; }
.chip-50 { background: #ea580c; }
.chip-100 { background: #18181b; border-color: var(--gold); color: var(--gold); }
.chip-500 { background: #7e22ce; }
.chip-1000 { background: #b91c1c; border-color: var(--gold); }

.action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.timer-bar {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gold);
}

/* Right Sidebar (Chat + Tournament Standings) */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 96px);
}
.panel-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-box-header {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold);
}
.chat-box { flex: 1; min-height: 280px; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
}
.chat-msg.system { color: var(--text-muted); font-style: italic; font-size: 12px; }
.chat-sender { font-weight: 800; color: var(--gold); margin-right: 4px; }
.quick-chat {
  display: flex;
  gap: 5px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
.chat-form {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}

/* ==================== TABLES & ADMIN ==================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(35, 48, 74, 0.5);
  vertical-align: middle;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.section-card h2 {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.kpi-label { font-size: 11.5px; color: var(--text-muted); }
.kpi-value { font-size: 22px; font-weight: 900; color: var(--gold); margin-top: 4px; }

.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 18px;
}
.modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #162033;
  border: 1px solid var(--border-gold);
  color: var(--text);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: cardDeal 0.2s ease-out;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); color: #fecaca; }

@media (max-width: 980px) {
  .game-layout { grid-template-columns: 1fr; }
  .side-panel { max-height: 360px; }
  .daily-days-grid, .form-grid-7 { grid-template-columns: repeat(4, 1fr); }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}
