/* =====================================================================
   main.css — Global + Lobby styles for Last Stand
   Dark military-strategy aesthetic with gold accents
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Rajdhani:wght@600;700&family=Inter:wght@400;600&display=swap');

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

:root {
  --bg-dark:    #0a0c10;
  --bg-panel:   rgba(15, 18, 28, 0.92);
  --bg-tile:    #12151e;
  --accent:     #c9a84c;
  --accent-dim: #8a6f2e;
  --text-light: #e8e0d0;
  --text-dim:   #8a8070;
  --border:     rgba(201, 168, 76, 0.25);
  --glow:       rgba(201, 168, 76, 0.15);
  --radius:     10px;

  /* legacy aliases kept for compatibility */
  --gold:           #c9a84c;
  --gold-dark:      #8a6f2e;
  --gold-light:     #e0bc60;
  --text-primary:   #e8e0d0;
  --text-secondary: #c8c0b0;
  --text-muted:     #8a8070;
  --card-bg:        rgba(15, 18, 28, 0.85);
  --red:  #e74c3c;
  --blue: #3498db;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #05070d;
  background-image:
    radial-gradient(ellipse 120% 80% at 10% 20%, rgba(10,30,80,0.9) 0%, transparent 55%),
    radial-gradient(ellipse 100% 100% at 90% 80%, rgba(30,10,70,0.8) 0%, transparent 55%),
    linear-gradient(160deg, #060a14 0%, #090d1c 35%, #05070f 65%, #080c18 100%);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Removed bg-drift animation for performance */

/* ── Layer 1: aurora blobs - static for performance ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 45%, rgba(0,120,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 55% 70% at 85% 15%, rgba(130,0,255,0.15) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 85%, rgba(0,220,180,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 70% 55%, rgba(255,80,0,0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layer 2: fine diagonal grid shimmer - static for performance ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Removed body-aurora and grid-drift animations for performance */

/* ── STARS BACKGROUND ── */
.stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(241,196,15,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(26,74,138,0.3) 0%, transparent 60%);
  z-index: 0;
}

/* ── CONTAINER ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── HEADER ── */
header { text-align: center; }

.game-title {
  font-family: 'Cinzel', serif;
  font-style: normal;
  font-weight: 900;
  font-size: clamp(4rem, 13vw, 8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow:
    0 0 20px rgba(201,168,76,1),
    0 0 50px rgba(201,168,76,0.7),
    0 0 100px rgba(201,168,76,0.3),
    0 4px 8px rgba(0,0,0,0.95);
  line-height: 1;
}

.game-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 8px;
}

/* ── CARD ── */
.card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(201,168,76,0.07);
}

.card:hover {
  border-color: rgba(201,168,76,0.45);
  box-shadow: 0 0 24px rgba(201,168,76,0.12), 0 4px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(201,168,76,0.1);
}

/* ── FORM ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 18, 30, 0.85);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.2), 0 0 12px rgba(201,168,76,0.08);
  background: rgba(20, 24, 38, 0.95);
}

input::placeholder { color: rgba(255,255,255,0.3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #0a0c10;
  box-shadow: 0 2px 12px rgba(201,168,76,0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.45s ease;
}

.btn-primary:hover:not(:disabled)::after {
  transform: translateX(100%);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-light), var(--accent));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,168,76,0.45);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover:not(:disabled) {
  border-color: rgba(201,168,76,0.7);
  color: var(--accent);
  background: rgba(201,168,76,0.06);
}

.btn-large {
  width: 100%;
  padding: 13px 20px;
  font-size: 0.92rem;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.72rem;
}

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── ROOM INFO ── */
.room-info h2 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.room-info h3 {
  font-family: 'PT Sans Narrow', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 8px;
  margin-bottom: 4px;
}

.room-code {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(201,168,76,0.5);
  cursor: pointer;
  user-select: all;
  transition: transform 0.1s, text-shadow 0.2s;
}

.room-code:hover {
  transform: scale(1.02);
  text-shadow: 0 0 20px rgba(201,168,76,0.8), 0 0 40px rgba(201,168,76,0.4);
}

.copy-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: -6px;
}

.player-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

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

/* ── HINTS ── */
.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

.waiting { animation: pulse 1.5s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── ERROR ── */
.error-msg {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid rgba(231, 76, 60, 0.5);
  border-radius: 6px;
  padding: 12px 16px;
  color: #ff8a80;
  font-size: 0.82rem;
  text-align: center;
  width: 100%;
}

/* ── GAME PAGE BASE ── */
body.game-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #05070d;
  background-image:
    radial-gradient(ellipse 110% 60% at 5% 30%,  rgba(10,30,100,0.85) 0%, transparent 50%),
    radial-gradient(ellipse 90%  90% at 95% 70%,  rgba(50,5,100,0.7)   0%, transparent 50%),
    linear-gradient(170deg, #05080f 0%, #080c1a 40%, #04060e 70%, #070b16 100%);
}

/* ── BACKGROUND SPOTLIGHT (injected by JS on game page) - static for performance ── */
.bg-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 40% at 50% 50%, rgba(100, 60, 220, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 55% at 30% 60%, rgba(0, 140, 255, 0.12) 0%, transparent 65%);
}

/* Removed spotlight-drift animation for performance */

/* ── PANELS (game page) ── */
.game-layout {
  display: flex;
  flex: 1;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.panel {
  background: linear-gradient(160deg, rgba(14,18,32,0.96) 0%, rgba(8,11,22,0.98) 100%);
  border: 1px solid rgba(201,168,76,0.2);
  border-top: 1px solid rgba(201,168,76,0.35);
  border-radius: var(--radius);
  padding: 12px;
  overflow-y: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.65),
    inset 0 1px 0 rgba(201,168,76,0.09),
    inset 0 0 0 1px rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-left  { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; }
.panel-right { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.panel-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to right, rgba(201,168,76,0.5), transparent) no-repeat bottom;
  background-size: 100% 1px;
  text-shadow: 0 0 8px rgba(201,168,76,0.3);
}

/* ── PLAYER CARDS ── */
.player-cards { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 0; }

.player-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 2px solid transparent;
  border-radius: 4px;
  padding: 3px 5px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
}

.player-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.player-card.active {
  border-color: rgba(201,168,76,0.4);
  border-left: 3px solid var(--accent);
  background: rgba(201,168,76,0.07);
  box-shadow: 0 0 10px rgba(201,168,76,0.1), inset 0 0 0 1px rgba(201,168,76,0.05);
}

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

.player-card-header {
  display: contents; /* lets token + name flow directly into card's flex row */
}

.player-token-sm {
  width: 13px; height: 13px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.42rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.player-name-sm {
  font-size: 0.62rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.player-money {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #4ade80;
  text-shadow: 0 0 5px rgba(74,222,128,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.player-props {
  font-size: 0.55rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── LOG PANEL ── */
.log-panel {
  flex: 1;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  line-height: 1.55;
  color: var(--text-dim);
  min-height: 0;
}

.panel-right .log-panel {
  max-height: none;
}

.log-panel p {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: 4px 0;
  line-height: 1.4;
  color: var(--text-dim);
}

.log-panel p:first-child {
  color: var(--text-light);
  font-weight: 600;
}

/* ── EVENT LOG COLORS ── */
.log-entry {
  color: var(--text-dim);
  padding: 3px 0 3px 8px;
  font-size: clamp(10px, 1.3vw, 14px);
  line-height: 1.3;
  border-bottom: 1px solid rgba(201,168,76,0.04);
  border-left: 2px solid transparent;
  transition: opacity 0.5s ease;
}

.log-system  { color: #60e0ff; border-left-color: #60e0ff44; }
.log-money   { color: #4ade80; border-left-color: #4ade8044; }
.log-card    { color: #fbbf24; border-left-color: #fbbf2444; }
.log-jail    { color: #f87171; border-left-color: #f8717144; }
.log-winner  { color: #c9a84c; font-weight: 700; font-size: 1.1em; border-left-color: #c9a84c88; }
.log-info    { color: #a0a8c0; }

/* ── CHAT ── */
.chat-section {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.chat-log {
  overflow-y: auto;
  font-size: 10px;
  line-height: 1.2;
  height: 240px;
  max-height: 240px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 7px;
  background: rgba(0,0,0,0.2);
}

.chat-log p { margin-bottom: 1px; padding: 2px 4px; }
.chat-log b { color: var(--gold); }

.chat-input-row {
  display: flex;
  gap: 5px;
}

.chat-input-row input {
  flex: 1;
  padding: 6px 9px;
  font-size: 0.65rem;
}

/* ── RIGHT PANEL ACTIONS ── */
.right-panel-actions {
  flex: 0 0 auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.right-panel-trade-btn {
  width: 100%;
  background: linear-gradient(135deg, #1e3e2e, #152d20);
  color: #a8f5d8;
  border: 1px solid #2ecc8a;
  box-shadow: 0 0 8px rgba(46,204,138,0.15);
}
.right-panel-trade-btn:hover {
  background: linear-gradient(135deg, #2a5040, #1e3e2e);
  border-color: #3de0a0;
  box-shadow: 0 0 14px rgba(46,204,138,0.3);
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: linear-gradient(160deg, #0f1420 0%, #080d18 100%);
  border: 1px solid rgba(201,168,76,0.28);
  border-top: 1px solid rgba(201,168,76,0.5);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 480px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 30px rgba(201,168,76,0.07), inset 0 1px 0 rgba(201,168,76,0.08);
}

.modal-box h3 {
  font-family: 'Cinzel', serif;
  color: var(--accent);
  font-size: 1.1rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── TILE INFO MODAL ── */
.tile-info-box {
  max-width: 360px;
  padding: 0;
  overflow: hidden;
}

.tile-info-color-bar {
  height: 8px;
  width: 100%;
}

.tile-info-box h3 {
  font-family: 'Cinzel', serif;
  color: var(--accent);
  font-size: 1rem;
  padding: 16px 20px 0;
}

.tile-info-box > #tileInfoBody {
  padding: 8px 20px;
}

.tile-info-box .modal-actions {
  padding: 0 20px 16px;
}

.tile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tile-info-row span { color: var(--text-muted); font-size: 0.75rem; }
.tile-info-row strong { font-weight: 600; }

.tile-info-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.rent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-top: 6px;
}

.rent-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 3px 4px;
  border-bottom: 1px solid var(--border);
}

.rent-table td {
  padding: 3px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.rent-table tr.rent-active td {
  color: var(--gold);
  font-weight: 600;
}

/* ── BUILD OPTIONS ── */
.build-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 240px;
  overflow-y: auto;
}

.build-option-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 11px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-primary);
  transition: border-color 0.15s;
}

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

/* ── TRADE MODAL ── */
.trade-modal-box { max-width: 540px; }

.trade-form { display: flex; flex-direction: column; gap: 12px; }

.trade-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-side { display: flex; flex-direction: column; gap: 7px; }

.trade-side h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.trade-props { display: flex; flex-direction: column; gap: 4px; }

.trade-prop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

/* ── WINNER ── */
.winner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.winner-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.winner-box h1 {
  font-family: 'Cinzel', serif;
  font-size: 3rem;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(201,168,76,0.8);
  animation: winner-glow 1.5s ease-in-out infinite alternate;
}

.winner-box h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  color: #fff;
}

@keyframes winner-glow {
  from { text-shadow: 0 0 20px rgba(201,168,76,0.6); }
  to   { text-shadow: 0 0 50px rgba(201,168,76,1), 0 0 80px rgba(201,168,76,0.5); }
}

/* ── LOADING ── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: opacity 0.4s;
}

.loading-content { text-align: center; }
.loading-content p { color: var(--text-muted); margin-top: 12px; }

/* ── BOARD WRAPPER ── */
.board-wrapper {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

/* GPU-composited layers for the board and its center panel */
.board-wrapper .board { transform: translateZ(0); }
.board-wrapper .board-center-actions { transform: translateZ(0); }

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 4px; background: transparent; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,0.6); }

/* ── RESPONSIVE ── */
/* Large screens - ensure text doesn't get too small on wide displays */
@media (min-width: 1920px) {
  :root {
    --base-font-scale: 1.1;
  }
  .log-entry {
    font-size: clamp(12px, 1.3vw, 16px);
  }
}

@media (max-width: 900px) {
  .panel-left  { width: 160px; }
  .panel-right { width: 200px; }
}

@media (max-width: 768px) {
  body.game-page {
    overflow-y: auto;
    height: auto;
  }
  .game-layout {
    flex-direction: column;
    overflow-y: auto;
    height: auto;
  }
  .panel-left {
    width: 100%;
    min-height: auto;
    overflow-y: auto;
    flex: none;
  }
  .panel-left .player-cards {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    flex: none;
  }
  .panel-left .player-card {
    min-width: 130px;
    flex-shrink: 0;
  }
  .panel-left .chat-section {
    display: block;
  }
  .panel-right {
    width: 100%;
    min-height: 200px;
    height: auto;
  }
  .board-wrapper {
    width: 100%;
  }
  .btn-center-action {
    min-height: 44px;
    font-size: 0.78rem;
  }
  .btn {
    min-height: 44px;
  }
  .right-panel-actions .right-panel-trade-btn {
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .btn-center-action {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 540px) {
  .modal-box {
    width: 95%;
    padding: 16px;
  }
  .trade-sides {
    grid-template-columns: 1fr;
  }
}

/* ── COLOR PICKER ── */
.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  outline: none;
  padding: 0;
}

.color-swatch:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.6);
  transform: scale(1.05);
}

.color-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 0 10px rgba(201,168,76,0.5);
  transform: scale(1.1);
}

.color-swatch.taken {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* ── GAME RULES PANEL ── */
.game-rules-panel {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.game-rules-panel h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.game-rules-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.game-rules-panel input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* ── VOTEKICK BUTTONS ── */
.btn-kick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 0;
  margin-left: 2px;
  padding: 1px 5px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
  background: transparent;
  border: 1px solid rgba(231,76,60,0.4);
  color: rgba(231,76,60,0.8);
  transition: all 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-kick:hover {
  background: rgba(231,76,60,0.15);
  border-color: #e74c3c;
  color: #e74c3c;
}

.btn-kick-active {
  background: rgba(231,76,60,0.25);
  border-color: #e74c3c;
  color: #ff6b6b;
  box-shadow: 0 0 4px rgba(231,76,60,0.3);
}

.btn-quit {
  border-color: rgba(201,168,76,0.4);
  color: rgba(201,168,76,0.8);
}

.btn-quit:hover {
  background: rgba(201,168,76,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── AUCTION MODAL ── */
.modal-btn-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* ── CENTER SKIP BUTTON ── */
.btn-center-skip {
  background: #2a1a4e;
  color: #c8a8f8;
  border: 1px solid #7c4dff;
}


.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 4000;
  pointer-events: none;
}

.toast {
  background: rgba(12, 15, 28, 0.96);
  border: 1px solid rgba(201,168,76,0.45);
  border-top: 1px solid rgba(201,168,76,0.7);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--text-primary);
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 12px rgba(201,168,76,0.08);
}

.toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

