/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #0b0f0b;
  --surface:      #111a11;
  --surface2:     #172017;
  --border:       #243324;
  --felt:         #0d2b12;
  --felt-mid:     #164a1d;
  --green:        #2d6a2d;
  --gold:         #c9a84c;
  --gold-light:   #e8c870;
  --gold-dim:     #8a7035;
  --text:         #e8e0cc;
  --text-muted:   #8a8270;
  --text-dim:     #4a4538;
  --red:          #c0392b;
  --card-white:   #f5f0e8;
  --card-back:    #1a3d1a;
  --card-back-accent: #2d6a2d;
  --radius:       8px;
  --radius-lg:    16px;
  --transition:   0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', 'Space Mono', 'Courier New', monospace;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
h1, h2, h3 { color: var(--text); line-height: 1.2; }
button { cursor: pointer; font-family: inherit; }

/* ─── Utility ────────────────────────────────────────────────────────────── */
.gold { color: var(--gold); }
.gold-light { color: var(--gold-light); }
.muted { color: var(--text-muted); }
.dimmer { color: var(--text-dim); }

/* ─── Auth Page ─────────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45,106,45,0.25) 0%, transparent 70%),
    var(--bg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, var(--border) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--border) 40px);
  opacity: 0.3;
  pointer-events: none;
}

.auth-brand {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--felt);
  border: 2px solid var(--gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.auth-logo-icon::before {
  content: '♦';
  color: var(--gold);
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px rgba(201,168,76,0.3);
}

.auth-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 40px 32px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 0 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.auth-tab:hover:not(.active) { color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form.hidden { display: none; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.form-input.error { border-color: var(--red); }

.form-error {
  font-size: 0.78rem;
  color: #e74c3c;
  margin-top: -8px;
}

.btn-primary {
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  color: #0b0f0b;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 24px;
  width: 100%;
  letter-spacing: 0.03em;
  transition: background var(--transition), transform 0.1s, box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 10px 16px;
  transition: border-color var(--transition), color var(--transition);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.balance-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 20px;
  font-size: 0.9rem;
}

.balance-display .coin { font-size: 1.2rem; }

/* ─── Lobby Page ─────────────────────────────────────────────────────────── */
.lobby-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.lobby-sidebar {
  width: 280px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
}

.sidebar-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--felt);
  border: 1px solid var(--gold);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gold);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 2px;
  border-bottom: 1px solid var(--border);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  letter-spacing: 0.02em;
}

.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--surface2); color: var(--gold); }
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; }

.online-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--green);
  color: var(--text);
  border-radius: 10px;
  padding: 1px 7px;
}

.player-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.player-list::-webkit-scrollbar { width: 4px; }
.player-list::-webkit-scrollbar-track { background: transparent; }
.player-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 2px;
}

.player-item:hover { background: var(--surface2); }
.player-item.online { }

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  border: 2px solid var(--green);
}

.player-item.online .player-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(201,168,76,0.4);
}

.player-info { flex: 1; min-width: 0; }
.player-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-gold {
  color: var(--gold);
  font-size: 0.8rem;
  white-space: nowrap;
}

.btn-challenge {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gold);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 4px 10px;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.btn-challenge:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
}

/* My Stats */
.my-stats {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

.my-stats-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.stat-value.gold { color: var(--gold); }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px 0;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover { color: var(--red); }

/* ─── Lobby Main ─────────────────────────────────────────────────────────── */
.lobby-main {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
}

.lobby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.lobby-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.lobby-title span { color: var(--gold); }

.lobby-actions { display: flex; gap: 12px; align-items: center; }

.btn-watch-ad {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-watch-ad:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-find-game {
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-find-game:hover {
  background: #3d8a3d;
  box-shadow: 0 4px 20px rgba(45,106,45,0.4);
}

/* Game table preview */
.lobby-welcome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.welcome-text h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.welcome-text p { color: var(--text-muted); font-size: 0.9rem; }

.welcome-table-preview {
  width: 200px;
  height: 120px;
  background: var(--felt);
  border-radius: var(--radius);
  border: 4px solid var(--felt-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.welcome-cards {
  display: flex;
  gap: -20px;
}

.welcome-cards .wc {
  width: 40px;
  height: 56px;
  background: var(--card-white);
  border-radius: 4px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: -15px;
  box-shadow: -2px 0 4px rgba(0,0,0,0.2);
}

.welcome-cards .wc:first-child { margin-left: 0; }

/* Recent Activity */
.section-title {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.activity-card .activity-player { color: var(--text); font-weight: 500; }
.activity-card .activity-winner { color: var(--gold); }

/* Challenge Notification Popup */
.challenge-popup {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  min-width: 280px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,168,76,0.2);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.challenge-popup-title {
  font-size: 0.78rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.challenge-popup-msg {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 16px;
}

.challenge-popup-msg strong { color: var(--gold); }

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

.btn-accept {
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  transition: background var(--transition);
  flex: 1;
}

.btn-accept:hover { background: #3d8a3d; }

.btn-decline {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 18px;
  transition: border-color var(--transition), color var(--transition);
  flex: 1;
}

.btn-decline:hover { border-color: var(--red); color: var(--red); }

/* ─── Game Room ──────────────────────────────────────────────────────────── */
.game-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(22,74,29,0.3) 0%, transparent 70%),
    var(--bg);
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.game-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
}

.game-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
}

.game-header-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
}

/* Turn indicator */
.turn-banner {
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.turn-banner.your-turn {
  background: rgba(45,106,45,0.3);
  color: #5dba5d;
  border-bottom: 1px solid rgba(45,106,45,0.3);
}

.turn-banner.opponent-turn {
  background: rgba(0,0,0,0.2);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* Game Table */
.game-table-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-table {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

/* Opponent zone */
.opponent-zone {
  grid-column: 1 / 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.opponent-info { text-align: center; min-width: 80px; }
.opponent-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.opponent-balance { font-size: 0.78rem; color: var(--gold); }

.opponent-cards-count {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-muted);
}

.opponent-card-back {
  width: 48px;
  height: 66px;
  background: var(--card-back);
  border: 2px solid var(--card-back-accent);
  border-radius: 6px;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(45,106,45,0.3) 5px, rgba(45,106,45,0.3) 6px),
    repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(45,106,45,0.3) 5px, rgba(45,106,45,0.3) 6px);
}

/* Player A captures (left) */
.captures-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.capture-zone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 100px;
}

.capture-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.capture-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}

.captured-cards-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 32px;
}

.mini-card {
  width: 24px;
  height: 32px;
  background: var(--card-white);
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  border: 1px solid #ccc;
}

/* Table pile (center) */
.table-pile {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.table-felt {
  width: 100%;
  max-width: 480px;
  min-height: 180px;
  background:
    radial-gradient(ellipse at center, var(--felt) 0%, #0a1f0a 100%);
  border: 6px solid var(--felt-mid);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  box-shadow:
    0 0 0 2px var(--border),
    inset 0 0 40px rgba(0,0,0,0.3),
    0 12px 40px rgba(0,0,0,0.5);
  position: relative;
}

.table-felt::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius-lg) - 6px);
  background: repeating-linear-gradient(
    45deg,
    transparent, transparent 20px,
    rgba(0,0,0,0.05) 20px, rgba(0,0,0,0.05) 21px
  );
  pointer-events: none;
}

.table-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Cards in hand (bottom) */
.hand-zone {
  grid-column: 1 / 4;
  grid-row: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hand-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hand-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hand-card {
  width: 64px;
  height: 90px;
  background: var(--card-white);
  border-radius: 8px;
  border: 2px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
}

.hand-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.hand-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.4), 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(-8px);
}

.hand-card .rank { font-size: 1.2rem; line-height: 1; margin-bottom: 2px; }
.hand-card .suit { font-size: 1.4rem; line-height: 1; }

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

/* Table cards (on the felt) */
.table-card {
  width: 52px;
  height: 72px;
  background: var(--card-white);
  border-radius: 6px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: default;
}

.table-card.red { color: #c0392b; }
.table-card.highlight-capture {
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px rgba(201,168,76,0.5);
  cursor: pointer;
}
.table-card.highlight-build {
  border: 2px solid #5dba5d;
  box-shadow: 0 0 12px rgba(93,186,93,0.5);
  cursor: pointer;
}
.table-card.selected {
  border: 2px solid var(--gold);
  background: #fffbe8;
}

/* Score Panel */
.score-panel {
  position: fixed;
  right: 24px;
  top: 80px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.score-panel-header {
  padding: 12px 16px;
  background: var(--surface2);
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

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

.score-row-label { color: var(--text-muted); }

.score-row-values {
  display: flex;
  gap: 12px;
  align-items: center;
}

.score-val {
  font-weight: 600;
  font-size: 0.82rem;
}

.score-val.you { color: var(--gold); }
.score-val.them { color: var(--text-muted); }
.score-badge {
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--gold);
  color: #0b0f0b;
  font-weight: 700;
}

.score-bonus {
  font-size: 0.72rem;
  color: #5dba5d;
  margin-left: 2px;
}

/* Game Over Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.game-over-modal {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 60px rgba(201,168,76,0.15), 0 24px 60px rgba(0,0,0,0.6);
  animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-crown {
  font-size: 3rem;
  margin-bottom: 8px;
}

.modal-result {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-result.win { color: var(--gold); }
.modal-result.loss { color: var(--text-muted); }

.modal-score {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.modal-award {
  background: rgba(201,168,76,0.1);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.modal-award-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.modal-award-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.modal-actions { display: flex; gap: 12px; }

.btn-play-again {
  flex: 1;
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 20px;
  transition: background var(--transition);
}

.btn-play-again:hover { background: #3d8a3d; }

.btn-lobby-return {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 12px 20px;
  transition: border-color var(--transition), color var(--transition);
}

.btn-lobby-return:hover { border-color: var(--text-muted); color: var(--text); }

/* Watch Ad Button */
.btn-watch-ad-game {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.btn-watch-ad-game:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Leaderboard Page ──────────────────────────────────────────────────── */
.leader-shell {
  min-height: 100vh;
  background: var(--bg);
  padding: 40px;
}

.leader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.leader-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.leader-title span { color: var(--gold); }

.leader-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.leader-tab {
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 20px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.leader-tab.active {
  background: var(--gold);
  color: #0b0f0b;
  font-weight: 600;
}

.leader-tab:hover:not(.active) { background: var(--surface2); color: var(--text); }

.leader-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
}

.leader-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.leader-board-title {
  padding: 16px 20px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.leader-row:last-child { border-bottom: none; }
.leader-row:hover { background: var(--surface2); }
.leader-row.highlight-you {
  background: rgba(201,168,76,0.08);
  border-left: 3px solid var(--gold);
}

.leader-rank {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  width: 24px;
  text-align: center;
}

.leader-row:nth-child(1) .leader-rank { color: var(--gold); }
.leader-row:nth-child(2) .leader-rank { color: #c0c0c0; }
.leader-row:nth-child(3) .leader-rank { color: #cd7f32; }

.leader-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.leader-row:nth-child(1) .leader-avatar { background: var(--gold); color: #0b0f0b; }
.leader-row:nth-child(2) .leader-avatar { background: #c0c0c0; color: #0b0f0b; }
.leader-row:nth-child(3) .leader-avatar { background: #cd7f32; color: #0b0f0b; }

.leader-name {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
}

.leader-value {
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 600;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .lobby-sidebar {
    width: 60px;
  }
  .sidebar-logo { display: none; }
  .sidebar-nav .nav-item span:not(.nav-icon) { display: none; }
  .online-count { display: none; }
  .player-info { display: none; }
  .player-gold { display: none; }
  .btn-challenge { display: none; }
  .my-stats { display: none; }

  .lobby-main { padding: 20px; }
  .lobby-welcome { flex-direction: column; }
  .lobby-header { flex-direction: column; gap: 16px; align-items: flex-start; }

  .game-table {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .opponent-zone { grid-column: 1; grid-row: 1; }
  .captures-left { display: none; }
  .table-pile { grid-column: 1; grid-row: 2; }
  .hand-zone { grid-column: 1; grid-row: 4; }

  .score-panel { position: static; width: 100%; margin-top: 16px; }

  .leader-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .auth-title { font-size: 1.5rem; }
  .leader-shell { padding: 20px; }
}

/* ─── NEW: Landing Page Enhancements ─────────────────────────────────── */

.auth-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.grid-suit {
  position: absolute;
  font-size: 120px;
  color: rgba(45, 106, 45, 0.06);
  font-family: 'Space Mono', monospace;
  user-select: none;
}

.grid-suit-1 { top: -20px; left: -20px; transform: rotate(-15deg); font-size: 180px; }
.grid-suit-2 { top: 20%; right: -40px; transform: rotate(25deg); font-size: 200px; color: rgba(201,168,76,0.04); }
.grid-suit-3 { bottom: 10%; left: 5%; transform: rotate(-10deg); font-size: 140px; color: rgba(192,57,43,0.04); }
.grid-suit-4 { bottom: -20px; right: 10%; transform: rotate(15deg); font-size: 160px; }
.grid-suit-5 { top: 50%; left: 40%; transform: rotate(5deg); font-size: 80px; color: rgba(201,168,76,0.06); }
.grid-suit-6 { top: 70%; left: 20%; transform: rotate(-20deg); font-size: 100px; color: rgba(45,106,45,0.05); }

.auth-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 48px;
}

.topbar-diamond {
  color: var(--gold);
  font-size: 1rem;
}

.topbar-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.auth-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 40px;
}

.brand-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: 'DM Mono', monospace;
}

.brand-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 5.5rem);
  line-height: 0.9;
  color: var(--gold);
  text-shadow: 0 0 60px rgba(201,168,76,0.2);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.brand-diamond-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-diamond {
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.6;
}

.brand-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px 28px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.08);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0 0 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.04em;
}

.auth-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.auth-tab:hover:not(.active) { color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form.hidden { display: none; }

.form-group { display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'DM Mono', monospace;
}

.form-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  padding: 13px 16px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input::placeholder { color: var(--text-dim); }
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.btn-primary {
  background: var(--gold);
  border: none;
  border-radius: var(--radius);
  color: #0b0f0b;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 15px 24px;
  width: 100%;
  letter-spacing: 0.03em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 20px rgba(201,168,76,0.3);
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 2px;
}

.form-error {
  font-size: 0.75rem;
  color: #e74c3c;
}

.auth-footer {
  margin-top: 28px;
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Lobby Enhancements ─────────────────────────────────────────────── */

.lobby-sidebar {
  width: 300px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.sidebar-brand-sub {
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.gold-balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 16px;
  padding: 10px 14px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  transition: background 0.2s;
}

.gold-balance-badge.coin-earned {
  animation: coinPulse 0.5s ease;
  background: rgba(201,168,76,0.2);
}

@keyframes coinPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.gold-badge-diamond { color: var(--gold); font-size: 1rem; }
.gold-badge-amount { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--gold); }
.gold-badge-label { font-size: 0.72rem; color: var(--text-muted); }

.sidebar-section-label {
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.player-list { flex: 1; overflow-y: auto; padding: 4px 8px; }

.player-empty {
  padding: 20px 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  transition: background 0.15s;
  margin-bottom: 2px;
}

.player-item:hover { background: var(--surface2); }
.player-item.is-me { background: rgba(201,168,76,0.05); }

.player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.player-avatar.online {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(201,168,76,0.3);
}

.player-info { flex: 1; min-width: 0; }

.player-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Space Mono', monospace;
}

.player-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.player-gold { color: var(--gold); font-size: 0.78rem; }
.player-games { color: var(--text-dim); }

.win-count { color: var(--gold) !important; }

.btn-challenge {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  padding: 5px 10px;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-challenge:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
}

/* Lobby main */
.lobby-title-wrap { flex: 1; }

.lobby-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
}

.lobby-actions { display: flex; gap: 12px; align-items: center; }

.btn-watch-ad-large {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-watch-ad-large:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ad-icon { color: var(--gold); }
.btn-ad-reward {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.btn-find-game {
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-find-game:hover {
  background: #3d8a3d;
  box-shadow: 0 4px 20px rgba(45,106,45,0.4);
}

.lobby-welcome {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  position: relative;
}

.welcome-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: 'DM Mono', monospace;
}

.welcome-text h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
}

.welcome-text p { color: var(--text-muted); font-size: 0.88rem; }

.welcome-table-preview {
  flex-shrink: 0;
  position: relative;
}

.welcome-table-inner {
  width: 160px;
  height: 100px;
  background: var(--felt);
  border: 4px solid var(--felt-mid);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.3);
  font-size: 1.8rem;
  font-weight: 700;
  position: relative;
}

.wt-spade { color: #1a1a1a; }
.wt-diamond { color: #c0392b; }
.wt-heart { color: #c0392b; }
.wt-club { color: #1a1a1a; }
.wt-label {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
  font-family: 'DM Mono', monospace;
}

/* Activity cards */
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.activity-players {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.activity-player {
  font-weight: 600;
  color: var(--text);
  font-size: 0.88rem;
  font-family: 'Space Mono', monospace;
}

.activity-vs {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.activity-result { display: flex; align-items: center; gap: 8px; }

.activity-winner {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.82rem;
}

.activity-score {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: auto;
}

/* Challenge sent popup */
.challenge-sent-popup {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1001;
  background: var(--surface);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: slideIn 0.3s ease;
}

.cs-icon { color: var(--green); font-size: 1.1rem; }
.cs-text { font-size: 0.85rem; color: var(--text); }
.cs-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* Enhanced challenge popup */
.challenge-popup {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 0;
  min-width: 300px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.15);
  overflow: hidden;
}

.challenge-popup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(201,168,76,0.08);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.challenge-popup-icon { color: var(--gold); font-size: 1rem; }
.challenge-popup-title {
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'DM Mono', monospace;
}

.challenge-popup-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.challenge-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(201,168,76,0.3);
}

.challenge-info { flex: 1; }
.challenge-player {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Syne', sans-serif;
}
.challenge-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.challenge-stakes {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(201,168,76,0.05);
  border-top: 1px solid var(--border);
}

.stakes-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stakes-amount { font-size: 0.85rem; color: var(--gold); font-weight: 600; font-family: 'Space Mono', monospace; }

.challenge-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px 16px;
}

.btn-accept {
  flex: 1;
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px;
  transition: background 0.2s;
}

.btn-accept:hover { background: #3d8a3d; }

.btn-decline {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  padding: 10px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-decline:hover { border-color: var(--red); color: var(--red); }

/* ─── Game Room Enhancements ─────────────────────────────────────────── */

.ghb-diamond {
  width: 28px;
  height: 28px;
  background: var(--felt);
  border: 1px solid var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--gold);
}

.ghb-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.gold-balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 20px;
  transition: background 0.3s;
}

.gold-balance-chip.coin-earned {
  animation: coinPulse 0.5s ease;
  background: rgba(201,168,76,0.2);
}

.gbc-diamond { color: var(--gold); font-size: 0.9rem; }
.gbc-amount { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--gold); }

.btn-watch-ad-header {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-watch-ad-header:hover { border-color: var(--gold); color: var(--gold); }

.turn-banner {
  text-align: center;
  padding: 12px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
}

.turn-banner.your-turn {
  background: rgba(45,106,45,0.2);
  color: #5dba5d;
  border-bottom: 1px solid rgba(45,106,45,0.3);
}

.turn-banner.opponent-turn {
  background: rgba(0,0,0,0.15);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.turn-banner.game-over-banner {
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}

.game-table-area { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 0 24px 24px; }

.opponent-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.opponent-bar-left { display: flex; align-items: center; gap: 12px; }

.opp-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.opp-name { font-size: 0.95rem; font-weight: 700; color: var(--text); font-family: 'Syne', sans-serif; }
.opp-meta { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.opp-gold { font-size: 0.82rem; font-family: 'Space Mono', monospace; }
.opp-hand-count { font-size: 0.75rem; color: var(--text-dim); }

.opp-cards-preview { display: flex; gap: 6px; }
.opp-card-slot {
  width: 28px;
  height: 38px;
  background: var(--card-back);
  border: 1px solid var(--card-back-accent);
  border-radius: 4px;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(45,106,45,0.2) 4px, rgba(45,106,45,0.2) 5px);
}

.table-layout { display: flex; gap: 16px; align-items: flex-start; }

.side-capture-zone { display: flex; flex-direction: column; gap: 10px; width: 160px; flex-shrink: 0; }

.capture-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.capture-panel.yours { border-color: rgba(45,106,45,0.3); }

.capture-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cp-label { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.cp-count {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold);
}

.capture-score-mini { margin-bottom: 6px; }

.cap-bonus {
  font-size: 0.68rem;
  font-family: 'DM Mono', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  display: inline-block;
}

.cap-bonus-10d { background: rgba(201,168,76,0.15); color: var(--gold); }
.cap-bonus-2s { background: rgba(93,186,93,0.15); color: #5dba5d; }
.cap-bonus-aces { background: rgba(192,57,43,0.1); color: #e74c3c; }

.captured-stack { display: flex; flex-wrap: wrap; gap: 3px; min-height: 28px; }
.captured-empty { font-size: 0.75rem; color: var(--text-dim); }

.mini-card {
  width: 22px;
  height: 30px;
  background: var(--card-white);
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  border: 1px solid #ccc;
}

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

.table-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.table-felt {
  width: 100%;
  max-width: 480px;
  min-height: 160px;
  background: radial-gradient(ellipse at center, var(--felt) 0%, #0a1f0a 100%);
  border: 5px solid var(--felt-mid);
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  box-shadow: 0 0 0 2px var(--border), inset 0 0 40px rgba(0,0,0,0.4), 0 12px 40px rgba(0,0,0,0.5);
}

.table-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.05em;
  padding-top: 6px;
}

.hand-zone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hand-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hand-label-text {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hand-hint { font-size: 0.72rem; color: var(--text-dim); }

.hand-cards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.hand-card {
  width: 68px;
  height: 96px;
  background: var(--card-white);
  border-radius: 10px;
  border: 2px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.hand-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.hand-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.4), 0 12px 30px rgba(0,0,0,0.5);
  transform: translateY(-10px);
}

.hand-card.red .card-rank,
.hand-card.red .card-suit { color: #c0392b; }

.card-rank { font-size: 1.3rem; font-weight: 700; color: #1a1a1a; line-height: 1; font-family: 'Space Mono', monospace; }
.card-suit { font-size: 1.5rem; line-height: 1; font-family: 'Space Mono', monospace; }

.table-card {
  width: 54px;
  height: 76px;
  background: var(--card-white);
  border-radius: 8px;
  border: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  font-family: 'Space Mono', monospace;
}

.table-card.red .card-rank,
.table-card.red .card-suit { color: #c0392b; }

.table-card.highlight-capture {
  border: 2px solid var(--gold);
  box-shadow: 0 0 16px rgba(201,168,76,0.5);
  cursor: pointer;
  animation: pulseCapture 1s ease infinite;
}

@keyframes pulseCapture {
  0%, 100% { box-shadow: 0 0 12px rgba(201,168,76,0.4); }
  50% { box-shadow: 0 0 20px rgba(201,168,76,0.7); }
}

.table-card.selected {
  border: 2px solid #5dba5d;
  background: #f0fff0;
  box-shadow: 0 0 12px rgba(93,186,93,0.5);
}

.hand-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-build {
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-build:hover { background: #3d8a3d; }

.btn-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-cancel:hover { border-color: var(--red); color: var(--red); }

.btn-pass {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.score-panel {
  position: fixed;
  right: 20px;
  top: 80px;
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 100;
}

.score-panel-header {
  padding: 10px 14px;
  background: var(--surface2);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.score-row:last-child { border-bottom: none; }
.score-row-wide { flex-direction: column; align-items: flex-start; gap: 2px; }

.score-row-label { color: var(--text-muted); font-family: 'DM Mono', monospace; font-size: 0.75rem; }

.score-row-values { display: flex; gap: 10px; align-items: center; }
.score-val { font-weight: 600; font-size: 0.8rem; }
.score-val.you { color: var(--gold); }
.score-val.them { color: var(--text-dim); }
.score-val.highlight { color: var(--gold); }

/* Game over modal */
.game-over-modal {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 80px rgba(201,168,76,0.2), 0 24px 60px rgba(0,0,0,0.7);
}

.modal-trophy { font-size: 3.5rem; margin-bottom: 8px; }
.modal-result { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; font-family: 'Syne', sans-serif; }
.modal-result.win { color: var(--gold); }
.modal-result.loss { color: var(--text-muted); }

.modal-breakdown { margin-bottom: 20px; }
.modal-score { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.modal-score strong { color: var(--text); }

.modal-score-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 10px;
}

.msd-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 14px;
  font-size: 0.78rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.msd-row:last-child { border-bottom: none; }
.msd-row span:first-child { color: var(--text-muted); }
.msd-row span:last-child { color: var(--gold); font-family: 'Space Mono', monospace; font-weight: 600; }

.modal-award {
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.modal-award-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.modal-award-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Syne', sans-serif;
}

.modal-actions { display: flex; gap: 12px; }

.btn-play-again {
  flex: 1;
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 20px;
  transition: background 0.2s;
}

.btn-play-again:hover { background: #3d8a3d; }

.btn-lobby-return {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  padding: 13px 20px;
  transition: all 0.2s;
}

.btn-lobby-return:hover { border-color: var(--text-muted); color: var(--text); }

/* ─── Leaderboard Enhancements ────────────────────────────────────────── */

.leader-title-wrap { flex: 1; }

.leader-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: 'DM Mono', monospace;
}

.your-rank-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(201,168,76,0.05);
}

.yrb-label { font-size: 0.65rem; letter-spacing: 0.15em; color: var(--text-dim); text-transform: uppercase; }
.yrb-rank { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--gold); }
.yrb-name { font-size: 0.88rem; color: var(--text); font-weight: 600; flex: 1; }
.yrb-value { font-family: 'Space Mono', monospace; font-weight: 700; }

.leader-board-title {
  padding: 14px 20px;
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.leader-row:last-child { border-bottom: none; }
.leader-row:hover { background: var(--surface2); }
.leader-row.highlight-you {
  background: rgba(201,168,76,0.07);
  border-left: 3px solid var(--gold);
}

.leader-rank { width: 28px; text-align: center; }

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
}

.rank-gold { background: var(--gold); color: #0b0f0b; }
.rank-silver { background: #c0c0c0; color: #0b0f0b; }
.rank-bronze { background: #cd7f32; color: #0b0f0b; }
.rank-num { font-size: 0.82rem; color: var(--text-dim); font-family: 'DM Mono', monospace; }

.leader-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.leader-avatar.top-1 { background: var(--gold); color: #0b0f0b; }
.leader-avatar.top-2 { background: #c0c0c0; color: #0b0f0b; }
.leader-avatar.top-3 { background: #cd7f32; color: #0b0f0b; }

.leader-name { flex: 1; font-size: 0.88rem; color: var(--text); }
.you-tag { color: var(--gold); font-size: 0.75rem; }

.tab-icon { font-size: 0.9rem; }

.leader-podium {
  margin-top: 40px;
  max-width: 900px;
}

.podium-title {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
  font-family: 'DM Mono', monospace;
}

.podium-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
}

.podium-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  min-width: 160px;
  position: relative;
}

.podium-card.podium-1 {
  border-color: rgba(201,168,76,0.4);
  background: rgba(201,168,76,0.05);
}

.podium-card.podium-me { border-color: var(--gold); background: rgba(201,168,76,0.08); }

.podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 auto 10px;
}

.podium-card.podium-1 .podium-avatar { background: var(--gold); color: #0b0f0b; border-color: var(--gold-light); }
.podium-card.podium-2 .podium-avatar { background: #c0c0c0; color: #0b0f0b; }
.podium-card.podium-3 .podium-avatar { background: #cd7f32; color: #0b0f0b; }

.podium-name { font-size: 0.88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; font-family: 'Space Mono', monospace; }
.podium-value { font-size: 1rem; font-weight: 700; font-family: 'Syne', sans-serif; }

.podium-crown {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
}

/* ─── Responsive Additions ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .score-panel { display: none; }
  .table-layout { flex-direction: column; }
  .side-capture-zone { flex-direction: row; width: 100%; }
  .capture-panel { flex: 1; }
  .side-capture-zone { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .lobby-sidebar {
    width: 64px;
    overflow: visible;
  }
  .sidebar-logo-icon { display: flex; justify-content: center; }
  .sidebar-logo-text { display: none; }
  .sidebar-section-label { display: none; }
  .player-info { display: none; }
  .player-gold { display: none; }
  .btn-challenge { display: none; }
  .my-stats { display: none; }
  .gold-balance-badge { margin: 4px; padding: 8px; justify-content: center; }
  .gold-badge-label { display: none; }
  .lobby-main { padding: 16px; }
  .lobby-welcome { padding: 20px; flex-direction: column; }
  .lobby-title { font-size: 1.4rem; }

  .opponent-bar { padding: 10px 14px; }
  .opp-cards-preview { display: none; }

  .game-table-area { padding: 0 12px 12px; }

  .podium-row { gap: 10px; }
  .podium-card { min-width: 100px; padding: 14px 16px; }

  .your-rank-banner { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .brand-title { font-size: 3rem; }
  .leader-shell { padding: 16px; }
  .leader-grid { gap: 16px; }
  .challenge-popup { right: 12px; left: 12px; min-width: unset; }
  .hand-card { width: 58px; height: 80px; }
  .table-card { width: 46px; height: 64px; }
  .table-felt { padding: 14px; min-height: 120px; }
}

/* ─── Card Back (face-down opponent cards) ─────────────────────────────── */
.card-back {
  background: var(--card-back);
  border: 2px solid var(--card-back-accent);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-back::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(45,106,45,0.15) 5px,
    rgba(45,106,45,0.15) 10px
  );
}

.card-back::after {
  content: '♦';
  font-size: 1rem;
  color: rgba(201,168,76,0.5);
  position: relative;
  z-index: 1;
}

.opp-card-slot {
  width: 46px;
  height: 64px;
  background: var(--card-back);
  border: 2px solid var(--card-back-accent);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.opp-card-slot::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 4px,
    rgba(45,106,45,0.12) 4px,
    rgba(45,106,45,0.12) 8px
  );
}

.opp-card-slot::after {
  content: '♦';
  font-size: 0.85rem;
  color: rgba(201,168,76,0.4);
  position: relative;
  z-index: 1;
}

.opp-card-slot:hover { transform: translateY(-3px); }

/* ─── Game Over Modal Enhancements ────────────────────────────────────── */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.btn-play-again {
  background: var(--gold);
  color: #0b0f0b;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-play-again:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-lobby-return {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-lobby-return:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.modal-trophy { font-size: 3.5rem; line-height: 1; margin-bottom: 8px; }
.modal-result { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; font-family: 'Syne', sans-serif; }
.modal-result.win { color: var(--gold); }
.modal-result.loss { color: var(--text-dim); }

.modal-award {
  margin: 20px 0;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 16px;
}

.modal-award-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.modal-award-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  font-family: 'Syne', sans-serif;
}

.modal-score-details { margin-top: 10px; }
.msd-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.msd-row:last-child { border-bottom: none; }
.msd-row span:first-child { color: var(--text-muted); }
.msd-row span:last-child { color: var(--text); font-weight: 600; }

/* ─── Gold Coin Earned Animation ──────────────────────────────────────── */
@keyframes coinEarned {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); background: var(--gold); }
  100% { transform: scale(1); }
}

.coin-earned {
  animation: coinEarned 0.6s ease forwards;
}

/* ─── Turn Banner Animations ──────────────────────────────────────────── */
.turn-banner.your-turn {
  background: linear-gradient(90deg, rgba(45,106,45,0.3) 0%, rgba(201,168,76,0.15) 100%);
  border: 1px solid rgba(201,168,76,0.4);
  animation: bannerPulse 2s ease infinite;
}

@keyframes bannerPulse {
  0%, 100% { border-color: rgba(201,168,76,0.3); }
  50% { border-color: rgba(201,168,76,0.7); }
}

.turn-banner.opponent-turn {
  background: rgba(23,32,23,0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.turn-banner.game-over-banner {
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
}

/* ─── Challenge Popup Animations ─────────────────────────────────────── */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(20px) scale(0.95); }
}

.challenge-popup {
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.challenge-popup-accept {
  animation: coinEarned 0.4s ease forwards;
}

/* ─── Table Felt Enhancements ─────────────────────────────────────────── */
.table-felt {
  background: radial-gradient(ellipse at center, var(--felt-mid) 0%, var(--felt) 70%);
  border: 3px solid var(--green);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(45,106,45,0.3), inset 0 0 30px rgba(0,0,0,0.4);
  position: relative;
}

.table-felt::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(45,106,45,0.3);
  border-radius: 10px;
  pointer-events: none;
}

/* ─── Mobile Game Room Overrides ─────────────────────────────────────── */
@media (max-width: 768px) {
  .game-shell { flex-direction: column; }
  .score-panel { display: none; }

  .game-header { padding: 10px 12px; }
  .game-header-brand { display: none; }
  .game-header-right { width: 100%; justify-content: flex-end; }

  .table-layout {
    flex-direction: column;
    gap: 8px;
  }

  .side-capture-zone {
    flex-direction: row;
    width: 100%;
    gap: 8px;
  }

  .side-capture-zone .capture-panel {
    flex: 1;
    min-height: 100px;
  }

  .hand-zone { padding: 12px; }
  .hand-cards {
    justify-content: center;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 8px;
  }

  .hand-card {
    width: 58px;
    height: 80px;
    flex-shrink: 0;
  }

  .table-center { padding: 0 8px; }

  .table-felt {
    padding: 12px 8px;
    min-height: 110px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  .table-card {
    width: 46px;
    height: 64px;
    flex-shrink: 0;
  }

  .opponent-bar { padding: 10px 12px; }
  .opp-cards-preview { display: none; }

  .turn-banner { font-size: 0.85rem; padding: 10px 12px; }
}

@media (max-width: 480px) {
  .game-shell { padding: 0; }

  .game-header {
    padding: 8px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .game-header-brand { display: none; }
  .gold-balance-chip { padding: 6px 10px; font-size: 0.82rem; }
  .btn-watch-ad-header { padding: 6px 10px; font-size: 0.78rem; }
  .btn-ghost { padding: 6px 10px; font-size: 0.75rem; }

  .hand-card { width: 52px; height: 74px; }
  .table-card { width: 42px; height: 58px; }

  .side-capture-zone .capture-panel { min-height: 80px; }
  .captured-stack { padding: 6px 8px; min-height: 60px; }
  .capture-panel-header { padding: 8px 10px; }
}

/* ─── Hand Cards Hover on Mobile ──────────────────────────────────────── */
@media (hover: none) {
  .hand-card:hover {
    transform: none;
    border-color: inherit;
    box-shadow: none;
  }

  .hand-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.4);
    transform: translateY(-6px);
  }

  .table-card.highlight-capture {
    animation: pulseCaptureMobile 1.2s ease infinite;
  }
}

@keyframes pulseCaptureMobile {
  0%, 100% { border-color: var(--gold); box-shadow: 0 0 10px rgba(201,168,76,0.4); }
  50% { border-color: var(--gold-light); box-shadow: 0 0 20px rgba(201,168,76,0.7); }
}

/* ─── Leaderboard Mobile Fixes ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .leader-podium { padding: 20px 16px; }
  .podium-row { gap: 8px; }
  .podium-card { min-width: 100px; padding: 12px 14px; }
  .podium-card.podium-1 { min-width: 110px; }
}

@media (max-width: 480px) {
  .leader-header { flex-wrap: wrap; }
  .leader-grid { grid-template-columns: 1fr; }
  .leader-board-title { font-size: 0.75rem; padding: 8px 12px; }
}

/* ─── Auth Page Mobile Fixes ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-topbar { font-size: 0.6rem; letter-spacing: 0.12em; }
  .brand-eyebrow { font-size: 0.65rem; letter-spacing: 0.14em; }
  .brand-title { font-size: 2.5rem; line-height: 1; }
  .auth-card { padding: 20px 16px; }
  .auth-tabs { gap: 0; }
  .auth-tab { padding: 10px 14px; font-size: 0.82rem; }
  .auth-footer { font-size: 0.65rem; }
}

/* ─── Ambient Glow Effect on Active Elements ──────────────────────────── */
.hand-card.selected {
  box-shadow: 0 0 0 3px rgba(201,168,76,0.5), 0 12px 30px rgba(0,0,0,0.5), 0 0 20px rgba(201,168,76,0.2);
}

/* ─── Opponent Bar Sticky on Mobile ───────────────────────────────────── */
@media (max-width: 768px) {
  .opponent-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
}

/* ─── Toast Notifications for Gold Earned ─────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(30px); }
}

.toast {
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem;
  font-family: 'Space Mono', monospace;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 20px rgba(201,168,76,0.15);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  color: var(--text);
}

.toast.gold {
  color: var(--gold);
  font-weight: 600;
}