/* ═══════════════════════════════════════════════════════════
   LARX EMPIRE — Main Stylesheet v2
   Dark cyber theme — serious + gamer
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Orbitron:wght@700;900&display=swap');

:root {
  --bg-deep:     #04080f;
  --bg-card:     #0a1220;
  --bg-card2:    #0f1a2e;
  --bg-hover:    #152036;
  --border:      rgba(0,200,255,0.10);
  --border-glow: rgba(0,200,255,0.30);

  --blue:        #00c8ff;
  --blue-dim:    rgba(0,200,255,0.12);
  --purple:      #a855f7;
  --purple-dim:  rgba(168,85,247,0.12);
  --green:       #00ff88;
  --green-dim:   rgba(0,255,136,0.12);
  --gold:        #ffd700;
  --gold-dim:    rgba(255,215,0,0.12);
  --orange:      #fb923c;
  --red:         #ef4444;
  --pink:        #ec4899;
  --teal:        #06b6d4;

  --text:        #dde6f0;
  --text-secondary: #8da0b8;
  --text-muted:  #3f5168;

  --sidebar-w:   250px;
  --ticker-h:    34px;
  --topbar-h:    58px;

  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px rgba(0,200,255,0.12);

  --t1: #fb923c;
  --t2: #3b82f6;
  --t3: #0ea5e9;
  --t4: #00c8ff;
  --t5: #a855f7;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ─── Stars canvas ───────────────────────────────────────── */
#stars-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ─── Animated background grid ──────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,200,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ─── Layout ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: linear-gradient(180deg, #070e1c 0%, #040810 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100; overflow-y: auto; scrollbar-width: none;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.logo-icon { font-size: 26px; filter: drop-shadow(0 0 12px #ffd700); }
.logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 20px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(135deg, #00c8ff, #a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sub { font-size: 9px; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; margin-top: -2px; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0,200,255,0.3);
}
.user-name { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.3; }
.user-coins { font-size: 11px; color: var(--gold); font-weight: 700; }
.user-clan { font-size: 10px; color: var(--purple); margin-top: 1px; }
.user-info { overflow: hidden; min-width: 0; }

.sidebar-level { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.level-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.level-badge {
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #000; font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: 20px; letter-spacing: 0.5px;
}
.level-xp { font-size: 10px; color: var(--text-muted); }
.level-bar-wrap { height: 3px; background: var(--bg-hover); border-radius: 2px; overflow: hidden; }
.level-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 2px; transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(0,200,255,0.6);
}

.sidebar-nav { flex: 1; padding: 8px 8px; }
.nav-section-title {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 10px 10px 4px;
  font-family: 'Orbitron', monospace;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  transition: all 0.15s; margin-bottom: 1px; text-decoration: none;
  position: relative; overflow: hidden;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(0,200,255,0.12), rgba(168,85,247,0.08));
  color: var(--blue); border: 1px solid rgba(0,200,255,0.18);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(180deg, var(--blue), var(--purple));
  border-radius: 0 2px 2px 0;
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 10px;
}
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ─── Main Content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh; display: flex; flex-direction: column; flex: 1;
  min-width: 0;
}

/* ─── Ticker ─────────────────────────────────────────────── */
.ticker-bar {
  height: var(--ticker-h); background: rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  overflow: hidden; padding: 0 16px; font-size: 11px;
}
.ticker-inner { display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; width: 100%; }
.ticker-label { color: var(--text-muted); font-weight: 700; flex-shrink: 0; font-family: 'Orbitron', monospace; font-size: 9px; letter-spacing: 1px; }
.ticker-scroll { display: inline-flex; gap: 28px; animation: ticker-slide 40s linear infinite; }
@keyframes ticker-slide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-item-pos { color: var(--green); }
.ticker-item-neg { color: var(--red); }

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
  background: rgba(4,8,15,0.85); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px); position: sticky;
  top: var(--ticker-h); z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-title { font-size: 15px; font-weight: 700; font-family: 'Orbitron', monospace; letter-spacing: 1px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); font-size: 20px; padding: 4px; }

.topbar-wealth { text-align: right; }
.wealth-label { font-size: 10px; color: var(--text-muted); display: block; }
.wealth-value { font-size: 14px; font-weight: 800; color: var(--gold); font-family: 'Orbitron', monospace; }

.btn-collect {
  background: linear-gradient(135deg, var(--green), #00cc66); color: #000;
  font-weight: 800; font-size: 11px; padding: 6px 14px; border-radius: 20px;
  border: none; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 4px;
  animation: bounce-btn 1.5s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(0,255,136,0.35);
}
@keyframes bounce-btn { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.btn-collect:hover { text-decoration: none; }
.btn-ai {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; font-weight: 700; font-size: 11px; padding: 6px 12px; border-radius: 20px;
}
.btn-ai:hover { text-decoration: none; opacity: 0.9; }

/* ─── Page Body ──────────────────────────────────────────── */
.page-body {
  flex: 1; padding: 20px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}

/* ─── Empire layout: fluid 2-col that stacks ────────────── */
.empire-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}
@media (max-width: 1100px) {
  .empire-layout { grid-template-columns: 1fr; }
  .empire-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  .empire-sidebar { grid-template-columns: 1fr; }
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff;
  border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,200,255,0.2); }
.btn-secondary {
  background: var(--bg-card2); color: var(--text); border: 1px solid var(--border);
  padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--blue); }
.btn-success {
  background: linear-gradient(135deg, var(--green), #00cc66); color: #000;
  border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 800;
  cursor: pointer; transition: all 0.2s;
}
.btn-success:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-success:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-danger {
  background: linear-gradient(135deg, var(--red), #dc2626); color: #fff;
  border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.btn-danger:hover { opacity: 0.85; }
.btn-outline {
  background: transparent; color: var(--text-secondary); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f97316); color: #000;
  border: none; padding: 8px 18px; border-radius: 8px; font-weight: 800; font-size: 12px;
  cursor: pointer; transition: all 0.2s;
}
.btn-gold:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,215,0,0.25); }
.btn-gold:disabled { opacity: 0.4; cursor: not-allowed; transform: none; background: var(--bg-hover); color: var(--text-muted); }

.btn-sm  { padding: 5px 11px !important; font-size: 11px !important; }
.btn-lg  { padding: 13px 26px !important; font-size: 14px !important; }
.btn-full { width: 100%; justify-content: center; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden;
  transition: all 0.25s;
}
.stat-card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(circle at 80% 20%, rgba(0,200,255,0.04), transparent 60%);
  pointer-events: none;
}
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; font-family: 'Orbitron', monospace; }
.stat-value { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1; font-family: 'Orbitron', monospace; }
.stat-value.gold { color: var(--gold); }
.stat-value.green { color: var(--green); }
.stat-value.blue { color: var(--blue); }
.stat-value.purple { color: var(--purple); }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.stat-icon { font-size: 24px; margin-bottom: 8px; }

/* ─── Business Cards ─────────────────────────────────────── */
.business-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }

.business-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; position: relative;
  overflow: hidden; transition: all 0.25s; cursor: default;
}
.business-card:hover { transform: translateY(-3px); border-color: var(--border-glow); box-shadow: var(--shadow-glow); }
.business-card.tier-1 { border-top: 2px solid var(--t1); }
.business-card.tier-2 { border-top: 2px solid var(--t2); }
.business-card.tier-3 { border-top: 2px solid var(--t3); }
.business-card.tier-4 { border-top: 2px solid var(--t4); }
.business-card.tier-5 { border-top: 2px solid var(--t5); box-shadow: 0 0 20px rgba(168,85,247,0.12); }
.business-card.unowned { border-style: dashed; opacity: 0.78; }
.business-card.unowned:hover { opacity: 1; }
.business-card.locked { opacity: 0.4; filter: grayscale(0.7); cursor: not-allowed; }
.business-card.has-income { animation: card-pulse 2.5s ease-in-out infinite; }
@keyframes card-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
  50% { box-shadow: 0 0 16px rgba(255,215,0,0.18); }
}

.bc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.bc-emoji { font-size: 32px; line-height: 1; }
.bc-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; }

.tier-badge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.tier-1-badge { background: rgba(251,146,60,0.15); color: var(--t1); border: 1px solid rgba(251,146,60,0.3); }
.tier-2-badge { background: rgba(59,130,246,0.15);  color: var(--t2); border: 1px solid rgba(59,130,246,0.3); }
.tier-3-badge { background: rgba(14,165,233,0.15);  color: var(--t3); border: 1px solid rgba(14,165,233,0.3); }
.tier-4-badge { background: rgba(0,200,255,0.15);   color: var(--t4); border: 1px solid rgba(0,200,255,0.3); }
.tier-5-badge { background: rgba(168,85,247,0.15);  color: var(--t5); border: 1px solid rgba(168,85,247,0.3); }

.level-pill { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 10px; background: rgba(255,215,0,0.1); color: var(--gold); border: 1px solid rgba(255,215,0,0.25); }
.manager-badge { font-size: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(0,255,136,0.1); color: var(--green); border: 1px solid rgba(0,255,136,0.25); }

.bc-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.bc-income-rate { font-size: 11px; color: var(--green); font-weight: 600; margin-bottom: 6px; }
.income-pulse { animation: income-glow 2s ease-in-out infinite; }
@keyframes income-glow {
  0%, 100% { color: var(--green); }
  50% { color: #00ffaa; text-shadow: 0 0 8px rgba(0,255,136,0.6); }
}
.bc-pending { font-size: 13px; font-weight: 700; color: var(--gold); min-height: 20px; margin-bottom: 8px; font-family: 'Orbitron', monospace; }

.bc-progress { height: 3px; background: var(--bg-hover); border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.bc-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), #f97316); transition: width 1s linear; }

.bc-actions { display: flex; gap: 5px; }
.btn-collect-biz {
  flex: 1; background: linear-gradient(135deg, var(--gold), #f97316); color: #000;
  border: none; padding: 6px 8px; border-radius: 6px; font-size: 11px; font-weight: 800;
  cursor: pointer; transition: all 0.2s;
}
.btn-collect-biz:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-collect-biz:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.btn-upgrade-biz {
  background: var(--bg-card2); color: var(--text-secondary);
  border: 1px solid var(--border); padding: 6px 8px; border-radius: 6px; font-size: 11px;
  font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-upgrade-biz:hover { border-color: var(--blue); color: var(--blue); }
.btn-upgrade-biz:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-manager-biz {
  background: var(--bg-card2); color: var(--text-secondary);
  border: 1px solid var(--border); padding: 6px 8px; border-radius: 6px; font-size: 11px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-manager-biz:hover { border-color: var(--green); color: var(--green); }

.btn-buy-biz {
  width: 100%; background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff; border: none; padding: 8px; border-radius: 8px;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s;
}
.btn-buy-biz:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-buy-biz:disabled { opacity: 0.4; cursor: not-allowed; transform: none; background: var(--bg-hover); color: var(--text-muted); }

/* Coin fly animation */
.coin-fx-container { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.coin-fly {
  position: absolute; font-size: 13px; font-weight: 800;
  color: var(--gold); text-shadow: 0 0 10px rgba(255,215,0,0.8);
  animation: coin-fly-up 1.2s ease-out forwards; white-space: nowrap;
  font-family: 'Orbitron', monospace;
}
@keyframes coin-fly-up {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.2); }
}

/* ─── Market / Stocks ────────────────────────────────────── */
.stocks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stock-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; transition: all 0.2s; cursor: pointer;
}
.stock-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.stock-card.selected { border-color: var(--blue); background: rgba(0,200,255,0.05); }
.stock-symbol { font-size: 14px; font-weight: 800; font-family: 'Orbitron', monospace; }
.stock-name { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.stock-price { font-size: 17px; font-weight: 800; font-family: 'Orbitron', monospace; }
.stock-change { font-size: 11px; font-weight: 700; margin-top: 2px; }
.stock-change.up { color: var(--green); }
.stock-change.down { color: var(--red); }
.stock-emoji { font-size: 22px; margin-bottom: 6px; }

/* ─── Event Cards ────────────────────────────────────────── */
.event-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; position: relative; overflow: hidden;
}
.event-card.active { border-color: rgba(255,215,0,0.35); animation: event-pulse 2s ease-in-out infinite; }
@keyframes event-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,215,0,0); }
  50% { box-shadow: 0 0 18px rgba(255,215,0,0.12); }
}
.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.live-dot { width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.event-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.event-desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.event-impact { font-size: 12px; font-weight: 700; margin-top: 6px; color: var(--green); }
.event-timer { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ─── Mission Cards ──────────────────────────────────────── */
.mission-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; gap: 12px; align-items: flex-start; transition: all 0.2s;
}
.mission-card.completed { border-color: rgba(0,255,136,0.25); }
.mission-card.claimed { opacity: 0.5; }
.mission-emoji { font-size: 26px; flex-shrink: 0; }
.mission-body { flex: 1; min-width: 0; }
.mission-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.mission-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 7px; }
.mission-progress { height: 5px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.mission-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green)); transition: width 0.5s ease;
}
.mission-progress-fill.complete { background: linear-gradient(90deg, var(--green), #00cc66); }
.mission-stat { font-size: 10px; color: var(--text-muted); }
.mission-right { text-align: right; flex-shrink: 0; }
.mission-reward { font-size: 12px; font-weight: 800; color: var(--gold); font-family: 'Orbitron', monospace; }
.mission-reward small { display: block; font-size: 10px; color: var(--purple); font-weight: 600; }

/* ─── Leaderboard ────────────────────────────────────────── */
.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all 0.2s;
}
.lb-row:hover { border-color: var(--border-glow); }
.lb-row.me { border-color: var(--blue); background: rgba(0,200,255,0.05); }
.lb-row.top-1 { border-color: var(--gold); background: rgba(255,215,0,0.04); }
.lb-row.top-2 { border-color: #aaa; background: rgba(170,170,170,0.04); }
.lb-row.top-3 { border-color: var(--orange); background: rgba(251,146,60,0.04); }
.lb-rank { font-size: 15px; font-weight: 900; width: 30px; text-align: center; flex-shrink: 0; font-family: 'Orbitron', monospace; }
.lb-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.lb-name { font-size: 13px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-level { font-size: 11px; color: var(--text-muted); }
.lb-wealth { font-size: 13px; font-weight: 800; color: var(--gold); text-align: right; font-family: 'Orbitron', monospace; }
.lb-clan { font-size: 10px; color: var(--purple); }

/* Podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.podium-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium-crown { font-size: 22px; }
.podium-avatar {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
}
.p1 .podium-avatar { background: linear-gradient(135deg, #ffd700, #f97316); width: 64px; height: 64px; font-size: 22px; box-shadow: 0 0 28px rgba(255,215,0,0.4); }
.p2 .podium-avatar { background: linear-gradient(135deg, #94a3b8, #64748b); }
.p3 .podium-avatar { background: linear-gradient(135deg, #fb923c, #dc2626); }
.podium-name { font-size: 11px; font-weight: 700; text-align: center; }
.podium-wealth { font-size: 11px; font-weight: 800; color: var(--gold); font-family: 'Orbitron', monospace; }
.podium-bar { border-radius: 4px 4px 0 0; width: 76px; border: 1px solid var(--border); background: var(--bg-card2); }
.p1 .podium-bar { height: 76px; background: linear-gradient(180deg, rgba(255,215,0,0.15), transparent); border-color: rgba(255,215,0,0.3); }
.p2 .podium-bar { height: 52px; }
.p3 .podium-bar { height: 32px; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-control {
  width: 100%; background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--text);
  transition: border-color 0.2s; font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,200,255,0.08); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-card2); }
.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }

/* ─── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 3px; background: var(--bg-card2); padding: 3px; border-radius: 10px; margin-bottom: 18px; }
.tab-btn {
  flex: 1; background: none; border: none; padding: 7px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--bg-card); color: var(--text); box-shadow: var(--shadow); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Toast Notifications ────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9998; max-width: calc(100vw - 40px); }
.toast {
  background: var(--bg-card2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; max-width: 300px; display: flex; align-items: center; gap: 10px;
  animation: toast-in 0.3s ease; box-shadow: var(--shadow);
}
.toast.success { border-color: rgba(0,255,136,0.35); }
.toast.error   { border-color: rgba(239,68,68,0.35); }
.toast.info    { border-color: rgba(0,200,255,0.35); }
.toast.gold    { border-color: rgba(255,215,0,0.35); }
.toast-icon { font-size: 18px; }
.toast-msg { font-size: 12px; font-weight: 500; flex: 1; }
@keyframes toast-in  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateX(30px); } }

/* ─── Level Up Flash ─────────────────────────────────────── */
.levelup-overlay {
  position: fixed; inset: 0; background: rgba(168,85,247,0.10); backdrop-filter: blur(4px);
  z-index: 9997; display: flex; align-items: center; justify-content: center;
  animation: levelup-fade 2.5s ease-out forwards;
}
@keyframes levelup-fade { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.levelup-box {
  text-align: center; background: var(--bg-card); border: 2px solid var(--purple);
  border-radius: 20px; padding: 36px 56px; box-shadow: 0 0 60px rgba(168,85,247,0.4);
  animation: levelup-zoom 0.5s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes levelup-zoom { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 1; }
.auth-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px; width: 100%; max-width: 420px; position: relative; z-index: 1;
  box-shadow: 0 0 60px rgba(0,200,255,0.05);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-big { font-size: 44px; display: block; margin-bottom: 8px; filter: drop-shadow(0 0 16px #ffd700); }
.auth-logo .site-name {
  font-family: 'Orbitron', monospace;
  font-size: 30px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-logo .site-tag { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 22px; text-align: center; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.auth-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.auth-perk {
  background: var(--bg-card2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; text-align: center; font-size: 11px; color: var(--text-secondary);
}
.auth-perk strong { display: block; color: var(--gold); font-size: 12px; margin-bottom: 2px; }

/* ─── Landing Page ───────────────────────────────────────── */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; position: relative; z-index: 1; }
.hero-content { max-width: 820px; width: 100%; }
.hero-emoji { font-size: 72px; margin-bottom: 18px; animation: float 3s ease-in-out infinite; display: block; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(28px, 5vw, 58px); font-weight: 900; line-height: 1.1; margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, var(--blue) 50%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-tagline { font-size: clamp(14px, 2vw, 18px); color: var(--text-secondary); margin-bottom: 28px; line-height: 1.6; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 36px; flex-wrap: wrap; }
.hero-stat-value { font-size: 26px; font-weight: 900; color: var(--gold); font-family: 'Orbitron', monospace; }
.hero-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 36px auto; max-width: 860px; text-align: left; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: all 0.2s;
}
.feature-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.feature-icon { font-size: 30px; margin-bottom: 10px; }
.feature-title { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.feature-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* ─── Clan Page ──────────────────────────────────────────── */
.clan-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
  border: 1px solid rgba(168,85,247,0.25); border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
}
.clan-emoji { font-size: 52px; margin-bottom: 10px; }
.clan-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; font-family: 'Orbitron', monospace; }
.clan-tag { font-size: 13px; color: var(--purple); margin-bottom: 14px; }
.clan-stats { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.clan-stat-value { font-size: 20px; font-weight: 800; color: var(--gold); font-family: 'Orbitron', monospace; }
.clan-stat-label { font-size: 11px; color: var(--text-muted); }

/* ─── AI Chat ────────────────────────────────────────────── */
.chat-box { display: flex; flex-direction: column; height: 400px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg-card2); border-radius: var(--radius); margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; }
.msg.user { align-self: flex-end; }
.msg.ai   { align-self: flex-start; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.msg.user .msg-bubble { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; border-radius: 12px 12px 2px 12px; }
.msg.ai   .msg-bubble { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px 12px 12px 2px; }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; text-align: right; }

/* ─── Cashflow Game ──────────────────────────────────────── */
.cf-board {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; min-height: 400px;
}
.cf-track {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px; margin-bottom: 20px;
}
.cf-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; text-align: center; border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
  padding: 2px;
}
.cf-cell:hover { border-color: var(--border-glow); transform: scale(1.05); z-index: 2; }
.cf-cell.cell-deal    { background: rgba(0,200,255,0.08); border-color: rgba(0,200,255,0.2); }
.cf-cell.cell-doodad  { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); }
.cf-cell.cell-market  { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.2); }
.cf-cell.cell-payday  { background: rgba(0,255,136,0.08); border-color: rgba(0,255,136,0.2); }
.cf-cell.cell-charity { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); }
.cf-cell.cell-baby    { background: rgba(236,72,153,0.08); border-color: rgba(236,72,153,0.2); }
.cf-cell.cell-downsized { background: rgba(251,146,60,0.08); border-color: rgba(251,146,60,0.2); }
.cf-cell-icon { font-size: 14px; }
.cf-cell-label { font-size: 8px; color: var(--text-muted); line-height: 1.1; margin-top: 1px; }
.cf-player-token {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #fff; bottom: 2px; right: 2px;
}

.cf-balance-sheet {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.cf-bs-section { background: var(--bg-card2); border-radius: var(--radius); padding: 14px; }
.cf-bs-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-family: 'Orbitron', monospace; }
.cf-bs-title.income-title { color: var(--green); }
.cf-bs-title.expense-title { color: var(--red); }
.cf-bs-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.cf-bs-row:last-child { border-bottom: none; }
.cf-bs-total { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-glow); font-family: 'Orbitron', monospace; }

.cf-card-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.cf-card-inner {
  background: var(--bg-card); border: 1px solid var(--border-glow);
  border-radius: 20px; padding: 28px; max-width: 420px; width: 100%;
  animation: levelup-zoom 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  box-shadow: 0 0 40px rgba(0,200,255,0.15);
}
.cf-card-type {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 8px; font-family: 'Orbitron', monospace;
}
.cf-card-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.cf-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 16px; }
.cf-card-numbers { background: var(--bg-card2); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.cf-card-numbers .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.cf-card-numbers .row:last-child { margin-bottom: 0; }

.cf-dice-area { text-align: center; margin: 16px 0; }
.cf-dice { font-size: 48px; display: inline-block; animation: dice-spin 0.5s ease-out; }
@keyframes dice-spin { 0% { transform: rotate(0deg) scale(0.5); opacity: 0; } 100% { transform: rotate(360deg) scale(1); opacity: 1; } }

.cf-status-bar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.cf-status-item {
  flex: 1; min-width: 100px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
}
.cf-status-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: 'Orbitron', monospace; }
.cf-status-value { font-size: 15px; font-weight: 800; font-family: 'Orbitron', monospace; }

.cf-win-screen {
  text-align: center; padding: 40px 20px;
}
.cf-win-title {
  font-family: 'Orbitron', monospace;
  font-size: 32px; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--green));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 12px;
}

/* ─── Utility ────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--green); }
.text-danger    { color: var(--red); }
.text-warning   { color: var(--gold); }
.text-blue      { color: var(--blue); }
.text-purple    { color: var(--purple); }
.text-gold      { color: var(--gold); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.d-none { display: none; }
.w-100  { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-blue   { background: var(--blue-dim);   color: var(--blue); }
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-gold   { background: var(--gold-dim);   color: var(--gold); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.empty-state { text-align: center; padding: 36px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 44px; margin-bottom: 10px; }
.empty-state .empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.18); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,200,255,0.35); }

/* ─── Responsive ─────────────────────────────────────────── */

/* Large desktop — just make sure nothing overflows */
@media (min-width: 1440px) {
  .page-body { padding: 24px 28px; }
}

/* Medium-large: grids compact */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* Medium: sidebar intact, content cols stack */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .cf-balance-sheet { grid-template-columns: 1fr; }
}

/* Tablet/small laptop: sidebar slides, full width content */
@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .podium { gap: 10px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%); z-index: 200;
    box-shadow: 8px 0 40px rgba(0,0,0,0.6);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .page-body { padding: 12px; }
  .business-grid { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4, .grid-5, .grid-2 { grid-template-columns: 1fr; }
  .topbar-wealth { display: none; }
  .cf-track { grid-template-columns: repeat(8, 1fr); }
  .cf-status-bar { gap: 8px; }
}

@media (max-width: 540px) {
  .business-grid { grid-template-columns: 1fr; }
  .stocks-grid { grid-template-columns: 1fr 1fr; }
  .auth-box { padding: 22px 16px; }
  .hero-stats { gap: 16px; }
  .cf-track { grid-template-columns: repeat(5, 1fr); }
  .topbar { padding: 0 12px; }
  .topbar-title { font-size: 12px; }
  .page-body { padding: 10px; }
  .card { padding: 14px; }
  .stat-value { font-size: 16px; }
  .toast { max-width: calc(100vw - 40px); }
  .toast-container { right: 12px; bottom: 12px; }
  .podium-bar { width: 60px; }
  .p1 .podium-bar { height: 60px; }
  .p2 .podium-bar { height: 40px; }
  .p3 .podium-bar { height: 24px; }
  .auth-perks { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  html { font-size: 13px; }
  .cf-track { grid-template-columns: repeat(4, 1fr); }
}

/* Sidebar overlay backdrop on mobile */
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 199; backdrop-filter: blur(2px);
}
.sidebar-backdrop.active { display: block; }

/* ─── Glow pulse on new income ───────────────────────────── */
@keyframes glow-green {
  0%, 100% { box-shadow: 0 0 0 rgba(0,255,136,0); }
  50% { box-shadow: 0 0 20px rgba(0,255,136,0.3); }
}
.glow-green { animation: glow-green 1s ease-out; }

/* ─── Remove number input spinners ──────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ─── Market layout ──────────────────────────────────────── */
.market-layout { display: grid; grid-template-columns: 1fr 290px; gap: 20px; }
@media (max-width: 900px) { .market-layout { grid-template-columns: 1fr; } }

/* ─── Trade panel ────────────────────────────────────────── */
.trade-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--ticker-h) + var(--topbar-h) + 20px); }

/* ─── Purchase / Sell animations ────────────────────────── */
@keyframes buy-flash { 0% { box-shadow: 0 0 0 rgba(0,255,136,0); } 30% { box-shadow: 0 0 30px rgba(0,255,136,0.6); } 100% { box-shadow: 0 0 0 rgba(0,255,136,0); } }
@keyframes sell-flash { 0% { box-shadow: 0 0 0 rgba(239,68,68,0); } 30% { box-shadow: 0 0 30px rgba(239,68,68,0.6); } 100% { box-shadow: 0 0 0 rgba(239,68,68,0); } }
.anim-buy  { animation: buy-flash  0.8s ease-out; }
.anim-sell { animation: sell-flash 0.8s ease-out; }

@keyframes card-bought { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.anim-purchased { animation: card-bought 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }

/* ─── Particle burst ─────────────────────────────────────── */
.particle { position: fixed; pointer-events: none; z-index: 9999; border-radius: 50%; animation: particle-fly 0.9s ease-out forwards; }
@keyframes particle-fly { 0% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); } }

/* ─── Upgrade glow pulse ─────────────────────────────────── */
@keyframes upgrade-pulse { 0% { filter: brightness(1); } 50% { filter: brightness(1.5) drop-shadow(0 0 10px var(--gold)); } 100% { filter: brightness(1); } }
.anim-upgraded { animation: upgrade-pulse 0.6s ease; }

/* ─── Logo in sidebar ────────────────────────────────────── */
.logo-svg { width: 36px; height: 36px; flex-shrink: 0; }

/* ─── Mission progress bar animated ─────────────────────── */
.mission-progress-fill { transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

/* ─── Streak fire ────────────────────────────────────────── */
@keyframes fire-flicker { 0%,100% { text-shadow: 0 0 4px #ff6b00, 0 0 10px #ff3300; } 50% { text-shadow: 0 0 8px #ffaa00, 0 0 20px #ff6600; } }
.fire-text { animation: fire-flicker 1s ease-in-out infinite; }

/* ─── Number counter animation ───────────────────────────── */
@keyframes count-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.count-updated { animation: count-up 0.3s ease-out; }
