/* Shanghai Spotters v2.0 — Design Tokens & Base Styles */

:root {
  --bg: #07090d;
  --bg2: #0d1016;
  --bg3: #141922;
  --panel: #11151d;
  --panel2: #181e29;
  --panel-glass: rgba(13, 16, 22, 0.84);
  --line: rgba(255, 255, 255, 0.075);
  --line2: rgba(255, 255, 255, 0.14);
  --line-accent: rgba(56, 232, 255, 0.42);
  --text: #eef2f7;
  --muted: #98a4b5;
  --muted2: #687487;
  --accent: #38e8ff;
  --accent-strong: #06b6d4;
  --accent-dim: rgba(56, 232, 255, 0.12);
  --accent-glow: rgba(56, 232, 255, 0.24);
  --gold: #eab967;
  --gold-dim: rgba(234, 185, 103, 0.14);
  --danger: #ff5c7c;
  --danger-dim: rgba(255, 92, 124, 0.12);
  --ok: #5eeaa0;
  --ok-dim: rgba(94, 234, 160, 0.12);
  --violet: #a78bfa;

  --radius: 14px;
  --radius-s: 10px;
  --radius-xs: 7px;
  --topbar-h: 60px;
  --bottomnav-h: 62px;
  --sidebar-w: 348px;

  --font-body: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-display: "Michroma", "Space Grotesk", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.42);
  --shadow-pop: 0 20px 56px rgba(0, 0, 0, 0.62);
  --shadow-float: 0 8px 26px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #f3f6fb;
  --bg2: #ffffff;
  --bg3: #e8edf5;
  --panel: #ffffff;
  --panel2: #f0f3f8;
  --panel-glass: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 23, 42, 0.08);
  --line2: rgba(15, 23, 42, 0.16);
  --line-accent: rgba(2, 132, 199, 0.42);
  --text: #0f172a;
  --muted: #475569;
  --muted2: #7b889c;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-dim: rgba(2, 132, 199, 0.11);
  --accent-glow: rgba(2, 132, 199, 0.22);
  --gold: #b4770c;
  --gold-dim: rgba(180, 119, 12, 0.12);
  --danger: #e11d48;
  --danger-dim: rgba(225, 29, 72, 0.1);
  --ok: #059669;
  --ok-dim: rgba(5, 150, 105, 0.1);
  --violet: #7c3aed;

  --shadow-card: 0 10px 26px rgba(15, 23, 42, 0.07);
  --shadow-pop: 0 18px 46px rgba(15, 23, 42, 0.18);
  --shadow-float: 0 8px 22px rgba(15, 23, 42, 0.12);
}

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  transition: background 0.2s ease, color 0.2s ease;
}

body.modal-open,
body.sheet-open,
body.lightbox-open {
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-glow); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.4); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.heart.on svg, .like-big.on svg { fill: currentColor; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.45; }
}
@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes pinPulseWave {
  0% { transform: scale(0.65); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

@media (min-width: 861px) {
  .mobile-only { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
