/* ═══════════════════════════════════════════════
   GASTRO HUSTLE
   Elegant dark theme with gold & burgundy accents
   ═══════════════════════════════════════════════ */

:root {
  --gold: #d4a04a;
  --gold-light: #f0d080;
  --gold-dark: #8b6914;
  --gold-glow: rgba(212, 160, 74, 0.3);
  --burgundy: #722f37;
  --burgundy-light: #a04050;
  --wine: #4a1528;
  --wine-deep: #2a0a18;
  --cream: #f5f0e8;
  --cream-dark: #d4c8b0;
  --charcoal: #1a1a1a;
  --dark: #0d0d0d;
  --darker: #080808;
  --surface: #151515;
  --surface-light: #1e1e1e;
  --border: rgba(212, 160, 74, 0.15);
  --border-strong: rgba(212, 160, 74, 0.30);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --amber: #fbbf24;
  --text: #e8e0d4;
  --text-dim: #8a8078;
  --text-bright: #fff;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", "JetBrains Mono", monospace;
  --font-display: "Georgia", "Palatino", serif;
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: 28px;
}

/* ── Screens ── */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active { display: flex; flex-direction: column; }

/* ═══════════ TITLE SCREEN ═══════════ */
.title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.title-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(114, 47, 55, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(212, 160, 74, 0.10) 0%, transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(212, 160, 74, 0.02) 40px,
      rgba(212, 160, 74, 0.02) 41px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(212, 160, 74, 0.02) 40px,
      rgba(212, 160, 74, 0.02) 41px
    );
  pointer-events: none;
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--gold);
  text-shadow:
    0 0 40px rgba(212, 160, 74, 0.4),
    0 2px 0 var(--gold-dark);
  letter-spacing: 0.15em;
  position: relative;
  z-index: 1;
}

.game-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--burgundy-light);
  font-style: italic;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.game-tagline {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

.title-menu {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  z-index: 1;
  width: 100%;
  max-width: 500px;
}

/* Difficulty */
.diff-select { text-align: center; width: 100%; }
.diff-select h3 {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.diff-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.diff-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 120px;
  font-family: inherit;
  font-size: 0.8rem;
}

.diff-btn:hover { border-color: var(--gold); background: var(--surface-light); }
.diff-btn.selected {
  border-color: var(--gold);
  background: rgba(212, 160, 74, 0.12);
  box-shadow: 0 0 20px rgba(212, 160, 74, 0.15);
}

.diff-emoji { font-size: 1.5rem; }
.diff-label { font-weight: 600; }

.diff-info {
  margin-top: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* Day slider */
.day-select {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.day-select label { color: var(--text-dim); font-size: 0.8rem; white-space: nowrap; }
.day-select input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  height: 4px;
}
#day-slider-label { color: var(--gold); font-weight: 600; min-width: 80px; text-align: right; }

.title-footer {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--gold); background: var(--surface-light); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--burgundy), var(--wine));
  border-color: var(--burgundy-light);
  color: var(--cream);
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--burgundy-light), var(--burgundy));
  box-shadow: 0 0 20px rgba(114, 47, 55, 0.3);
}

.btn-secondary {
  background: var(--surface-light);
  border-color: var(--border-strong);
}

.btn-buy { background: rgba(74, 222, 128, 0.12); border-color: var(--green); color: var(--green); }
.btn-buy:hover { background: rgba(74, 222, 128, 0.20); }
.btn-sell { background: rgba(248, 113, 113, 0.12); border-color: var(--red); color: var(--red); }
.btn-sell:hover { background: rgba(248, 113, 113, 0.20); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-dim); }

.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.72rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 0.9rem; }
.btn-link { background: none; border: none; color: var(--text-dim); text-decoration: underline; font-size: 0.8rem; }
.btn-link:hover { color: var(--gold); }
.btn-icon { background: none; border: none; font-size: 1.2rem; padding: 0.25rem; cursor: pointer; }

.btn-encounter {
  display: block;
  width: 100%;
  margin: 0.4rem 0;
  padding: 0.75rem;
  text-align: left;
  background: var(--surface);
  border-color: var(--border-strong);
}
.btn-encounter:hover { border-color: var(--gold); background: rgba(212, 160, 74, 0.08); }

.btn-nextday {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 1rem;
  padding: 0.85rem;
  letter-spacing: 0.05em;
}

/* ═══════════ HUD ═══════════ */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--dark) 100%);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.hud-left, .hud-right { display: flex; gap: 1.25rem; align-items: center; }
.hud-center { text-align: center; }

.hud-item { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.hud-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.hud-value { font-size: 0.95rem; font-weight: 700; }
.hud-value.positive { color: var(--green); }
.hud-value.negative { color: var(--red); }

.hud-city-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--gold); font-weight: 700; }
.hud-country { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.15em; text-transform: uppercase; }
.hud-day { font-size: 0.8rem; color: var(--cream-dark); margin-top: 0.15rem; }

.day-progress {
  width: 120px;
  height: 3px;
  background: var(--surface-light);
  border-radius: 2px;
  margin: 0.25rem auto 0;
  overflow: hidden;
}
.day-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s;
  border-radius: 2px;
}

.scandal-bar {
  width: 80px;
  height: 6px;
  background: var(--surface-light);
  border-radius: 3px;
  overflow: hidden;
}
.scandal-fill {
  height: 100%;
  background: var(--amber);
  transition: width 0.3s;
  border-radius: 3px;
}
.scandal-fill.medium { background: #f59e0b; }
.scandal-fill.high { background: #ef4444; }
.scandal-fill.critical { background: #dc2626; animation: pulse-red 0.8s infinite; }

.scandal-val { font-size: 0.65rem; color: var(--text-dim); }

.pop { animation: pop 0.3s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.changed { animation: flash-gold 0.4s ease; }
@keyframes flash-gold {
  0% { color: var(--gold-light); }
  100% {}
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ═══════════ GAME LAYOUT ═══════════ */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  flex: 1;
  overflow: hidden;
}

/* ═══════════ MARKET PANEL ═══════════ */
.market-panel {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 90px);
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.market-header h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
}

.market-tabs { display: flex; gap: 0.25rem; }
.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); border-color: var(--gold); }
.tab-btn.active { background: rgba(212, 160, 74, 0.12); border-color: var(--gold); color: var(--gold); }

.market-table-wrap { overflow-x: auto; }

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.market-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.market-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid rgba(212, 160, 74, 0.06);
  vertical-align: middle;
}
.market-table tr:hover { background: rgba(212, 160, 74, 0.04); }

.asset-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
}
.asset-name:hover .asset-label { color: var(--gold); }
.asset-emoji { font-size: 1.1rem; }
.asset-label { font-weight: 600; }

.contraband-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
}

.contraband-row { background: rgba(248, 113, 113, 0.03); }

.price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sparkline-cell { padding: 0.3rem 0.4rem !important; }
.sparkline { display: block; }

.trend { font-weight: 700; font-size: 0.9rem; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.trend.flat { color: var(--text-dim); }

.owned { text-align: center; color: var(--text-dim); }
.pnl { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.75rem; }
.pnl.positive { color: var(--green); }
.pnl.negative { color: var(--red); }

.actions { white-space: nowrap; }
.actions .btn { margin-left: 0.2rem; }

/* ── Global Tab ── */
.global-city-th { font-size: 0.9rem; text-align: center; padding: 0.4rem 0.3rem !important; }
.global-price { text-align: center; font-variant-numeric: tabular-nums; font-size: 0.72rem; white-space: nowrap; }
.global-cheap { color: var(--green); font-weight: 700; }
.global-expensive { color: var(--red); font-weight: 700; }
.global-current { background: rgba(212, 160, 74, 0.08); }

/* ── Travel Trends (Insider Perk) ── */
.travel-trends { display: flex; gap: 0.35rem; margin-top: 0.25rem; flex-wrap: wrap; }
.trend-tag { font-size: 0.65rem; padding: 0.1rem 0.3rem; border-radius: 3px; background: var(--surface-light); }
.trend-tag.up { color: var(--green); }
.trend-tag.down { color: var(--red); }
.trend-tag.flat { color: var(--text-dim); }

/* ═══════════ SIDE PANEL ═══════════ */
.side-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.side-panel h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.btn-action {
  font-size: 0.75rem;
  padding: 0.5rem;
  text-align: center;
}
.btn-action.available {
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}

.chart-section canvas {
  width: 100%;
  background: var(--dark);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ── News Feed ── */
.news-feed {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.log-entry {
  padding: 0.35rem 0.5rem;
  background: var(--dark);
  border-radius: 4px;
  border-left: 3px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.4;
}
.log-entry.buy { border-left-color: var(--green); }
.log-entry.sell-profit { border-left-color: var(--green); }
.log-entry.sell-loss { border-left-color: var(--red); }
.log-entry.travel { border-left-color: var(--gold); }
.log-entry.travel-free { border-left-color: var(--gold); }
.log-entry.event-good { border-left-color: var(--green); background: var(--green-dim); }
.log-entry.event-bad { border-left-color: var(--red); background: var(--red-dim); }
.log-entry.event-terrible { border-left-color: #dc2626; background: rgba(220, 38, 38, 0.15); }
.log-entry.bank { border-left-color: var(--amber); }
.log-entry.bank-repay { border-left-color: var(--green); }
.log-entry.bank-interest { border-left-color: var(--red); }
.log-entry.perk { border-left-color: var(--gold); background: rgba(212, 160, 74, 0.08); }
.log-entry.mission { border-left-color: #818cf8; }
.log-entry.mission-done { border-left-color: #818cf8; background: rgba(129, 140, 248, 0.10); }
.log-entry.upgrade { border-left-color: var(--amber); }

.log-day {
  color: var(--text-dim);
  font-size: 0.62rem;
  margin-right: 0.4rem;
}

/* ═══════════ MODALS ═══════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.active { display: flex; animation: fadeIn 0.2s ease; }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-sm { max-width: 420px; }

.modal-content h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

.modal-hint { color: var(--text-dim); font-size: 0.8rem; margin-bottom: 1rem; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Trade Modal ── */
.trade-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.trade-info strong { color: var(--gold); }

.trade-qty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.trade-qty-row input {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
}
.trade-qty-row input:focus { outline: none; border-color: var(--gold); }

.preset-buttons {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}
.preset-btn { flex: 1; text-align: center; }

.trade-total {
  font-size: 1.1rem;
  text-align: center;
  margin: 0.75rem 0;
  color: var(--cream);
}
.trade-total strong { color: var(--gold-light); }

#trade-confirm { width: 100%; font-size: 1rem; padding: 0.75rem; }

/* ── Travel Modal ── */
.travel-list { display: flex; flex-direction: column; gap: 0.5rem; }

.travel-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.travel-option:hover { border-color: var(--gold); background: rgba(212, 160, 74, 0.06); }
.travel-option.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.travel-city { display: flex; align-items: center; gap: 0.75rem; }
.travel-emoji { font-size: 1.5rem; }
.travel-name { font-weight: 600; color: var(--cream); }
.travel-desc { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.15rem; }
.travel-cost { color: var(--gold); font-weight: 600; font-size: 0.85rem; white-space: nowrap; text-align: right; }

/* ── Bank Modal ── */
.bank-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.bank-info strong { color: var(--gold); }

.bank-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.bank-row input {
  flex: 1;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
}
.bank-row input:focus { outline: none; border-color: var(--gold); }
.bank-row span { font-size: 0.8rem; color: var(--text-dim); }

/* ── Perks ── */
.perks-list { display: flex; flex-direction: column; gap: 0.5rem; }

.perk-item {
  padding: 0.75rem 1rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.perk-item:hover { border-color: var(--gold); }
.perk-item.owned { border-color: var(--green); background: var(--green-dim); cursor: default; }
.perk-item.disabled { opacity: 0.4; cursor: not-allowed; }

.perk-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.perk-emoji { font-size: 1.2rem; }
.perk-name { font-weight: 600; flex: 1; }
.perk-cost { color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.perk-desc { font-size: 0.75rem; color: var(--text-dim); }

/* ── Missions ── */
.missions-list { display: flex; flex-direction: column; gap: 0.5rem; }

.mission-item {
  padding: 0.75rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mission-text { font-size: 0.85rem; margin-bottom: 0.3rem; }
.mission-reward { font-size: 0.75rem; color: var(--gold); margin-bottom: 0.3rem; }

.mission-progress-bar {
  height: 4px;
  background: var(--surface-light);
  border-radius: 2px;
  overflow: hidden;
}
.mission-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.3s;
}
.mission-pct { font-size: 0.65rem; color: var(--text-dim); text-align: right; margin-top: 0.15rem; }

.mission-offer-text { font-size: 0.9rem; margin-bottom: 0.5rem; }
.mission-offer-reward { color: var(--gold); font-weight: 600; margin-bottom: 1rem; }
.mission-offer-buttons { display: flex; gap: 0.5rem; }
.mission-offer-buttons .btn { flex: 1; }

.empty-state { color: var(--text-dim); text-align: center; padding: 2rem; font-size: 0.85rem; }

/* ── Encounters ── */
.encounter-modal { text-align: center; }
.encounter-text { font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.6; color: var(--cream); }
.encounter-choices { display: flex; flex-direction: column; gap: 0.3rem; }
.encounter-result {
  font-size: 0.9rem;
  padding: 1rem;
  background: var(--dark);
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  color: var(--cream);
  margin-top: 0.5rem;
}

/* ── Black Market ── */
.blackmarket-list { display: flex; flex-direction: column; gap: 0.5rem; }

.bm-deal {
  padding: 0.75rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.bm-discount { color: var(--green); font-weight: 700; font-size: 0.85rem; }
.bm-price { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.8rem; }
.bm-market { color: var(--text-dim); text-decoration: line-through; }
.bm-offer { color: var(--gold); font-weight: 600; }
.bm-buy { width: 100%; }

/* ── AI Bot ── */
.aibot-list { display: flex; flex-direction: column; gap: 0.5rem; }

.ai-rec {
  padding: 0.75rem;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ai-rec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.ai-signal { font-weight: 700; font-size: 0.8rem; padding: 0.15rem 0.5rem; border-radius: 4px; }
.signal-buy .ai-signal { background: var(--green-dim); color: var(--green); }
.signal-sell .ai-signal { background: var(--red-dim); color: var(--red); }
.signal-hold .ai-signal { background: rgba(251,191,36,0.1); color: var(--amber); }
.ai-rec-price { font-size: 0.75rem; color: var(--text-dim); }
.ai-rec-reason { font-size: 0.8rem; color: var(--cream); margin-top: 0.25rem; }
.ai-rec-cities { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ── Asset Detail ── */
.detail-desc { color: var(--text-dim); font-style: italic; margin-bottom: 1rem; font-size: 0.85rem; }

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}
.detail-stats strong { color: var(--gold); display: block; }

.detail-cities { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }

.city-price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  background: var(--dark);
}
.city-price-row.current { border: 1px solid var(--gold); }
.city-price-row.cheapest { background: var(--green-dim); }
.city-price-row.priciest { background: var(--red-dim); }

/* ═══════════ GAME OVER ═══════════ */
.gameover-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

.go-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.go-rank-emoji { font-size: 4rem; margin-bottom: 0.5rem; }
.go-rank {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
.go-subtitle { color: var(--text-dim); font-style: italic; margin-bottom: 1.5rem; }
.gameover-container.bankrupt .go-title { color: var(--red); }
.gameover-container.bankrupt .go-rank { color: var(--red); }
.gameover-container.bankrupt .go-subtitle { color: var(--red-dim); }

.go-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  width: 100%;
}
.go-stat { text-align: center; }
.go-stat-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); display: block; }
.go-stat-value { font-size: 1.2rem; font-weight: 700; color: var(--gold); }

#go-chart {
  max-width: 500px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.go-score-entry {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.go-score-entry input {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  width: 200px;
}
.go-score-entry input:focus { outline: none; border-color: var(--gold); }

/* ── Scores ── */
.scores-list { display: flex; flex-direction: column; gap: 0.3rem; }
.score-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: var(--dark);
  border-radius: 4px;
  font-size: 0.8rem;
}
.score-rank { color: var(--gold); font-weight: 700; min-width: 2rem; }
.score-name { font-weight: 600; flex: 1; }
.score-val { color: var(--green); font-weight: 700; }
.score-meta { color: var(--text-dim); font-size: 0.7rem; }

/* ── Achievements ── */
.achievements-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.achievement-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem;
  background: var(--dark);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  align-items: center;
}
.achievement-item.earned { border-color: var(--gold); background: rgba(212, 160, 74, 0.06); }
.achievement-item.locked { opacity: 0.5; }
.ach-emoji { font-size: 1.3rem; }
.ach-name { font-weight: 600; font-size: 0.8rem; }
.ach-desc { font-size: 0.7rem; color: var(--text-dim); }

/* ── Help ── */
.help-content h3 { color: var(--gold); margin-top: 1rem; margin-bottom: 0.3rem; font-size: 0.9rem; }
.help-content p { color: var(--text-dim); font-size: 0.8rem; line-height: 1.6; }

/* ═══════════ TOAST ═══════════ */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--cream);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(20px); }

.toast-info { background: rgba(30, 30, 30, 0.9); }
.toast-success { background: rgba(20, 50, 20, 0.9); border-color: var(--green); }
.toast-error { background: rgba(50, 20, 20, 0.9); border-color: var(--red); }
.toast-warn { background: rgba(50, 40, 10, 0.9); border-color: var(--amber); }
.toast-achievement { background: rgba(40, 30, 10, 0.9); border-color: var(--gold); color: var(--gold-light); }

/* ═══════════ TRAVEL TRANSITION ═══════════ */
.travel-transition {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--dark);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.travel-transition.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.travel-transition-content { text-align: center; }

.travel-plane {
  font-size: 3rem;
  animation: fly 1.2s ease-in-out;
}

@keyframes fly {
  0% { transform: translateX(-100px) scale(0.5); opacity: 0; }
  50% { transform: translateX(0) scale(1.2); opacity: 1; }
  100% { transform: translateX(100px) scale(0.5); opacity: 0; }
}

.travel-transition-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold);
  margin-top: 1rem;
  letter-spacing: 0.1em;
}

/* ═══════════ FOOTER ═══════════ */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 1rem;
  background: rgba(10, 10, 10, 0.92);
  border-top: 1px solid var(--border);
  z-index: 90;
  font-size: 0.6rem;
  backdrop-filter: blur(4px);
}

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

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-link:hover {
  color: var(--gold);
}

/* ── Legal Modals ── */
.legal-modal {
  max-width: 650px;
}

.legal-text {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.legal-text h3 {
  color: var(--gold);
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
}

.legal-text p {
  margin-bottom: 0.5rem;
}

.legal-text ul {
  margin: 0.3rem 0 0.5rem 1.5rem;
}

.legal-text li {
  margin-bottom: 0.25rem;
}

.legal-link {
  color: var(--gold);
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
}

/* ═══════════ SCROLLBAR ═══════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .side-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
  }
  .market-panel {
    max-height: none;
  }
  .hud {
    flex-direction: column;
    gap: 0.5rem;
  }
  .hud-left, .hud-right {
    width: 100%;
    justify-content: center;
  }
  .go-stats { grid-template-columns: repeat(2, 1fr); }
  .achievements-list { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .diff-buttons { flex-direction: column; }
  .market-table { font-size: 0.72rem; }
  .action-buttons { grid-template-columns: 1fr; }
  .site-footer {
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
    padding: 0.4rem 0.5rem;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
}
