/**
 * Richup Monopoly - Complete Production Stylesheet
 * Dark, modern, glassmorphic UI matching richup.io aesthetic.
 */

:root {
  --bg-main: #090d16;
  --bg-card: #111726;
  --bg-surface: #182238;
  --bg-board: #0d1322;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
  --accent-red: #ef4444;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==============================================================================
   1. APP HEADER
   ============================================================================== */
.app-header {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-logo.large {
  font-size: 2rem;
  justify-content: center;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
}

.logo-text span {
  color: var(--accent-gold);
}

.logo-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.room-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-green);
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.6s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.header-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==============================================================================
   2. MAIN GAME CONTAINER & BOARD LAYOUT
   ============================================================================== */
.game-container {
  flex: 1;
  display: flex;
  padding: 16px;
  gap: 16px;
  height: calc(100vh - 60px);
}

.board-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Authentic 11x11 Grid Board */
.monopoly-board {
  width: min(84vh, 84vw);
  height: min(84vh, 84vw);
  background-color: var(--bg-board);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 1.4fr repeat(9, 1fr) 1.4fr;
  grid-template-rows: 1.4fr repeat(9, 1fr) 1.4fr;
  gap: 2px;
  padding: 4px;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Board Tiles */
.board-tile {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s ease;
}

.board-tile:hover {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.25);
  z-index: 10;
  transform: scale(1.02);
}

.board-tile.is-mortgaged::after {
  content: "MORTGAGED";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  color: var(--accent-red);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  transform: rotate(-25deg);
  pointer-events: none;
}

/* Property Color Bars */
.tile-color-bar {
  height: 18%;
  min-height: 12px;
  width: 100%;
  position: relative;
}

.house-indicator-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.house-chip, .hotel-chip {
  font-size: 0.7rem;
}

/* Tile Body Text */
.tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 2px 3px;
  text-align: center;
}

.tile-name {
  font-size: clamp(0.5rem, 0.85vw, 0.68rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  word-break: break-word;
}

.tile-price {
  font-size: clamp(0.48rem, 0.8vw, 0.62rem);
  font-weight: 700;
  color: var(--text-muted);
}

.tile-special-header {
  font-size: clamp(0.9rem, 1.3vw, 1.2rem);
  text-align: center;
  padding-top: 4px;
}

/* Corner Tiles */
.corner-tile {
  background: #0f172a !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px;
}

.corner-icon {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  margin-bottom: 2px;
}

.corner-title {
  font-size: clamp(0.6rem, 0.95vw, 0.75rem);
  font-weight: 900;
  color: #fff;
}

.corner-sub {
  font-size: clamp(0.45rem, 0.7vw, 0.55rem);
  color: var(--text-dim);
  line-height: 1.1;
  margin-top: 2px;
}

/* Owner Marker Ribbon */
.tile-owner-marker {
  height: 4px;
  width: 100%;
  display: none;
}

/* Pawns Container inside Tile */
.tile-pawns-container {
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  pointer-events: none;
  z-index: 15;
}

.player-token {
  width: clamp(18px, 2.5vw, 24px);
  height: clamp(18px, 2.5vw, 24px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(11px, 1.4vw, 15px);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-token.active-token {
  transform: scale(1.2);
  box-shadow: 0 0 12px #fff;
  animation: tokenHop 1s infinite alternate ease-in-out;
}

@keyframes tokenHop {
  0% { transform: translateY(0) scale(1.15); }
  100% { transform: translateY(-4px) scale(1.25); }
}

/* ==============================================================================
   3. BOARD CENTER AREA
   ============================================================================== */
.board-center-area {
  grid-column: 2 / 11;
  grid-row: 2 / 11;
  background: radial-gradient(circle at center, #151d30 0%, #0d121f 100%);
  border-radius: var(--radius-md);
  margin: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: 90%;
  max-width: 380px;
}

/* Jackpot Banner */
.jackpot-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.jackpot-icon {
  font-size: 1.4rem;
}

.jackpot-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.jackpot-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
}

.jackpot-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

/* Current Turn Card */
.turn-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.turn-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 800;
  color: #fff;
}

.turn-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 3D Dice Roller */
.dice-arena {
  display: flex;
  align-items: center;
  gap: 18px;
}

.die-face {
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #ffffff, #e2e8f0);
  color: #0f172a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.8);
  transition: transform 0.15s ease;
}

.die-face.dice-rolling {
  animation: diceShake 0.4s infinite ease-in-out;
}

@keyframes diceShake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  25% { transform: translate(-2px, -2px) rotate(-6deg); }
  50% { transform: translate(2px, 0px) rotate(6deg); }
  75% { transform: translate(-1px, 2px) rotate(-4deg); }
  100% { transform: translate(1px, -1px) rotate(0deg); }
}

/* Center Action Buttons */
.center-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.action-btn {
  flex: 1;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.action-btn.roll-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.action-btn.roll-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.action-btn.end-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.action-btn.end-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none !important;
}

.quick-tools-row {
  display: flex;
  gap: 10px;
}

.tool-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==============================================================================
   4. SIDEBAR: ROSTER & EVENT LOG
   ============================================================================== */
.game-sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

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

.sidebar-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.sidebar-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-red);
}

/* Player Cards */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.player-card.active-turn {
  background: #1e2942;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.player-card.is-bankrupt {
  opacity: 0.45;
  filter: grayscale(1);
}

.player-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.player-meta {
  flex: 1;
}

.player-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

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

.player-cash {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent-green);
}

.player-property-strip {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.group-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.group-dot.mono-glow {
  box-shadow: 0 0 8px currentColor;
  border-color: #fff;
}

/* Activity Log */
.log-section {
  flex: 1;
  min-height: 200px;
}

.activity-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  padding-right: 4px;
}

.log-entry {
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--text-dim);
  border-radius: 4px;
}

.log-entry.log-money { border-color: var(--accent-green); }
.log-entry.log-purchase { border-color: var(--accent-gold); }
.log-entry.log-danger { border-color: var(--accent-red); }
.log-entry.log-turn { border-color: var(--accent-blue); }
.log-entry.log-card { border-color: #a855f7; }

.log-time {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-right: 6px;
}

/* ==============================================================================
   5. MODALS & POPUPS
   ============================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-md), 0 0 40px rgba(0, 0, 0, 0.6);
  animation: modalScale 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover { color: #fff; }

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.modal-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-btn {
  flex: 1;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-btn.full-width { width: 100%; }
.modal-btn.green { background: var(--accent-green); color: #fff; }
.modal-btn.blue { background: var(--accent-blue); color: #fff; }
.modal-btn.orange { background: var(--accent-gold); color: #000; }
.modal-btn.red { background: var(--accent-red); color: #fff; }
.modal-btn:hover { transform: translateY(-2px); opacity: 0.92; }

/* Deed Modal Card (Classic Title Deed) */
.deed-modal-card {
  padding: 0;
  overflow: hidden;
  max-width: 360px;
}

.deed-header {
  padding: 16px;
  text-align: center;
  color: #fff;
}

.deed-title-sub {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0.85;
}

.deed-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  margin-top: 2px;
}

.deed-body {
  padding: 16px 20px;
  background: #fff;
  color: #0f172a;
}

.deed-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.deed-row.highlight {
  font-weight: 800;
  color: #b91c1c;
}

.deed-divider {
  border: 0;
  border-top: 1px solid #cbd5e1;
  margin: 10px 0;
}

.deed-footer {
  padding: 14px 20px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
}

.deed-owner-status {
  font-size: 0.82rem;
  margin-bottom: 10px;
}

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

/* Buy Modal */
.action-modal-card {
  text-align: center;
}

.modal-icon-badge {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.buy-price-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-green);
  margin: 12px 0;
}

/* Card Deck Modal */
.card-deck-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  margin-bottom: 8px;
}

.card-icon-art {
  font-size: 3rem;
  margin: 10px 0;
}

/* Trade Modal */
.trade-modal-card {
  max-width: 560px;
}

.trade-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.trade-col {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.trade-col-title {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
}

.trade-cash-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  font-weight: 700;
}

.trade-cash-input-box input {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  width: 100%;
  font-weight: 700;
  outline: none;
}

.trade-props-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.trade-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.trade-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Rules Modal */
.rules-modal-card {
  max-width: 540px;
}

.rules-scroll-body {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 14px;
}

.rules-scroll-body h3 {
  font-size: 0.95rem;
  color: var(--accent-gold);
  margin: 14px 0 4px;
}

.rules-scroll-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Winner Modal */
.winner-modal-card {
  text-align: center;
  padding: 40px 24px;
}

.winner-trophy {
  font-size: 4rem;
  animation: trophyFloat 1.4s infinite alternate ease-in-out;
}

@keyframes trophyFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

.winner-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-gold);
  margin-top: 10px;
}

.winner-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 16px auto 8px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.winner-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.winner-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==============================================================================
   6. LOBBY OVERLAY SCREEN
   ============================================================================== */
.lobby-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #111827 0%, #060911 100%);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lobby-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-md), 0 0 60px rgba(0, 0, 0, 0.8);
}

.lobby-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
}

.lobby-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 20px;
}

.lobby-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.form-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.token-selector-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.token-choice-btn {
  height: 42px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.token-choice-btn:hover, .token-choice-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue);
  transform: scale(1.08);
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-tab-btn {
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-tab-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue);
  color: #fff;
}

.radio-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pill {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.radio-pill input { display: none; }

.radio-pill.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: #fff;
}

.start-match-btn {
  margin-top: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.start-match-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

/* ==============================================================================
   7. RESPONSIVE MEDIA QUERIES
   ============================================================================== */
@media (max-width: 1080px) {
  .game-container {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
  }
  .game-sidebar {
    width: 100%;
  }
  .monopoly-board {
    width: 95vw;
    height: 95vw;
    max-width: 600px;
    max-height: 600px;
  }
}
