/* ═══════════════════════════════════════
   MONOPOLY ONLINE — Fullscreen Dark Theme
   ═══════════════════════════════════════ */

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

:root {
  --bg: #080816;
  --bg-cell: #131a2e;
  --bg-glass: rgba(18, 26, 50, 0.85);
  --border-glass: rgba(100, 140, 255, 0.15);
  --border-glass-strong: rgba(132, 168, 255, 0.35);
  --text: #e8ecf4;
  --text-dim: #8899bb;
  --text-bright: #fff;
  --accent: #ffd700;
  --accent-glow: rgba(255, 215, 0, 0.3);
  --panel-glow: rgba(90, 124, 225, 0.2);
  --green: #2ecc71;
  --red: #e74c3c;
  --blue: #3498db;
  --strip-size: 22px;
  --owner-strip-size: 14px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --transition: 0.2s ease;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: 'Manrope', -apple-system, sans-serif;
  background: linear-gradient(135deg, #080816 0%, #0d1225 40%, #111833 100%);
  color: var(--text);
  overflow: hidden;
  position: relative;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

body::before {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -160px;
  background: rgba(52, 152, 219, 0.25);
  animation: floatAuraA 18s ease-in-out infinite;
}

body::after {
  width: 420px;
  height: 420px;
  bottom: -140px;
  right: -120px;
  background: rgba(255, 215, 0, 0.18);
  animation: floatAuraB 20s ease-in-out infinite;
}

@keyframes floatAuraA {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(60px, 30px);
  }
}

@keyframes floatAuraB {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-50px, -40px);
  }
}

.hidden {
  display: none !important;
}

/* ─── Glass ─── */
.glass-panel {
  background: linear-gradient(145deg, rgba(19, 29, 56, 0.86), rgba(14, 20, 40, 0.84));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass-strong);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 24px var(--panel-glow);
}

/* ─── Inputs & Buttons ─── */
.input {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: border-color var(--transition);
}

.input:focus {
  border-color: var(--accent);
}

.input:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.5);
  outline-offset: 2px;
}

.input::placeholder {
  color: var(--text-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb300);
  color: #1a1a2e;
  box-shadow: 0 3px 16px var(--accent-glow);
}

.btn-secondary {
  background: linear-gradient(135deg, #3a4a7a, #2a3a6a);
  color: var(--text);
}

.btn-danger {
  background: linear-gradient(135deg, var(--red), #c0392b);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, var(--green), #27ae60);
  color: #fff;
}

.btn-small {
  padding: 7px 12px;
  font-size: 11px;
}

.btn-big {
  padding: 14px 36px;
  font-size: 15px;
}

/* ═══ LOBBY ═══ */
.view {
  display: none;
}

.view.active {
  display: flex;
}

#lobby-view {
  min-height: 100vh;
  height: 100vh;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 0;
}

.lobby-container {
  text-align: center;
  width: 100%;
  max-width: 980px;
  padding: 20px;
}

.game-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #fff5cc, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s ease-in-out infinite;
  letter-spacing: 6px;
  margin-bottom: 4px;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% center
  }

  50% {
    background-position: 200% center
  }
}

.game-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 28px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.lobby-card {
  padding: 28px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  box-shadow: 0 20px 40px rgba(4, 8, 20, 0.45), 0 0 40px rgba(82, 126, 255, 0.12);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.glass-subpanel {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(100, 140, 255, 0.14);
  background: rgba(8, 13, 28, 0.48);
}

.auth-card {
  margin-bottom: 14px;
  text-align: left;
}

.auth-copy {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 10px;
}

.telegram-login-slot {
  min-height: 42px;
}

.auth-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-profile-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-bright);
}

.auth-profile-aka,
.auth-profile-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.auth-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.auth-stat-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.52);
  font-size: 11px;
  color: var(--text);
}

.auth-history {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 120px;
  overflow-y: auto;
  margin-top: 10px;
}

.auth-history-item {
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(8, 13, 28, 0.38);
  font-size: 11px;
  color: var(--text-dim);
}

.auth-nickname-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.auth-nickname-row .input {
  flex: 1;
}

.lobby-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.invite-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(21, 38, 73, 0.88), rgba(32, 28, 14, 0.88));
  border: 1px solid rgba(255, 215, 0, 0.18);
  text-align: left;
}

.invite-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.invite-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}

.separator {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

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

.join-row {
  display: flex;
  gap: 8px;
}

.join-row .input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
}

/* Board Size Selector */
.board-size-selector {
  margin: 14px 0 4px;
}

.player-color-selector {
  margin: 14px 0 8px;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  gap: 8px;
}

.color-chip {
  min-width: 30px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.color-chip:hover {
  transform: translateY(-1px) scale(1.04);
}

.color-chip.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.25);
}

.color-chip.taken {
  opacity: 0.32;
}

.color-chip[title] {
  position: relative;
}

.rules-panel {
  margin-top: 14px;
  text-align: left;
}

.map-preview-panel {
  margin-bottom: 12px;
}

.map-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.map-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.map-preview-grid.is-48 {
  grid-template-columns: repeat(6, 1fr);
}

.map-preview-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 30, 0.58);
  border: 1px solid rgba(100, 140, 255, 0.12);
  font-size: 18px;
}

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

.rules-subtitle {
  font-size: 11px;
  color: var(--text-dim);
}

.rule-range-row {
  margin-bottom: 12px;
}

.rule-range-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.rule-range-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rule-range-inputs input[type="range"] {
  flex: 1;
}

.rule-range-value {
  min-width: 56px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.rules-grid {
  display: grid;
  gap: 8px;
}

.rule-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(10, 15, 30, 0.5);
  border: 1px solid rgba(100, 140, 255, 0.12);
}

.rule-toggle input {
  margin-top: 3px;
}

.rule-toggle span {
  font-size: 12px;
  font-weight: 700;
}

.rule-toggle small {
  grid-column: 2;
  color: var(--text-dim);
  line-height: 1.35;
}

.size-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.size-options {
  display: flex;
  gap: 8px;
}

.size-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: var(--radius);
  border: 2px solid var(--border-glass);
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(10, 15, 30, 0.5);
}

.size-option input {
  display: none;
}

.size-option.selected,
.size-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 215, 0, 0.06);
}

.size-badge {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
}

.size-text {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.room-title {
  font-size: 16px;
  margin-bottom: 10px;
  text-align: left;
}

.room-code-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.glow-text {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  letter-spacing: 3px;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.player-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(10, 15, 30, 0.6);
  border-radius: var(--radius);
  border: 1px solid var(--border-glass);
}

.player-list-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-list-aka {
  font-size: 10px;
  color: var(--text-dim);
}

.room-lobby-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
  gap: 16px;
  margin-bottom: 14px;
  text-align: left;
  align-items: start;
}

.room-lobby-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
}

.room-sidebar-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#lobby-room .rules-panel {
  margin-top: 0;
  min-width: 0;
}

#lobby-room .player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
}

.room-settings-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-setting-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--text);
  font-size: 11px;
  border: 1px solid rgba(255, 215, 0, 0.12);
}

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

.player-list-name {
  font-weight: 600;
  font-size: 14px;
}

.player-list-host {
  margin-left: auto;
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.waiting-text {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: -2px;
}

/* ═══ GAME LAYOUT — FULLSCREEN ═══ */
.game-layout {
  display: flex;
  gap: 16px;
  padding: 16px;
  height: 100vh;
  width: 100vw;
  align-items: stretch;
  overflow: hidden;
  box-sizing: border-box;
}

#game-view {
  display: none;
}

#game-view.active {
  display: flex;
}

/* Board Container */
.board-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  position: relative;
  min-width: 0;
}

.game-topbar {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  padding: 8px 10px;
}

.game-topbar-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.topbar-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.topbar-block.compact {
  gap: 4px;
}

.topbar-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.topbar-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-value-row strong {
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--text-bright);
}

.bank-status {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.bank-chip {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.75);
  border: 1px solid rgba(100, 140, 255, 0.18);
  color: var(--text-bright);
  font-size: 10px;
  font-weight: 700;
}

/* Dice Area Center */
.dice-area-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.dice-tray {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.dice-tray.active-turn {
  border-color: rgba(255, 215, 0, 0.36);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), 0 0 34px rgba(255, 215, 0, 0.18), inset 0 0 26px rgba(255, 215, 0, 0.08);
}

.dice-tray.awaiting-action {
  border-color: rgba(255, 215, 0, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), 0 0 42px rgba(255, 215, 0, 0.28), inset 0 0 34px rgba(255, 215, 0, 0.14);
  animation: diceAwaitingGlow 1.65s ease-in-out infinite;
}

.dice-tray.waiting-turn {
  border-color: rgba(100, 140, 255, 0.2);
}

.dice-tray.turn-start-pulse {
  animation: diceTurnPulse 1.35s ease;
}

.dice-tray.turn-start-pulse-soft {
  animation: diceTurnPulseSoft 1s ease;
}

.dice-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dice-display-3d {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
  cursor: pointer;
}

/* 3D Dice */
.die-3d {
  --die-scale: 1;
  width: 60px;
  height: 60px;
  position: relative;
  perspective: 800px;
  transform: scale(var(--die-scale));
  transition: transform 0.25s ease, opacity 0.3s, filter 0.3s;
  opacity: 0.95;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
  cursor: pointer;
}

.dice-display-3d:hover .die-3d {
  --die-scale: 1.08;
  opacity: 1;
}

.die-cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: rotateX(-24deg) rotateY(36deg);
}

.die-3d.rolling .die-cube {
  animation: diceRoll3d 0.6s ease-in-out;
}

.die-3d.doubles .die-face {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.1), 0 0 14px rgba(255, 215, 0, 0.4);
}

@keyframes diceRoll3d {
  0% {
    transform: rotateX(-20deg) rotateY(30deg) rotateZ(0deg);
  }

  25% {
    transform: rotateX(40deg) rotateY(90deg) rotateZ(90deg);
  }

  50% {
    transform: rotateX(-60deg) rotateY(180deg) rotateZ(180deg);
  }

  75% {
    transform: rotateX(30deg) rotateY(270deg) rotateZ(270deg);
  }

  100% {
    transform: rotateX(-20deg) rotateY(30deg) rotateZ(360deg);
  }
}

.die-face {
  position: absolute;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #ffffff, #e0e0e0);
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #182033;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 1px 2px rgba(0, 0, 0, 0.18);
  align-self: center;
  justify-self: center;
}

.pip.tl { grid-area: 1 / 1; }
.pip.tr { grid-area: 1 / 3; }
.pip.ml { grid-area: 2 / 1; }
.pip.mr { grid-area: 2 / 3; }
.pip.bl { grid-area: 3 / 1; }
.pip.br { grid-area: 3 / 3; }
.pip.center { grid-area: 2 / 2; }

.die-face.front {
  transform: translateZ(30px);
}

.die-face.back {
  transform: rotateY(180deg) translateZ(30px);
}

.die-face.right {
  transform: rotateY(90deg) translateZ(30px);
}

.die-face.left {
  transform: rotateY(-90deg) translateZ(30px);
}

.die-face.top {
  transform: rotateX(90deg) translateZ(30px);
}

.die-face.bottom {
  transform: rotateX(-90deg) translateZ(30px);
}

.die-3d.show-1 {
}

.die-3d.show-1 .die-cube {
  transform: rotateX(-24deg) rotateY(36deg);
}

.die-3d.show-2 .die-cube {
  transform: rotateX(-114deg) rotateY(36deg);
}

.die-3d.show-3 .die-cube {
  transform: rotateX(-24deg) rotateY(-54deg);
}

.die-3d.show-4 .die-cube {
  transform: rotateX(-24deg) rotateY(126deg);
}

.die-3d.show-5 .die-cube {
  transform: rotateX(66deg) rotateY(36deg);
}

.die-3d.show-6 .die-cube {
  transform: rotateX(-24deg) rotateY(216deg);
}

.die-3d.show-1 .front {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.die-3d.show-2 .top {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.die-3d.show-3 .right {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.die-3d.show-4 .left {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.die-3d.show-5 .bottom {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.die-3d.show-6 .back {
  background: linear-gradient(145deg, #ffd700, #ffb300);
}

.dice-total {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.78);
  border: 1px solid rgba(100, 140, 255, 0.18);
  cursor: pointer;
}

.dice-total.is-doubles {
  color: var(--accent);
  border-color: rgba(255, 215, 0, 0.35);
}

@keyframes diceTurnPulse {
  0% { transform: scale(0.94); box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  30% { transform: scale(1.04); box-shadow: 0 0 44px rgba(255, 215, 0, 0.38), 0 0 80px rgba(255, 215, 0, 0.18); }
  100% { transform: scale(1); }
}

@keyframes diceTurnPulseSoft {
  0% { transform: scale(0.98); }
  40% { transform: scale(1.02); box-shadow: 0 0 24px rgba(100, 140, 255, 0.18); }
  100% { transform: scale(1); }
}

@keyframes diceAwaitingGlow {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), 0 0 32px rgba(255, 215, 0, 0.22), inset 0 0 26px rgba(255, 215, 0, 0.12);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), 0 0 52px rgba(255, 215, 0, 0.36), inset 0 0 38px rgba(255, 215, 0, 0.2);
  }
}

/* Game Log Center */
.game-log-center {
  position: absolute;
  top: calc(50% + 100px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  max-width: 580px;
  z-index: 10;
  padding: 14px 18px;
  background: rgba(12, 16, 35, 0.95);
  backdrop-filter: blur(16px);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(100, 140, 255, 0.1);
}

.game-log-center .log-title {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}

.game-log-center .log-entries {
  max-height: 130px;
  overflow-y: auto;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  text-align: center;
}

.game-log-center .log-entries::-webkit-scrollbar {
  width: 4px;
}

.game-log-center .log-entries::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 2px;
}

/* ═══ BOARD — SCALES TO FIT CONTAINER ═══ */
.board {
  display: grid;
  gap: 2px;
  background: rgba(5, 10, 25, 0.98);
  border: 3px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 3px;
  box-shadow: 0 0 50px rgba(100, 140, 255, 0.08), var(--shadow);
  flex-shrink: 0;
  max-height: 100%;
  max-width: 100%;
  height: 100vh;
  aspect-ratio: 1;
  position: relative;
}

/* Board Center Content */
.board-center-content {
  grid-column: 2/-2;
  grid-row: 2/-2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.4) 0%, transparent 70%);
  padding: 20px;
  position: relative;
  z-index: 5;
}

.board-center-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #fff5cc, var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s ease-in-out infinite;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 40px var(--accent-glow);
  position: relative;
  z-index: 5;
}

.board-center-subtitle {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  position: relative;
  z-index: 5;
}

.board.board-40 {
  grid-template-columns: 1.35fr repeat(9, 1fr) 1.35fr;
  grid-template-rows: 1.35fr repeat(9, 1fr) 1.35fr;
}

.board.board-48 {
  grid-template-columns: 1.3fr repeat(11, 1fr) 1.3fr;
  grid-template-rows: 1.3fr repeat(11, 1fr) 1.3fr;
}

/* Board Center */
.board-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 30, 60, 0.3) 0%, transparent 70%);
}

.board.board-40 .board-center {
  grid-row: 2/11;
  grid-column: 2/11;
}

.board.board-48 .board-center {
  grid-row: 2/13;
  grid-column: 2/13;
}

.board-center .center-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  letter-spacing: 4px;
}

.board-center .center-subtitle {
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ─── Cell ─── */
.cell {
  position: relative;
  background: linear-gradient(135deg, var(--bg-cell) 0%, rgba(20, 30, 50, 0.6) 100%);
  border: 1px solid rgba(60, 80, 120, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  padding: 3px;
}

.cell:hover {
  z-index: 10;
  border-color: rgba(100, 140, 255, 0.6);
  box-shadow: 0 0 14px rgba(100, 140, 255, 0.15), inset 0 0 20px rgba(100, 140, 255, 0.05);
  transform: scale(1.02);
}

.cell-step-pulse {
  animation: cellStepPulse 0.26s ease;
}

@keyframes cellStepPulse {
  0% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
  50% { box-shadow: 0 0 18px rgba(255, 215, 0, 0.28), inset 0 0 20px rgba(255, 215, 0, 0.08); }
  100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

.cell.corner {
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  background: linear-gradient(135deg, rgba(18, 26, 50, 0.9) 0%, rgba(25, 35, 65, 0.9) 100%);
}

/* ─── Color Strip (group indicator — inner edge facing center) ─── */
.cell .color-strip {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px currentColor;
}

.color-strip-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(7, 11, 22, 0.72);
  color: #fff8d2;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cell.side-bottom .color-strip {
  top: 0;
  left: 0;
  right: 0;
  height: var(--strip-size);
}

.cell.side-left .color-strip {
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--strip-size);
}

.cell.side-top .color-strip {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--strip-size);
}

.cell.side-right .color-strip {
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--strip-size);
}

.cell.side-left .color-strip-price {
  transform: rotate(-90deg);
  min-width: 44px;
}

.cell.side-right .color-strip-price {
  transform: rotate(90deg);
  min-width: 44px;
}

/* ─── Owner Strip (ownership — outer edge away from center) ─── */
.cell .owner-strip {
  position: absolute;
  z-index: 1;
  display: none;
  box-shadow: 0 0 6px currentColor;
}

.cell.side-bottom .owner-strip {
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--owner-strip-size);
}

.cell.side-left .owner-strip {
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--owner-strip-size);
}

.cell.side-top .owner-strip {
  top: 0;
  left: 0;
  right: 0;
  height: var(--owner-strip-size);
}

.cell.side-right .owner-strip {
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--owner-strip-size);
}

.cell .owner-strip.visible {
  display: block;
}

.cell.owned-cell .color-strip-price {
  opacity: 0;
  pointer-events: none;
}

/* ─── Cell Copy ─── */
.cell-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: calc(100% - 6px);
}

.cell-name {
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  color: var(--text);
  max-width: 100%;
  word-break: break-word;
  padding: 1px 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.cell.side-bottom .cell-copy {
  margin-top: calc(var(--strip-size) + 4px);
  margin-bottom: calc(var(--owner-strip-size) + 2px);
}

.cell.side-top .cell-copy {
  margin-top: calc(var(--owner-strip-size) + 2px);
  margin-bottom: calc(var(--strip-size) + 4px);
}

.cell.side-left .cell-copy,
.cell.side-right .cell-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - var(--strip-size) - var(--owner-strip-size) - 10px);
  max-width: none;
  transform-origin: center;
}

.cell.side-left .cell-copy {
  transform: translate(-50%, -50%) rotate(-90deg);
}

.cell.side-right .cell-copy {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cell.side-left .cell-name,
.cell.side-right .cell-name {
  width: 100%;
  font-size: 7.8px;
  line-height: 1.05;
}

.corner .cell-copy {
  margin: 0 !important;
  width: auto;
  transform: none !important;
}

.corner .cell-name {
  font-size: 9.5px;
}

.cell-badge {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: calc(100% - 8px);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.82);
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.parking-pot {
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.14);
}

.cell-icon {
  font-size: 18px;
  z-index: 2;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  font-family: "Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
  text-rendering: optimizeLegibility;
}

.corner .cell-icon {
  font-size: 24px;
}

/* ─── Houses ─── */
.cell-houses {
  position: absolute;
  display: flex;
  gap: 1px;
  z-index: 3;
}

.cell.side-bottom .cell-houses {
  top: calc(var(--strip-size)+2px);
  left: 50%;
  transform: translateX(-50%);
}

.cell.side-top .cell-houses {
  bottom: calc(var(--strip-size)+2px);
  left: 50%;
  transform: translateX(-50%);
}

.cell.side-left .cell-houses {
  right: calc(var(--strip-size)+2px);
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.cell.side-right .cell-houses {
  left: calc(var(--strip-size)+2px);
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.house-marker {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.7);
  transition: transform 0.15s;
}

.house-marker:hover {
  transform: scale(1.2);
}

.hotel-marker {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.7);
  transition: transform 0.15s;
}

.hotel-marker:hover {
  transform: scale(1.15);
}

/* ─── Player Tokens ─── */
.cell-tokens {
  position: absolute;
  bottom: 2px;
  left: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  z-index: 7;
}

.cell.side-left .cell-tokens {
  bottom: auto;
  top: 2px;
  left: 2px;
}

.cell.side-right .cell-tokens {
  bottom: auto;
  top: 2px;
  right: 2px;
  left: auto;
}

.cell.side-top .cell-tokens {
  top: 2px;
  bottom: auto;
}

.token {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 12px currentColor;
  transition: transform 0.15s, box-shadow 0.15s;
}

.token-moving {
  position: absolute;
  z-index: 40;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.property-burst-label {
  --burst-color: var(--accent);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid var(--burst-color);
  color: #fff;
  pointer-events: none;
  animation: propertyBurst 1.25s ease forwards;
}

.property-burst-acquired {
  --burst-color: #2ecc71;
}

.property-burst-released {
  --burst-color: #e74c3c;
}

.property-burst-transferred {
  --burst-color: #f1c40f;
}

.cell-flash-acquired,
.cell-flash-released,
.cell-flash-transferred {
  animation: propertyCellFlash 0.8s ease;
}

.cell-flash-acquired {
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.28), inset 0 0 20px rgba(46, 204, 113, 0.08);
}

.cell-flash-released {
  box-shadow: 0 0 24px rgba(231, 76, 60, 0.28), inset 0 0 20px rgba(231, 76, 60, 0.08);
}

.cell-flash-transferred {
  box-shadow: 0 0 24px rgba(241, 196, 15, 0.28), inset 0 0 20px rgba(241, 196, 15, 0.08);
}

.cell-monopoly-highlight {
  animation: monopolyGlow 3.2s ease;
}

@keyframes propertyBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -70%);
  }
}

@keyframes monopolyGlow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 215, 0, 0), inset 0 0 0 rgba(255, 215, 0, 0);
  }

  18% {
    box-shadow: 0 0 30px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 60%, transparent), inset 0 0 20px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 26%, transparent);
  }

  45% {
    box-shadow: 0 0 20px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 42%, transparent), inset 0 0 14px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 18%, transparent);
  }

  70% {
    box-shadow: 0 0 26px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 52%, transparent), inset 0 0 18px color-mix(in srgb, var(--monopoly-glow, #ffd54a) 22%, transparent);
  }
}

@keyframes propertyCellFlash {
  0%, 100% { filter: brightness(1); }
  35% { filter: brightness(1.16); }
}

.token:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 18px currentColor;
}

/* ─── Mortgage ─── */
.cell.mortgaged-cell::after {
  content: '⛔';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 6;
}

/* ═══ SIDEBARS ═══ */
.sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 280px;
  max-width: 320px;
  height: 100%;
  z-index: 10;
  overflow: auto;
}

#sidebar-left {
  overflow: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}

.turn-info {
  text-align: center;
  padding: 14px;
  background: linear-gradient(135deg, rgba(18, 26, 50, 0.95), rgba(25, 35, 65, 0.9));
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.turn-info.my-turn {
  border-color: rgba(255, 215, 0, 0.34);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3), 0 0 26px rgba(255, 215, 0, 0.16), inset 0 0 28px rgba(255, 215, 0, 0.07);
}

.turn-info.my-turn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.14), transparent 68%);
  pointer-events: none;
}

.turn-info.other-turn {
  border-color: rgba(100, 140, 255, 0.2);
}

.turn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.turn-info .turn-player {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 18px currentColor;
}

.turn-info .turn-phase {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.turn-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.turn-meta span {
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(6, 10, 22, 0.45);
  border: 1px solid transparent;
}

.turn-meta .turn-jail-counter {
  color: #ffd58f;
  background: rgba(120, 60, 0, 0.24);
  border-color: rgba(255, 166, 0, 0.18);
}

.turn-meta .turn-money-negative {
  color: #ff8f8f;
  background: rgba(120, 18, 18, 0.24);
  border-color: rgba(255, 90, 90, 0.22);
}

.money-summary {
  position: relative;
  overflow: hidden;
  padding: 16px;
  background: linear-gradient(135deg, rgba(32, 39, 18, 0.95), rgba(18, 28, 44, 0.92));
  border-color: rgba(255, 215, 0, 0.28);
  min-height: 168px;
  display: flex;
  flex-direction: column;
}

.money-summary-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255, 245, 204, 0.72);
  margin-bottom: 8px;
}

.money-summary-amount {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.16);
  transition: transform 0.25s ease, color 0.25s ease;
}

.money-summary-amount.is-negative {
  color: #ff7b7b;
  text-shadow: 0 0 18px rgba(255, 80, 80, 0.18);
}

.money-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.money-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 96px;
  align-items: flex-end;
  max-height: 86px;
  overflow-y: auto;
  padding-right: 2px;
}

.money-history-list::-webkit-scrollbar {
  width: 4px;
}

.money-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.2);
  border-radius: 999px;
}

.money-history-list span {
  font-size: 10px;
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.42);
}

.money-history-list span.positive {
  color: var(--green);
}

.money-history-list span.negative {
  color: var(--red);
}

.money-summary-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.money-summary-meta span {
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.5);
}

.money-summary-delta {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
}

.money-summary-delta.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.money-summary-delta.positive {
  color: var(--green);
}

.money-summary-delta.negative {
  color: var(--red);
}

.money-summary-amount.pulse-positive {
  animation: moneyPulsePositive 0.55s ease;
}

.money-summary-amount.pulse-negative {
  animation: moneyPulseNegative 0.55s ease;
}

@keyframes moneyPulsePositive {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.06); color: #7dffae; }
}

@keyframes moneyPulseNegative {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(0.96); color: #ff978c; }
}

.action-buttons-main {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dice-tray .action-buttons-main {
  margin-top: 2px;
}

.dice-tray .action-buttons-main .btn {
  min-width: 140px;
}

/* Player Panels */
.player-panels-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(12, 18, 36, 0.92), rgba(9, 14, 28, 0.88));
  border: 1px solid rgba(100, 140, 255, 0.14);
}

.player-panels-container::-webkit-scrollbar {
  width: 4px;
}

.player-panels-container::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 2px;
}

.player-panel {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(14, 20, 40, 0.92), rgba(10, 15, 30, 0.84));
  border: 1px solid rgba(100, 140, 255, 0.08);
  border-radius: 10px;
  transition: all var(--transition);
  min-height: 62px;
  cursor: pointer;
}

.player-panel:hover {
  border-color: rgba(255, 215, 0, 0.18);
  transform: translateY(-1px);
}

.pp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.pp-order {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.money-float {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  animation: moneyFloat 1.35s ease forwards;
}

.money-float.positive {
  color: var(--green);
}

.money-float.negative {
  color: var(--red);
}

@keyframes moneyFloat {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-18px);
  }
}

.player-panel.active-player {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  background: rgba(255, 215, 0, 0.08);
}

.player-panel.bankrupt-player {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.pp-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

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

.pp-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pp-name {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-bright);
}

.pp-aka {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

.player-stats-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.player-stats-line {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 13, 28, 0.42);
  color: var(--text);
  font-size: 12px;
}

.pp-money {
  font-size: 17px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-top: 0;
}

.pp-money.is-negative {
  color: #ff7b7b;
  text-shadow: 0 0 18px rgba(255, 80, 80, 0.18);
}

.pp-mini-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.pp-mini-stats span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
}

.left-panel-float {
  right: 4px;
  top: -10px;
  font-size: 14px;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
}

.pp-stats {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
  flex-wrap: wrap;
  margin-top: 4px;
}

.pp-stats span {
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

.pp-props {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-top: 6px;
  max-height: 24px;
  overflow: hidden;
}

.pp-prop-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

.pp-prop-dot:hover {
  transform: scale(1.3);
  z-index: 10;
}

/* Log & Chat */
.chat-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.active-trades-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 220px;
  min-height: 92px;
  max-height: 220px;
  overflow: hidden;
}

.active-trades-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}

.active-trade-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.active-trade-row.related .active-trade-item {
  border-color: rgba(255, 215, 0, 0.24);
  background: rgba(53, 43, 10, 0.3);
}

.active-trade-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(100, 140, 255, 0.12);
  background: rgba(8, 13, 28, 0.42);
  color: var(--text);
}

.active-trade-item small {
  color: var(--text-dim);
}

.active-trades-empty {
  font-size: 11px;
  color: var(--text-dim);
}

.active-trades-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 5px;
}

.active-trades-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 999px;
}

.chat-section h3 {
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chat-messages {
  flex: 1;
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.3;
}

.chat-msg {
  background: rgba(7, 12, 26, 0.6);
  border: 1px solid rgba(100, 140, 255, 0.15);
  border-radius: 8px;
  padding: 6px 8px;
}

.chat-msg-own {
  border-color: rgba(255, 215, 0, 0.3);
  background: rgba(47, 40, 12, 0.4);
}

/* Inventory Panel */
.inventory-panel {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inventory-panel h3 {
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.inventory-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inventory-content::-webkit-scrollbar {
  width: 4px;
}

.inventory-content::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 2px;
}

.inventory-group {
  margin-bottom: 8px;
}

.inventory-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inventory-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.inventory-item:hover {
  border-color: rgba(100, 140, 255, 0.5);
  background: rgba(100, 140, 255, 0.1);
}

.inventory-item-special {
  border-color: rgba(255, 215, 0, 0.22);
  background: rgba(41, 34, 10, 0.32);
}

.inventory-item.mortgaged {
  opacity: 0.5;
}

.inventory-item-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.inventory-item-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-item-details {
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-item-houses {
  display: flex;
  gap: 1px;
  align-items: center;
}

.house-icon {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 1px;
}

.hotel-icon {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 1px;
}

.chat-msg-name {
  font-weight: 700;
}

.chat-msg-text {
  color: var(--text-dim);
}

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

.chat-input-row .input {
  padding: 7px 10px;
  font-size: 11px;
}

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

.modal-content {
  max-width: 760px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 22px;
  animation: modalIn 0.2s ease;
  border: 1px solid rgba(100, 140, 255, 0.16);
  background: linear-gradient(180deg, rgba(17, 24, 43, 0.98), rgba(9, 14, 28, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0)
  }
}

.modal-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-bright);
}

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

/* Tooltip */
.property-tooltip {
  position: fixed;
  z-index: 200;
  width: 240px;
  pointer-events: none;
  padding: 14px;
  background: rgba(12, 16, 35, 0.98);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  font-size: 11px;
}

.tooltip-impact {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.16);
  color: var(--accent);
  font-weight: 800;
  text-align: center;
}

.cell-action-popup {
  position: fixed;
  z-index: 260;
  transform: translate(-50%, -100%);
  min-width: 170px;
  max-width: 220px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(12, 16, 35, 0.98);
  border: 1px solid rgba(255, 215, 0, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.cell-action-popup.popup-below {
  transform: translate(-50%, 0);
}

.cell-action-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 8px;
  text-align: center;
}

.cell-action-hint {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.35;
}

.cell-action-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(8, 13, 28, 0.55);
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.cell-action-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--text-dim);
}

.cell-action-stat strong {
  color: var(--text-bright);
  font-size: 11px;
}

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

.tooltip-color-bar {
  height: 5px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.tooltip-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-bright);
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  color: var(--text-dim);
}

.tooltip-row span:last-child {
  color: var(--text);
  font-weight: 600;
}

.tooltip-owner {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-glass);
  font-weight: 700;
  font-size: 12px;
}

/* Trade / Build */
.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-grid-review {
  margin-top: 8px;
}

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

.trade-modal-head {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trade-modal-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.12);
  color: var(--text-bright);
  font-size: 11px;
  font-weight: 700;
}

.trade-target-row,
.trade-money-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trade-money-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-money-input {
  text-align: right;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.trade-money-quick-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.trade-money-quick-row .btn {
  min-width: 54px;
}

.trade-money-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.trade-money-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}

.trade-money-control input[type="range"] {
  width: 100%;
}

.trade-guard-note {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 13, 28, 0.42);
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.trade-cash-line {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
}

.trade-cash-line.positive {
  color: var(--green);
}

.trade-cash-line.negative {
  color: var(--red);
}

.log-trade-btn {
  margin-left: 8px;
}

.trade-target-row {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(100, 140, 255, 0.1);
}

.trade-target-row label,
.trade-money-row label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}

.trade-side {
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 15, 30, 0.78), rgba(8, 13, 28, 0.54));
  border: 1px solid rgba(100, 140, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trade-side h4 {
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--accent);
}

.trade-side-head {
  margin-bottom: 10px;
}

.trade-side-sub {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
}

.trade-asset-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 40px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 2px;
}

.trade-asset-list::-webkit-scrollbar {
  width: 5px;
}

.trade-asset-list::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 999px;
}

.trade-prop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  background: rgba(10, 15, 30, 0.6);
  border-radius: var(--radius);
  margin-bottom: 3px;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 11px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.trade-prop-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.trade-prop-item.selected {
  border-color: var(--accent);
  background: rgba(255, 215, 0, 0.1);
}

.trade-prop-item.readonly {
  cursor: default;
}

.trade-prop-item.readonly:hover {
  border-color: transparent;
}

.trade-prop-color {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.trade-empty-state {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(10, 15, 30, 0.4);
  color: var(--text-dim);
  font-size: 11px;
  text-align: center;
}

.trade-special-card,
.trade-special-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.14);
  color: var(--text-bright);
  font-size: 11px;
}

.trade-modal .modal-actions {
  position: sticky;
  bottom: -22px;
  padding-top: 12px;
  background: linear-gradient(180deg, rgba(9, 14, 28, 0), rgba(9, 14, 28, 0.96) 38%);
}

.trade-special-card small {
  display: block;
  color: var(--text-dim);
}

.trade-card-input {
  width: 72px;
  text-align: right;
  font-weight: 800;
}

.trade-special-line {
  justify-content: flex-start;
}

.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.build-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(10, 15, 30, 0.6);
  border-radius: var(--radius);
  border: 1px solid var(--border-glass);
}

.build-item-name {
  font-size: 11px;
  font-weight: 600;
}

.build-item-info {
  font-size: 10px;
  color: var(--text-dim);
}

.build-item-btns {
  display: flex;
  gap: 3px;
}

/* Winner */
.winner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.winner-trophy {
  font-size: 80px;
  margin-bottom: 20px;
  animation: bounce 1s infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-20px)
  }
}

.winner-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.winner-sub {
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 8px;
}

.winner-rematch-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-bright);
}

.winner-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Auction */
.auction-overlay {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 18, 0.42);
  backdrop-filter: blur(8px);
}

.auction-modal {
  width: min(560px, calc(100vw - 32px));
  padding: 22px;
  text-align: center;
  border-color: rgba(255, 215, 0, 0.24);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 215, 0, 0.08);
}

.auction-eyebrow {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.auction-lot-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-bright);
  margin-top: 4px;
}

.auction-timer {
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--accent);
  border: 2px solid rgba(255, 215, 0, 0.28);
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.1);
}

.auction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.auction-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.72);
  border: 1px solid rgba(100, 140, 255, 0.18);
  font-size: 10px;
  color: var(--text-dim);
}

.auction-chip.active {
  color: var(--text-bright);
  border-color: rgba(255, 215, 0, 0.3);
}

.auction-help {
  font-size: 10px;
  color: var(--text-dim);
}

.auction-current-bid {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin: 6px 0;
}

.auction-bidder {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.auction-quick-bids {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 8px;
}

.auction-quick-bids .btn {
  min-height: 48px;
  font-size: 16px;
  font-weight: 800;
}

/* Notification */
.notification {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 500;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  max-width: 320px;
}

/* Hotkeys Hint */
.hotkeys-hint {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 400;
  padding: 8px 12px;
  background: rgba(10, 15, 30, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  font-size: 10px;
  color: var(--text-dim);
  display: none;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 400px;
}

.hotkeys-hint.visible {
  display: flex;
}

.hotkey {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.hotkey-key {
  background: rgba(100, 140, 255, 0.15);
  border: 1px solid var(--border-glass);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 9px;
  color: var(--text-bright);
  text-transform: uppercase;
}

#toggle-hotkeys {
  padding: 4px 8px;
  font-size: 10px;
  min-width: 24px;
}

.notification.error {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.9), rgba(192, 57, 43, 0.9));
  color: #fff;
}

.notification.info {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(41, 128, 185, 0.9));
  color: #fff;
}

.event-banner {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 450;
  width: min(560px, calc(100vw - 32px));
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: linear-gradient(135deg, rgba(15, 23, 46, 0.96), rgba(25, 18, 9, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 35px rgba(255, 215, 0, 0.14);
  text-align: center;
  animation: eventBannerIn 0.28s ease;
}

.event-banner-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.event-banner-text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-bright);
}

@keyframes eventBannerIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

  to {
    transform: translateX(0);
    opacity: 1
  }
}

@keyframes fadeOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0
  }
}

/* ═══ RESPONSIVE ═══ */
@media (max-height: 800px) {
  :root {
    --strip-size: 16px;
    --owner-strip-size: 10px;
  }
}

@media (min-width: 1400px) {
  .sidebar-left {
    flex: 0 0 320px;
    max-width: 380px;
  }

  .sidebar-right {
    flex: 0 0 380px;
    max-width: 460px;
  }

  .game-log-center {
    width: calc(100% - 120px);
    max-width: 700px;
    top: calc(50% + 100px);
  }

  .dice-display-3d {
    gap: 30px;
  }
}

@media (min-width: 1600px) {
  .game-log-center {
    width: calc(100% - 140px);
    max-width: 750px;
    top: calc(50% + 110px);
  }

  .dice-display-3d {
    gap: 40px;
  }
}

@media (max-width: 1000px) {
  .game-layout {
    flex-direction: column;
    align-items: center;
    height: auto;
    overflow-y: auto;
  }

  .board {
    height: calc(100vw - 12px);
    width: calc(100vw - 12px);
  }

  .sidebar-left,
  .sidebar-right {
    width: 100%;
    max-width: none;
    flex: none;
    height: auto;
  }

  .dice-area-center {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 10px 0;
  }

  .game-log-center {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 20px);
    max-width: none;
    margin: 10px 10px;
  }
}

@media (max-width: 600px) {
  .hotkeys-hint {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .room-lobby-grid {
    grid-template-columns: 1fr;
  }

  .room-lobby-sidebar {
    position: static;
  }

  #lobby-room .player-list {
    grid-template-columns: 1fr;
  }

  .rule-range-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .dice-tray {
    min-width: 0;
    width: 100%;
  }

  .topbar-value-row {
    width: 100%;
  }

  .topbar-value-row .btn,
  .topbar-block .btn {
    width: 100%;
  }

  .active-trades-panel {
    max-height: none;
  }

  .room-code-row {
    flex-direction: column;
    align-items: stretch;
  }

  .room-code-row .btn {
    width: 100%;
  }

  .game-title {
    font-size: 36px;
  }

  .player-panel {
    padding: 6px 8px;
    min-height: 50px;
  }

  .pp-color {
    width: 16px;
    height: 16px;
  }

  .pp-name {
    font-size: 12px;
  }

  .pp-money {
    font-size: 12px;
  }

  .die-3d {
    width: 50px;
    height: 50px;
  }

  .die-face {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .die-face.front {
    transform: translateZ(25px);
  }

  .die-face.back {
    transform: rotateY(180deg) translateZ(25px);
  }

  .die-face.right {
    transform: rotateY(90deg) translateZ(25px);
  }

  .die-face.left {
    transform: rotateY(-90deg) translateZ(25px);
  }

  .die-face.top {
    transform: rotateX(90deg) translateZ(25px);
  }

  .die-face.bottom {
    transform: rotateX(-90deg) translateZ(25px);
  }

  .btn {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
