/* ═══════════════════════════════════════════════════════════════════════════
   It's Just Business — Core Stylesheet
   Dual Theme: Light (White & Dark Red) | Dark (Obsidian & Crimson)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  /* Light theme (default) */
  --bg:          #f7f5f2;
  --bg-card:     #ffffff;
  --bg-panel:    #f0ece7;
  --bg-input:    #ffffff;
  --border:      #e0d8d0;
  --border-soft: #ece7e0;

  --red:         #8b0000;
  --red-hover:   #a00000;
  --red-light:   #f5e6e6;
  --red-mid:     #c0392b;
  --gold:        #b8860b;
  --gold-light:  #fdf3dc;

  --text:        #1a1a1a;
  --text-muted:  #6b5e52;
  --text-light:  #9a8878;
  --text-invert: #ffffff;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --font-body:   'Inter', system-ui, sans-serif;
  --font-display:'Playfair Display', Georgia, serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg:          #0d0d12;
  --bg-card:     #16161f;
  --bg-panel:    #1e1e2a;
  --bg-input:    #1e1e2a;
  --border:      #2e2e40;
  --border-soft: #252535;

  --red:         #dc2626;
  --red-hover:   #ef4444;
  --red-light:   #1c0a0a;
  --red-mid:     #b91c1c;
  --gold:        #d4af37;
  --gold-light:  #1c180a;

  --text:        #f0eee8;
  --text-muted:  #a09888;
  --text-light:  #6e6458;
  --text-invert: #0d0d12;

  --shadow-sm:   0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
}

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* ── Theme Toggle Button ────────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 14px; right: 16px;
  z-index: 9999;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition), transform 0.15s;
}
.theme-toggle:hover { transform: scale(1.1); }

/* ── Screens ────────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  position: relative;
}
.screen.active { display: flex; }

/* ══════════════════════════════════════════════════════════ LANDING SCREEN ══ */
#screen-landing {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.landing-bg {
  position: fixed; inset: 0; z-index: 0;
  background: var(--bg);
  /* Subtle geometric pattern */
  background-image: radial-gradient(circle at 20% 20%, var(--red-light) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, var(--gold-light) 0%, transparent 50%);
}

.landing-card {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.logo-rupee {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--red);
  line-height: 1;
  font-weight: 900;
}

.logo-text h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
}

.logo-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Form elements */
.form-group { margin-bottom: 18px; }

.form-group label,
.token-picker label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.form-group input,
.join-row input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.join-row input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.12);
}

/* Token picker */
.token-picker { margin-bottom: 20px; }
.token-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.token-btn {
  aspect-ratio: 1;
  background: var(--bg-panel);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 20px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 0.1s;
  display: flex; align-items: center; justify-content: center;
}
.token-btn:hover { border-color: var(--red-mid); background: var(--red-light); }
.token-btn.active { border-color: var(--red); background: var(--red-light); transform: scale(1.08); }

/* Landing actions */
.landing-actions { display: flex; flex-direction: column; gap: 12px; }

.divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-light);
  font-size: 12px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.join-row {
  display: flex;
  gap: 8px;
}
.join-row input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 16px;
}

.form-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
  font-weight: 500;
}
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════ LOBBY SCREEN ══ */
#screen-lobby {
  flex-direction: column;
  background: var(--bg);
  padding: 60px 16px 24px;
}

.lobby-layout {
  display: flex;
  gap: 20px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.lobby-panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.lobby-players-panel {
  width: 240px;
  flex-shrink: 0;
}

.lobby-players-panel h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.lobby-main-panel { flex: 1; overflow-y: auto; max-height: calc(100vh - 120px); }

.player-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.player-list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
}
.player-list-item .p-token { font-size: 20px; }
.player-list-item .p-name { flex: 1; }
.player-list-item .p-host { font-size: 11px; color: var(--gold); font-weight: 600; }
.lobby-waiting-hint { font-size: 12px; color: var(--text-light); margin-top: 12px; }

/* Room code box */
.room-code-box {
  display: flex; align-items: center; gap: 14px;
  background: var(--red-light);
  border: 1.5px solid var(--red);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.room-code-label { font-size: 12px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: 0.05em; }
.room-code-value {
  font-family: 'Courier New', monospace;
  font-size: 22px; font-weight: 700; color: var(--red);
  letter-spacing: 0.14em; flex: 1;
}

/* Rules section */
.rules-section h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rules-host-note {
  font-size: 12px; color: var(--text-light);
  margin-bottom: 14px;
}

.rules-list { display: flex; flex-direction: column; gap: 0; }

.rule-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}
.rule-item:last-child { border-bottom: none; }
.rule-item--select { align-items: center; }

.rule-info { flex: 1; }
.rule-name { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.rule-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }

/* Toggle switch */
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--red); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* Rule select */
.rule-select {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  cursor: pointer; outline: none;
  transition: border-color var(--transition);
}
.rule-select:focus { border-color: var(--red); }

/* ══════════════════════════════════════════════════════════ GAME SCREEN ══ */
#screen-game {
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 56px 10px 16px;
  background: var(--red);
  color: #fff;
  flex-shrink: 0;
  height: 52px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.game-header-left { display: flex; align-items: center; gap: 10px; }
.game-logo-sm { font-family: var(--font-display); font-size: 28px; font-weight: 900; opacity: 0.9; }
.game-title-sm { font-family: var(--font-display); font-size: 17px; font-weight: 700; opacity: 0.95; }
.game-header-right { display: flex; align-items: center; gap: 14px; }

.vacation-pot {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 13px; font-weight: 600;
}

.room-pill {
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em;
}

/* Game layout (3-Column Grid) */
.game-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 52px);
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-height: 800px) and (min-width: 769px) {
  .game-header {
    height: 44px;
    padding: 6px 16px;
  }
  .game-layout {
    height: calc(100vh - 44px);
  }
  .action-bar {
    padding: 8px 12px;
  }
  .action-buttons .btn {
    padding: 8px 16px;
    font-size: 13.5px;
  }
  .player-card {
    padding: 8px 10px;
  }
  .pc-cash {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  #screen-game {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .game-header {
    height: 40px;
    padding: 4px 12px;
    flex-shrink: 0;
  }
  .game-title-sm { font-size: 13.5px; }
  .game-logo-sm { font-size: 18px; }
  .room-pill { font-size: 11px; padding: 2px 8px; }

  .game-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    grid-template-columns: none;
    grid-template-rows: none;
  }

  /* Slim Horizontal Player Ribbon on Mobile */
  .side-panel--left {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    flex-direction: row;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 8px;
    gap: 6px;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1.5px solid var(--border);
    background: var(--bg-card);
    align-items: center;
    box-sizing: border-box;
  }
  .side-panel--left::-webkit-scrollbar { height: 2px; }
  .side-panel--left::-webkit-scrollbar-thumb { background: var(--border); }

  .player-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    height: 32px;
    min-width: max-content;
    max-width: none;
    flex-shrink: 0;
    border-radius: 16px;
    border-width: 1.5px;
    box-sizing: border-box;
  }
  .player-card-top {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
  }
  .pc-token { font-size: 16px; line-height: 1; }
  .pc-name {
    font-size: 11px;
    font-weight: 800;
    max-width: 75px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pc-you-tag {
    font-size: 7.5px;
    padding: 1px 4px;
    border-radius: 6px;
    font-weight: 900;
  }
  .pc-status { font-size: 10px; }
  .pc-cash {
    font-size: 11.5px;
    font-weight: 900;
    margin: 0;
    padding-left: 4px;
    border-left: 1px solid var(--border);
    line-height: 1;
  }
  .pc-props { display: none; }

  .game-center {
    padding: 4px;
    gap: 4px;
    flex-shrink: 0;
    width: 100%;
  }

  .action-bar {
    max-width: 100%;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  .turn-indicator { font-size: 11.5px; margin-bottom: 3px; }
  .action-buttons .btn {
    padding: 6px 14px;
    font-size: 12.5px;
  }

  .side-panel--right {
    width: 100%;
    height: auto;
    min-height: 200px;
    border-left: none;
    border-top: 1.5px solid var(--border);
    padding: 6px 8px;
    flex-shrink: 0;
  }
  .action-log {
    max-height: 130px;
  }
}

/* ── Tablet Responsive Experience (681px - 1024px) ────────────────────────── */
@media (min-width: 681px) and (max-width: 1024px) {
  .game-layout {
    grid-template-columns: 190px 1fr 210px;
    height: calc(100vh - 48px);
  }
  .game-header {
    height: 46px;
    padding: 6px 14px;
  }
  .player-card {
    padding: 8px 10px;
  }
  .pc-name { font-size: 12px; }
  .pc-cash { font-size: 15px; }
  .pc-token { font-size: 20px; }
  .action-bar {
    padding: 8px 14px;
  }
  .action-buttons .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Side panels */
.side-panel {
  background: var(--bg-card);
  border-color: var(--border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.side-panel--left {
  border-right: 1.5px solid var(--border);
  overflow-y: auto;
}
.side-panel--right {
  border-left: 1.5px solid var(--border);
  overflow: hidden;
}

/* Player cards in sidebar */
.player-card {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  position: relative;
  transition: border-color var(--transition), background var(--transition), transform 0.15s;
}
.player-card.is-me {
  border-color: var(--gold);
  background: var(--gold-light);
  box-shadow: 0 4px 12px rgba(184, 134, 11, 0.15);
}
.player-card.active-turn {
  border-color: var(--red);
  background: var(--red-light);
  box-shadow: 0 0 0 3px rgba(139,0,0,0.25);
  animation: cardPulse 1.8s ease-in-out infinite;
}
@keyframes cardPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}
.player-card.bankrupt { opacity: 0.4; filter: grayscale(0.8); }
.player-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pc-token { font-size: 26px; line-height: 1; }
.pc-name { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-you-tag {
  background: var(--gold);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
}
.pc-status { font-size: 13px; }
.pc-cash { font-size: 20px; font-weight: 900; color: var(--red); font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0; }
.pc-props { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pc-prop-dot { width: 11px; height: 11px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }

/* Center */
.game-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 8px 12px;
  gap: 8px;
  height: 100%;
  box-sizing: border-box;
}

.board-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

/* Action bar */
.action-bar {
  width: 100%;
  max-width: 660px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.turn-indicator {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.action-buttons {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}

.timer-bar {
  height: 5px; border-radius: 4px; background: var(--border);
  margin-top: 8px; overflow: hidden;
}
.timer-fill {
  height: 100%; width: 100%;
  background: var(--red);
  border-radius: 4px;
  transition: width 1s linear;
}

/* Right panel tabs */
.log-header { display: flex; gap: 4px; margin-bottom: 8px; flex-shrink: 0; }
.tab-btn {
  flex: 1; padding: 7px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text-muted);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background var(--transition), color var(--transition);
}
.tab-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

.action-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 4px;
}
.action-log::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.side-panel--left::-webkit-scrollbar {
  width: 5px;
}
.action-log::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.side-panel--left::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.log-entry {
  font-size: 12.5px; line-height: 1.4; color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bg-panel);
  border-left: 3px solid var(--border);
  word-break: break-word;
}
.log-entry.highlight {
  color: var(--text);
  font-weight: 700;
  background: var(--red-light);
  border-left-color: var(--red);
}

.chat-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}
.chat-msg { font-size: 13px; line-height: 1.35; padding: 4px 6px; background: var(--bg-panel); border-radius: 4px; }
.chat-msg .chat-name { font-weight: 700; color: var(--red); }

.chat-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.chat-input-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.chat-input-row input:focus { border-color: var(--red); }
.chat-input-row button {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
}

.reactions-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1.5px solid var(--border-soft);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.react-btn {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.1s, background var(--transition);
}
.react-btn:hover { transform: scale(1.15); background: var(--red-light); }

/* Floating reactions */
.reactions-container { position: fixed; inset: 0; pointer-events: none; z-index: 8000; overflow: hidden; }
.floating-reaction {
  position: absolute;
  bottom: 60px;
  font-size: 36px;
  animation: floatUp 2.2s ease-out forwards;
  pointer-events: none;
}
@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-260px) scale(1.3); }
}

/* ══════════════════════════════════════════════════════════ BUTTONS ══════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              transform 0.1s, box-shadow var(--transition);
  white-space: nowrap;
  outline: none;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--red); color: #fff; border-color: var(--red);
}
.btn-primary:hover:not(:disabled) { background: var(--red-hover); border-color: var(--red-hover); box-shadow: 0 2px 8px rgba(139,0,0,0.25); }

.btn-secondary {
  background: var(--bg-panel); color: var(--text); border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-danger {
  background: #7f1d1d; color: #fff; border-color: #7f1d1d;
}
.btn-danger:hover:not(:disabled) { background: #991b1b; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 16px; width: 100%; margin-top: 20px; }

/* ══════════════════════════════════════════════════════════ SCROLLBARS ══ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ══════════════════════════════════════════════════════════ RESPONSIVE ══ */
@media (max-width: 900px) {
  .game-layout { flex-direction: column; }
  .side-panel { width: 100%; height: auto; max-height: 140px; flex-direction: row; flex-wrap: wrap; }
  .side-panel--left { border-right: none; border-bottom: 1.5px solid var(--border); }
  .side-panel--right { border-left: none; border-top: 1.5px solid var(--border); max-height: 180px; }
  .lobby-layout { flex-direction: column; }
  .lobby-players-panel { width: 100%; }
}

@media (max-width: 600px) {
  .landing-card { padding: 28px 20px; }
  .token-grid { grid-template-columns: repeat(4, 1fr); }
  .game-header { padding: 10px 48px 10px 12px; }
}
