/* SDR Goldgräber (Eureka) Frontier Theme & Board Styles */

:root {
  --sdr-gold: #f59e0b;
  --sdr-gold-glow: rgba(245, 158, 11, 0.4);
  --sdr-teal: #14b8a6;
  --sdr-teal-glow: rgba(20, 184, 166, 0.4);
  --sdr-dark-bg: #0b1118;
  --sdr-card-bg: rgba(17, 24, 39, 0.85);
  --sdr-border: rgba(245, 158, 11, 0.25);
  --sdr-crimson: #ef4444;
  --sdr-lake-blue: #0284c7;
  --sdr-wilderness: #292524;
  --sdr-track-iron: #78716c;
}

/* -------------------------------------------------------------------------- */
/* Container & Layout                                                         */
/* -------------------------------------------------------------------------- */

.goldgraber-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
  color: #f3f4f6;
  font-family: 'Inter', system-ui, sans-serif;
}

/* Saloon Header Bar */
.goldgraber-header {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--sdr-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.goldgraber-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.goldgraber-header-gap {
  height: 0.85rem;
  width: 100%;
}

.goldgraber-header-pills {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}

.saloon-create-table-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.25rem 0 1.5rem 0;
}

.saloon-create-table-cta .goldgraber-btn {
  padding: 0.75rem 2.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.saloon-create-table-cta .goldgraber-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.55);
}

.goldgraber-title-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.goldgraber-logo-badge {
  width: 48px;
  height: 48px;
  background: rgba(224, 51, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(163, 104, 254, 0.35);
  padding: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.goldgraber-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.goldgraber-logo-badge:hover .goldgraber-logo-img {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 4px 10px rgba(224, 51, 255, 0.7));
}

.goldgraber-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.goldgraber-subtitle {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 2px;
}

/* User Vault & Outlaw Ticker */
.goldgraber-vault-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
  transition: all 0.2s ease;
}

.vault-val-badge {
  font-size: 0.85rem;
  font-weight: 800;
  font-family: 'Fira Code', monospace;
  color: #fbbf24;
}

.outlaw-jackpot-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2), rgba(185, 28, 28, 0.3));
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  animation: pulse-outlaw 2.5s infinite;
  margin-left: auto;
}

@keyframes pulse-outlaw {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.4); }
}

/* Compact Pill Action Buttons */
.goldgraber-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  line-height: 1;
}

.goldgraber-pill-btn:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.goldgraber-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.goldgraber-pill-btn-deposit {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

.goldgraber-pill-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.goldgraber-pill-btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* How It Works / Overview Banner inside Saloon Card */
.goldgraber-overview-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  backdrop-filter: blur(8px);
}

.overview-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-icon {
  font-size: 1.4rem;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content {
  display: flex;
  flex-direction: column;
}

.step-content strong {
  font-size: 0.82rem;
  color: #f8fafc;
  font-weight: 700;
}

.step-content span {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* -------------------------------------------------------------------------- */
/* Lobby & Saloon Browser View                                                */
/* -------------------------------------------------------------------------- */

.saloon-lobby-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.saloon-tables-card {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--sdr-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.saloon-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.goldgraber-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1118;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--sdr-gold-glow);
}

.goldgraber-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.goldgraber-btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.goldgraber-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

.goldgraber-btn:disabled,
.goldgraber-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
  transform: none !important;
}

.saloon-tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.saloon-table-card {
  background: var(--sdr-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

.saloon-table-card:hover {
  border-color: var(--sdr-gold);
  transform: translateY(-3px);
}

.table-badge-waiting,
.table-badge-active,
.table-badge-concluded,
.table-badge-participant,
.table-badge-practice {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.table-badge-waiting {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.table-badge-active {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.table-badge-concluded {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.table-badge-participant {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.table-badge-practice {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* -------------------------------------------------------------------------- */
/* Welcome Bonus Promo Banner                                                 */
/* -------------------------------------------------------------------------- */

.welcome-bonus-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(15, 23, 42, 0.65) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.welcome-bonus-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.welcome-bonus-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.welcome-bonus-text {
  font-size: 0.84rem;
  color: #e2e8f0;
}

/* -------------------------------------------------------------------------- */
/* Live Game Arena Stage (Hex Grid + HUD Controls)                            */
/* -------------------------------------------------------------------------- */

.game-arena-view {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.25rem;
  min-height: 700px;
}

@media (max-width: 1024px) {
  .game-arena-view {
    grid-template-columns: 1fr;
  }
}

/* Hex Board Stage */
.board-stage-wrapper {
  background: radial-gradient(circle at center, #1e293b 0%, #0b1118 80%);
  border: 1px solid var(--sdr-border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.board-top-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  z-index: 10;
}

.turn-countdown-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.turn-countdown-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transition: width 1s linear, background-color 0.3s;
}

.turn-countdown-fill.warning {
  background: #ef4444 !important;
  animation: flash-warning 0.5s infinite;
}

@keyframes flash-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* SVG Hex Board */
.hex-board-svg-container {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 600px;
  cursor: grab;
}

.hex-board-svg-container:active {
  cursor: grabbing;
}

/* Hex Cell Styling in SVG */
.hex-cell {
  transition: all 0.2s ease;
  cursor: pointer;
}

.hex-cell:hover {
  filter: brightness(1.2);
}

.hex-cell.reachable {
  stroke: #fbbf24 !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
  animation: pulse-reachable 1.5s infinite;
}

@keyframes pulse-reachable {
  0%, 100% { stroke-opacity: 1; }
  50% { stroke-opacity: 0.4; }
}

.hex-cell.selected-path {
  fill: rgba(245, 158, 11, 0.35) !important;
  stroke: #f59e0b !important;
  stroke-width: 4px !important;
  transition: all 0.2s ease;
}

/* Locked previous steps in path (cannot be canceled directly while later steps exist) */
.hex-cell.selected-path.path-locked {
  fill: rgba(245, 158, 11, 0.26) !important;
  stroke: #d97706 !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 5px rgba(217, 119, 6, 0.65));
  cursor: not-allowed;
}

.hex-cell.selected-path.path-locked:hover {
  filter: brightness(1.1) drop-shadow(0 0 8px rgba(245, 158, 11, 0.85));
}

/* Latest / active step in path (can be tapped/clicked to cancel/undo) */
.hex-cell.selected-path.path-undoable {
  fill: rgba(56, 189, 248, 0.35) !important;
  stroke: #38bdf8 !important;
  stroke-width: 4.5px !important;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9));
  animation: pulse-undoable 1.4s infinite;
  cursor: pointer;
}

.hex-cell.selected-path.path-undoable:hover {
  fill: rgba(239, 68, 68, 0.3) !important;
  stroke: #f87171 !important;
  filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.95));
}

@keyframes pulse-undoable {
  0%, 100% {
    stroke-opacity: 1;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9));
  }
  50% {
    stroke-opacity: 0.55;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.4));
  }
}

/* Directional Arrow & Overlay Elements in SVG */
.path-arrow-line {
  stroke: #38bdf8;
  stroke-width: 2.5px;
  stroke-dasharray: 4, 3;
  stroke-linecap: round;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.75));
}

.path-arrow-chevron {
  fill: #38bdf8;
  stroke: #0f172a;
  stroke-width: 1px;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

/* Railroad Track in SVG */
.railroad-line {
  fill: none !important;
  stroke: rgba(148, 163, 184, 0.45) !important;
  stroke-width: 2.5px !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.railroad-ties {
  fill: none !important;
  stroke: #78350f;
  stroke-width: 8px;
  stroke-dasharray: 2, 7;
  stroke-linecap: butt;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Event Toast Floating Over Board */
.game-toast-container {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  z-index: 50;
  pointer-events: none;
  max-width: 90%;
  width: 440px;
}

.game-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(245, 158, 11, 0.2);
  color: #f8fafc;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}

.game-toast.fade-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.game-toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.game-toast-body {
  display: flex;
  flex-direction: column;
}

.game-toast-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #fbbf24;
}

.game-toast-text {
  font-size: 0.78rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Train Locomotive Marker */
.locomotive-pawn {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Miner Avatar Pawns */
.miner-pawn {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* -------------------------------------------------------------------------- */
/* Right Stage: Game Controls & HUD                                           */
/* -------------------------------------------------------------------------- */

.game-hud-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* 3D Dice Component */
.dice-roller-box {
  background: var(--sdr-card-bg);
  border: 1px solid var(--sdr-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.dice-face-display {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 30% 30%, #334155, #0f172a);
  border: 2px solid var(--sdr-gold);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
  padding: 4px;
}

.dice-face-display.turn-active {
  border-color: #fbbf24;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.65), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: dice-turn-pulse 1.8s infinite;
}

@keyframes dice-turn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px rgba(251, 191, 36, 0.5); }
  50% { transform: scale(1.04); box-shadow: 0 0 24px rgba(251, 191, 36, 0.85); }
}

.dice-face-display.rolling {
  animation: dice-tumble 0.6s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

@keyframes dice-tumble {
  0% { transform: rotate(0deg) scale(0.9); }
  25% { transform: rotate(90deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(0.9); }
  75% { transform: rotate(270deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}

.dice-symbol {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 2px;
  font-weight: 900;
  color: #fbbf24;
}

.dice-caption {
  font-size: 0.7rem;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}

/* Perks Drawer */
.perks-drawer-card {
  background: var(--sdr-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.perks-inventory-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.perk-slot-badge {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.perk-slot-badge.active {
  border-style: solid;
  border-color: var(--sdr-teal);
  background: rgba(20, 184, 166, 0.15);
  color: #2dd4bf;
}

.perk-slot-badge:hover {
  transform: translateY(-2px);
  border-color: var(--sdr-gold);
}

/* Player Scoreboard Roster */
.roster-card {
  background: var(--sdr-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.roster-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.roster-player-row.active-turn {
  border-left: 4px solid var(--sdr-gold);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.1);
}

.roster-col-player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.roster-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.roster-player-name {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.roster-col-stats {
  display: grid;
  grid-template-columns: 56px 56px;
  gap: 0.6rem;
  align-items: center;
  flex-shrink: 0;
}

.roster-stat-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 700;
}

.roster-stat-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.roster-stat-val {
  min-width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.roster-stat-val.val-bag {
  color: #fbbf24;
}

.roster-stat-val.val-safe {
  color: #34d399;
}

/* Action Log / Chat */
.log-chat-card {
  background: var(--sdr-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.log-scroll-area {
  max-height: 180px;
  overflow-y: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chat-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: #f8fafc;
  font-size: 0.8rem;
}

/* Modals */
.goldgraber-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.goldgraber-modal-overlay.open {
  display: flex;
}

.goldgraber-modal-box {
  background: #111827;
  border: 1px solid var(--sdr-gold);
  border-radius: 16px;
  padding: 2rem;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

/* Wallet Connection Pill */
.goldgraber-wallet-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.2), rgba(13, 148, 136, 0.3));
  border: 1px solid rgba(45, 212, 191, 0.5);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5eead4;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.15);
  transition: all 0.2s ease;
}

.goldgraber-wallet-pill.disconnected {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.goldgraber-wallet-pill #goldgraber-user-addr {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Saloon Table Waiting Lounge */
.table-waiting-lounge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  min-height: 480px;
  text-align: center;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-radius: 12px;
  gap: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.waiting-lounge-header {
  max-width: 620px;
}

.waiting-room-code-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed #f59e0b;
  color: #f59e0b;
  font-family: 'Fira Code', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  letter-spacing: 2px;
  margin: 0.65rem 0;
}

.waiting-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: 640px;
  margin: 0.85rem 0;
}

.waiting-player-slot {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.waiting-player-slot.filled {
  border-color: rgba(52, 214, 198, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(13, 148, 136, 0.1) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.waiting-player-slot.empty {
  border-style: dashed;
  color: #64748b;
  background: rgba(15, 23, 42, 0.4);
}

/* How to Play Modal Tabs & Enhancements */
.how-to-play-tab-btn {
  transition: all 0.2s ease;
}

.how-to-play-tab-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}


/* Modal close button (previously provided by the legacy dashboard stylesheet) */
.goldgraber-modal-overlay .modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.goldgraber-modal-overlay .modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
