/* ============================================================
   TopDeck Society — Design System
   Premium dark UI with per-game accent theming.
   ============================================================ */

:root {
  /* Brand */
  --brand-a: #6c5ce7;
  --brand-b: #00cec9;

  /* Surfaces */
  --bg: #0b0e17;
  --bg-2: #0f1322;
  --bg-3: #141a2e;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-3: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #eef1fa;
  --text-2: #aab2c8;
  --text-3: #6b7590;

  /* Signals */
  --up: #2ee6a8;
  --down: #ff6b81;
  --warn: #ffc14d;

  /* Per-game accent (overridden by [data-game]) */
  --accent: var(--brand-a);
  --accent-soft: rgba(108, 92, 231, 0.16);
  --accent-line: rgba(108, 92, 231, 0.45);

  /* Type */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Geometry */
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 66px;
  --max-w: 1240px;

  --shadow-1: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 18px 60px rgba(0, 0, 0, 0.5);
}

/* Per-game accent themes */
[data-game="pokemon"]  { --accent: #ffcb05; --accent-soft: rgba(255,203,5,.14);  --accent-line: rgba(255,203,5,.5);  --accent-ink: #14100a; }
[data-game="mtg"]      { --accent: #f6a33c; --accent-soft: rgba(246,163,60,.14); --accent-line: rgba(246,163,60,.5); --accent-ink: #140e06; }
[data-game="yugioh"]   { --accent: #a98ff7; --accent-soft: rgba(169,143,247,.15);--accent-line: rgba(169,143,247,.5);--accent-ink: #0f0a1c; }
[data-game="onepiece"] { --accent: #ff5a5f; --accent-soft: rgba(255,90,95,.14);  --accent-line: rgba(255,90,95,.5);  --accent-ink: #1a0808; }
[data-game="lorcana"]  { --accent: #e7c15c; --accent-soft: rgba(231,193,92,.14); --accent-line: rgba(231,193,92,.5); --accent-ink: #171105; }

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  /* ambient glow field */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(108, 92, 231, 0.14), transparent 60%),
    radial-gradient(700px 420px at -10% 15%, rgba(0, 206, 201, 0.1), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(108, 92, 231, 0.08), transparent 60%);
}

#app-shell { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; background: none; border: none; }
img { max-width: 100%; display: block; }
kbd {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--surface-2); border: 1px solid var(--stroke-2);
  border-radius: 5px; padding: 1px 6px; color: var(--text-2);
}

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */
#topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 14, 23, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; }
.brand-word {
  font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
}
.brand-word em {
  font-style: normal;
  background: linear-gradient(90deg, var(--brand-a), var(--brand-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links > a, .nav-drop-btn {
  padding: 8px 13px; border-radius: 9px;
  color: var(--text-2); font-weight: 500; font-size: 14px;
  transition: color .15s, background .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links > a:hover, .nav-drop-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-links > a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand-a); }
.chev { font-size: 10px; opacity: .7; }

.nav-dropdown { position: relative; }
.nav-drop-panel {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  background: var(--bg-3); border: 1px solid var(--stroke-2); border-radius: 14px;
  box-shadow: var(--shadow-2); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
}
.nav-dropdown.open .nav-drop-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.drop-game {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  transition: background .15s;
}
.drop-game:hover { background: var(--surface-2); }
.drop-game .g-dot { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.drop-game b { display: block; font-size: 14px; }
.drop-game span { display: block; font-size: 12px; color: var(--text-3); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.global-search-btn {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--stroke-2);
  padding: 8px 14px; border-radius: 10px; color: var(--text-3); font-size: 13px;
  transition: border-color .15s, color .15s;
  min-width: 210px;
}
.global-search-btn:hover { border-color: var(--brand-a); color: var(--text-2); }
.global-search-btn kbd { margin-left: auto; }

.watch-count-pill {
  background: var(--brand-a); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 1px 7px; margin-left: 2px;
}

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu {
  border-top: 1px solid var(--stroke); padding: 12px 24px 18px;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(11,14,23,.97);
}
.mobile-menu a { padding: 11px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; }
.mobile-menu a:hover { background: var(--surface-2); color: var(--text); }

/* ============ TICKER ============ */
.ticker-rail {
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-2);
  overflow: hidden; height: 38px; display: flex; align-items: center;
  position: relative;
}
.ticker-rail::before, .ticker-rail::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none;
}
.ticker-rail::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.ticker-rail::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.ticker-track {
  display: flex; gap: 42px; white-space: nowrap; will-change: transform;
  animation: ticker-scroll 60s linear infinite;
  padding-left: 100%;
}
.ticker-rail:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { to { transform: translateX(-100%); } }
.tick-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.tick-item .t-game { font-weight: 700; font-size: 11px; letter-spacing: .04em; opacity: .75; }
.tick-item .t-price { font-family: var(--font-mono); color: var(--text); }
.tick-item .t-delta.up { color: var(--up); }
.tick-item .t-delta.down { color: var(--down); }

/* ============ GENERIC SECTIONS ============ */
main { min-height: 62vh; }
.section { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 26px; font-weight: 700; }
.section-head .sub { color: var(--text-3); font-size: 14px; margin-top: 5px; max-width: 640px; }
.section-link { color: var(--accent, var(--brand-a)); font-weight: 600; font-size: 14px; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent, var(--brand-b));
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* ============ HERO ============ */
.hero { padding: 84px 0 60px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; line-height: 1.07; margin: 18px 0 20px; }
.hero h1 .grad {
  background: linear-gradient(92deg, var(--brand-a) 10%, var(--brand-b) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { color: var(--text-2); font-size: 17px; max-width: 560px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; transition: all .18s ease;
}
.btn-primary { background: linear-gradient(92deg, var(--brand-a), #8e7bff); color: #fff; box-shadow: 0 8px 24px rgba(108,92,231,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(108,92,231,.45); }
.btn-ghost { border-color: var(--stroke-2); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand-b); color: var(--brand-b); }
.btn-accent { background: var(--accent); color: var(--accent-ink, #0b0e17); box-shadow: 0 8px 22px var(--accent-soft); }
.btn-accent:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }

.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hstat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.hstat span { color: var(--text-3); font-size: 12.5px; letter-spacing: .03em; }

/* hero visual: fanned cards */
.hero-visual { position: relative; height: 420px; }
.fan-card {
  position: absolute; width: 190px; height: 266px; border-radius: 14px;
  border: 1px solid var(--stroke-2);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16px; overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  cursor: pointer;
}
.fan-card:hover { transform: translateY(-14px) rotate(0deg) scale(1.04) !important; z-index: 9 !important; }
.fan-card .fc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-family: var(--font-display); font-size: 13px; }
.fan-card .fc-icon { font-size: 40px; align-self: center; filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); }
.fan-card .fc-bottom { font-size: 11px; opacity: .85; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.fan-card .fc-spark { position: absolute; inset: 0; opacity: .16; background: radial-gradient(240px 180px at 70% 20%, #fff, transparent 60%); }

/* ============ GAME SELECT GRID ============ */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.game-tile {
  position: relative; border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 26px 22px 22px; overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s;
  display: flex; flex-direction: column; gap: 10px; min-height: 240px;
}
.game-tile:hover { transform: translateY(-6px); border-color: var(--tile-accent, var(--brand-a)); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.game-tile .g-glow {
  position: absolute; top: -70px; right: -70px; width: 200px; height: 200px; border-radius: 50%;
  background: var(--tile-accent, var(--brand-a)); opacity: .13; filter: blur(40px);
  transition: opacity .25s;
}
.game-tile:hover .g-glow { opacity: .26; }
.game-tile .g-emoji { font-size: 34px; }
.game-tile h3 { font-size: 18px; font-weight: 700; }
.game-tile .g-pub { color: var(--text-3); font-size: 12px; }
.game-tile .g-desc { color: var(--text-2); font-size: 13px; flex: 1; }
.game-tile .g-cta { font-weight: 700; font-size: 13px; color: var(--tile-accent, var(--brand-a)); display: flex; align-items: center; gap: 6px; }
.game-tile .g-rank {
  position: absolute; top: 16px; right: 18px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-3); border: 1px solid var(--stroke-2); border-radius: 7px; padding: 2px 8px;
}

/* ============ FEATURE ROW ============ */
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature-card {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--surface); padding: 24px;
}
.feature-card .f-ic {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: var(--surface-2); border: 1px solid var(--stroke-2); margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { color: var(--text-2); font-size: 13.5px; }

/* ============ GAME DASHBOARD ============ */
.game-hero {
  padding: 44px 0 0;
  background:
    radial-gradient(700px 320px at 20% -40%, var(--accent-soft), transparent 70%);
  border-bottom: 1px solid var(--stroke);
}
.game-hero-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.game-badge {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 32px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.game-hero h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
.game-hero .g-meta { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.game-hero .g-meta b { color: var(--accent); }
.game-hero-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.game-tabs { display: flex; gap: 4px; margin-top: 30px; overflow-x: auto; scrollbar-width: none; }
.game-tabs::-webkit-scrollbar { display: none; }
.gtab {
  padding: 12px 18px; font-weight: 600; font-size: 14px; color: var(--text-3);
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .15s;
}
.gtab:hover { color: var(--text-2); }
.gtab.active { color: var(--accent); border-bottom-color: var(--accent); }

.dash-section { padding: 36px 0; }

/* market movers table */
.movers-panel {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.movers-head {
  display: grid; grid-template-columns: 44px 1fr 130px 130px 120px;
  padding: 12px 20px; gap: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--stroke);
}
.mover-row {
  display: grid; grid-template-columns: 44px 1fr 130px 130px 120px;
  padding: 13px 20px; gap: 14px; align-items: center;
  border-bottom: 1px solid var(--stroke);
  transition: background .15s; cursor: pointer;
}
.mover-row:last-child { border-bottom: none; }
.mover-row:hover { background: var(--surface-2); }
.mover-row .m-rank { font-family: var(--font-mono); color: var(--text-3); font-size: 13px; }
.mover-row .m-card { display: flex; align-items: center; gap: 13px; min-width: 0; }
.mover-row .m-thumb {
  width: 38px; height: 53px; border-radius: 5px; object-fit: cover; flex-shrink: 0;
  background: var(--surface-3); border: 1px solid var(--stroke-2);
}
.mover-row .m-thumb.ph { display: grid; place-items: center; font-size: 17px; }
.mover-row .m-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-row .m-set { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mover-row .m-price { font-family: var(--font-mono); font-weight: 700; font-size: 14.5px; }
.mover-row .m-price small { color: var(--text-3); font-weight: 500; display: block; font-size: 10.5px; font-family: var(--font-body); }
.m-delta { font-family: var(--font-mono); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.m-delta.up { color: var(--up); }
.m-delta.down { color: var(--down); }
.m-delta.flat { color: var(--text-3); }
.m-actions { display: flex; gap: 8px; justify-content: flex-end; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--stroke-2); background: var(--surface); color: var(--text-2); font-size: 14px;
  transition: all .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.watched { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* card result grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.pcard {
  border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface);
  overflow: hidden; transition: transform .2s, border-color .2s; cursor: pointer;
  display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-5px); border-color: var(--accent-line); }
.pcard .pc-imgwrap { aspect-ratio: 63/88; background: var(--bg-3); position: relative; overflow: hidden; }
.pcard .pc-imgwrap img { width: 100%; height: 100%; object-fit: contain; }
.pcard .pc-imgwrap .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; opacity: .35; }
.pcard .pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .pc-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.pcard .pc-set { color: var(--text-3); font-size: 11.5px; }
.pcard .pc-priceline { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pcard .pc-price { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--accent); }
.pcard .pc-rarity { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }

/* search bar on dashboard */
.dash-search { display: flex; gap: 10px; margin-bottom: 22px; }
.dash-search input {
  flex: 1; background: var(--surface); border: 1px solid var(--stroke-2); border-radius: 12px;
  padding: 13px 18px; color: var(--text); font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.dash-search input:focus { border-color: var(--accent); }
.dash-search input::placeholder { color: var(--text-3); }

/* sets grid */
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.set-card {
  border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s, transform .2s;
}
.set-card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.set-card .s-code { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .06em; }
.set-card h4 { font-size: 15.5px; }
.set-card .s-date { color: var(--text-3); font-size: 12.5px; }
.set-card .s-note { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.set-card .s-links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 20px;
  border: 1px solid var(--stroke-2); color: var(--text-2); background: var(--surface);
  transition: all .15s; display: inline-flex; align-items: center; gap: 5px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.hot { border-color: rgba(255,107,129,.4); color: var(--down); }
.chip.status { pointer-events: none; }
.chip.status.instock { border-color: rgba(46,230,168,.35); color: var(--up); }
.chip.status.scarce { border-color: rgba(255,193,77,.4); color: var(--warn); }
.chip.status.hunted { border-color: rgba(255,107,129,.4); color: var(--down); }

/* ============ RESTOCK RADAR ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.product-card {
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--surface);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .2s;
}
.product-card:hover { border-color: var(--accent-line, var(--stroke-2)); transform: translateY(-3px); }
.product-card .p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.product-card .p-game-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px;
}
.product-card h4 { font-size: 15.5px; line-height: 1.35; }
.product-card .p-type { color: var(--text-3); font-size: 12px; }
.product-card .p-msrp { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.product-card .p-msrp b { font-family: var(--font-mono); font-size: 17px; }
.product-card .p-msrp span { font-size: 11.5px; color: var(--text-3); }
.product-card .p-note { font-size: 12.5px; color: var(--text-2); flex: 1; }
.product-card .p-retailers { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 8px; border-top: 1px dashed var(--stroke); }
.retailer-link {
  font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--stroke-2); color: var(--text-2);
  transition: all .15s;
}
.retailer-link:hover { border-color: var(--brand-b); color: var(--brand-b); transform: translateY(-1px); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-pill {
  padding: 8px 16px; border-radius: 24px; border: 1px solid var(--stroke-2);
  font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface);
  transition: all .15s;
}
.filter-pill:hover { border-color: var(--text-2); color: var(--text); }
.filter-pill.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ============ RELEASE CALENDAR ============ */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--brand-a), var(--brand-b));
  border-radius: 2px; opacity: .5;
}
.tl-item { position: relative; padding: 0 0 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--tl-accent, var(--brand-a));
}
.tl-item .tl-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: .04em; }
.tl-item .tl-card {
  margin-top: 6px; border: 1px solid var(--stroke); border-radius: 13px; background: var(--surface);
  padding: 15px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  transition: border-color .2s;
}
.tl-item .tl-card:hover { border-color: var(--tl-accent, var(--stroke-2)); }
.tl-item .tl-game {
  font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; flex-shrink: 0;
}
.tl-item h4 { font-size: 15px; flex: 1; min-width: 200px; }
.tl-item .tl-kind { color: var(--text-3); font-size: 12px; }
.tl-badge-past { font-size: 11px; color: var(--text-3); border: 1px solid var(--stroke-2); padding: 2px 9px; border-radius: 6px; }
.tl-badge-soon { font-size: 11px; font-weight: 700; color: var(--up); border: 1px solid rgba(46,230,168,.35); padding: 2px 9px; border-radius: 6px; }
.tl-badge-tbc { font-size: 11px; color: var(--warn); border: 1px solid rgba(255,193,77,.35); padding: 2px 9px; border-radius: 6px; }

/* ============ WATCHLIST ============ */
.watch-empty {
  text-align: center; padding: 80px 20px; color: var(--text-3);
  border: 1px dashed var(--stroke-2); border-radius: var(--radius);
}
.watch-empty .we-ic { font-size: 44px; margin-bottom: 14px; }
.watch-empty h3 { color: var(--text); margin-bottom: 8px; }
.watch-summary {
  display: flex; gap: 26px; flex-wrap: wrap; padding: 20px 24px; margin-bottom: 24px;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
}
.watch-summary .ws-item b { display: block; font-family: var(--font-mono); font-size: 22px; }
.watch-summary .ws-item span { font-size: 12px; color: var(--text-3); letter-spacing: .03em; }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 7, 12, 0.72); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 9vh 20px 20px;
}
.search-modal {
  width: 100%; max-width: 780px; background: var(--bg-3);
  border: 1px solid var(--stroke-2); border-radius: 18px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; max-height: 78vh; overflow: hidden;
  animation: modal-in .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.search-modal-head { display: flex; gap: 10px; padding: 14px; border-bottom: 1px solid var(--stroke); align-items: center; }
.search-modal-head select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--stroke-2);
  border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 13.5px; outline: none;
}
.search-modal-head input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-size: 16.5px; font-family: inherit; padding: 8px 4px;
}
.search-modal-head input::placeholder { color: var(--text-3); }
.search-close { color: var(--text-3); font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.search-close:hover { background: var(--surface-2); color: var(--text); }
.search-modal-body { overflow-y: auto; padding: 16px; }
.search-hint { color: var(--text-3); text-align: center; padding: 34px 10px; font-size: 14px; }

/* ============ DRAWER ============ */
.card-drawer { position: fixed; inset: 0; z-index: 110; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(5,7,12,.7); backdrop-filter: blur(4px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 94vw);
  background: var(--bg-2); border-left: 1px solid var(--stroke-2);
  box-shadow: var(--shadow-2); overflow-y: auto;
  animation: drawer-in .26s cubic-bezier(.2,.8,.2,1);
}
@keyframes drawer-in { from { transform: translateX(60px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--stroke); position: sticky; top: 0; background: var(--bg-2); z-index: 2; }
.drawer-head h3 { font-size: 16px; }
.drawer-body { padding: 22px; }
.drawer-img { width: 62%; margin: 0 auto 22px; border-radius: 12px; box-shadow: var(--shadow-2); }
.drawer-img.ph { aspect-ratio: 63/88; display: grid; place-items: center; font-size: 60px; background: var(--bg-3); border: 1px solid var(--stroke-2); opacity: .8; }
.price-table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; }
.price-table td { padding: 10px 4px; border-bottom: 1px solid var(--stroke); font-size: 13.5px; }
.price-table td:last-child { text-align: right; font-family: var(--font-mono); font-weight: 700; }
.price-table td:first-child { color: var(--text-2); }
.drawer-links { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.drawer-links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border: 1px solid var(--stroke-2); border-radius: 11px;
  font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: all .15s;
}
.drawer-links a:hover { border-color: var(--accent, var(--brand-a)); color: var(--text); }
.drawer-links a span:last-child { opacity: .5; }

/* ============ SOURCES PAGE ============ */
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.source-card { border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.source-card h4 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15.5px; }
.source-card .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 10px var(--up); }
.source-card .curated-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.source-card p { color: var(--text-2); font-size: 13.5px; margin-bottom: 8px; }
.source-card a.src-link { color: var(--brand-b); font-size: 13px; font-weight: 600; }
.source-card a.src-link:hover { text-decoration: underline; }

.callout {
  border: 1px solid var(--stroke-2); border-left: 3px solid var(--warn);
  background: var(--surface); border-radius: 12px; padding: 16px 20px;
  color: var(--text-2); font-size: 13.5px; margin: 22px 0;
}
.callout b { color: var(--text); }

/* ============ NEWS / RESOURCES ============ */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.res-link {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  border: 1px solid var(--stroke); border-radius: 13px; background: var(--surface);
  transition: all .18s;
}
.res-link:hover { border-color: var(--accent-line, var(--brand-a)); transform: translateY(-2px); }
.res-link .r-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--stroke-2); font-size: 17px; flex-shrink: 0; }
.res-link b { display: block; font-size: 13.5px; }
.res-link span { display: block; font-size: 11.5px; color: var(--text-3); }

/* ============ SKELETONS / STATES ============ */
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 8px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%);} to { transform: translateX(100%);} }
.skel-row { height: 58px; margin: 8px 16px; }
.skel-card { aspect-ratio: 63/100; border-radius: 14px; }

.load-note { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.load-note .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.error-note {
  padding: 18px 22px; border: 1px solid rgba(255,107,129,.3); border-radius: 12px;
  background: rgba(255,107,129,.06); color: var(--text-2); font-size: 13.5px;
}

.badge-live, .badge-snapshot {
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 5px;
}
.badge-live { color: var(--up); border: 1px solid rgba(46,230,168,.35); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--up); animation: pulse 1.6s infinite; }
.badge-snapshot { color: var(--warn); border: 1px solid rgba(255,193,77,.35); }

/* ============ PROFILE & COLLECTIONS ============ */
.profile-hero {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
  padding: 26px 28px; margin-bottom: 26px;
}
.profile-avatar {
  width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  font-size: 38px; background: var(--surface-3); border: 1px solid var(--stroke-2);
  flex-shrink: 0;
}
.profile-hero h2 { font-size: 24px; }
.profile-hero .p-meta { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.profile-hero .p-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.onboard-card {
  max-width: 560px; margin: 0 auto; border: 1px solid var(--stroke-2); border-radius: var(--radius);
  background: var(--surface); padding: 34px; display: flex; flex-direction: column; gap: 18px;
}
.onboard-card h2 { font-size: 24px; }
.onboard-card label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); display: block; margin-bottom: 8px; }
.onboard-card input[type="text"], .onboard-card select, .field-input {
  width: 100%; background: var(--bg-3); border: 1px solid var(--stroke-2); border-radius: 11px;
  padding: 12px 15px; color: var(--text); font-size: 14.5px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.onboard-card input:focus, .field-input:focus { border-color: var(--brand-a); }
.avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-opt {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px;
  background: var(--surface); border: 1px solid var(--stroke-2); transition: all .15s;
}
.avatar-opt:hover { border-color: var(--text-2); transform: translateY(-2px); }
.avatar-opt.sel { border-color: var(--brand-a); background: rgba(108,92,231,.18); box-shadow: 0 0 0 2px rgba(108,92,231,.35); }

.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.coll-card {
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--surface);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .2s, transform .2s; cursor: pointer; position: relative;
}
.coll-card:hover { border-color: var(--brand-a); transform: translateY(-3px); }
.coll-card h4 { font-size: 16.5px; padding-right: 60px; }
.coll-card .c-stats { display: flex; gap: 18px; margin-top: 6px; }
.coll-card .c-stats b { font-family: var(--font-mono); font-size: 16px; display: block; }
.coll-card .c-stats span { font-size: 11px; color: var(--text-3); }
.coll-card .c-tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.coll-card .c-updated { color: var(--text-3); font-size: 11.5px; margin-top: auto; padding-top: 8px; }
.coll-new {
  border: 1px dashed var(--stroke-2); border-radius: var(--radius); background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 28px; color: var(--text-3); cursor: pointer; transition: all .2s; min-height: 150px;
  font-size: 14px; font-weight: 600;
}
.coll-new:hover { border-color: var(--brand-a); color: var(--brand-a); }
.coll-new .cn-plus { font-size: 30px; }

.qty-step { display: inline-flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--stroke-2);
  display: grid; place-items: center; color: var(--text-2); font-size: 13px; background: var(--surface);
  transition: all .15s;
}
.qty-btn:hover { border-color: var(--brand-a); color: var(--brand-a); }
.qty-num { font-family: var(--font-mono); font-weight: 700; min-width: 26px; text-align: center; }

.drawer-collect { display: flex; gap: 8px; margin-top: 10px; }
.drawer-collect select {
  flex: 1; background: var(--bg-3); border: 1px solid var(--stroke-2); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-family: inherit; font-size: 13px; outline: none;
}

/* ============ LOCAL RESTOCK FINDER ============ */
.local-finder {
  border: 1px solid var(--stroke-2); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(0,206,201,.07), var(--surface));
  padding: 24px 26px; margin-bottom: 30px;
}
.local-finder h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.local-finder .lf-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: 16px; max-width: 640px; }
.lf-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.lf-bar input {
  flex: 1; min-width: 220px; background: var(--bg-3); border: 1px solid var(--stroke-2); border-radius: 11px;
  padding: 12px 16px; color: var(--text); font-size: 14.5px; font-family: inherit; outline: none;
}
.lf-bar input:focus { border-color: var(--brand-b); }
.lf-saved { font-size: 12.5px; color: var(--text-3); margin: 8px 0 0; }
.lf-saved b { color: var(--brand-b); }
.lf-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; margin-top: 16px; }
.lf-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--stroke); border-radius: 11px; background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .15s;
}
.lf-link:hover { border-color: var(--brand-b); color: var(--text); transform: translateY(-2px); }
.lf-link .lf-ic { font-size: 16px; }
.lf-link span:last-child { margin-left: auto; opacity: .45; }
.lf-group-label { grid-column: 1/-1; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-top: 8px; }

/* ============ LEGAL PAGES ============ */
.legal-body h3 { font-size: 16.5px; margin: 26px 0 10px; }
.legal-body p { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.legal-body ul { margin: 0 0 14px 20px; color: var(--text-2); font-size: 14px; }
.legal-body li { margin-bottom: 8px; }
.legal-body b { color: var(--text); }

/* ============ TOASTS ============ */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--bg-3); border: 1px solid var(--stroke-2); border-radius: 12px;
  padding: 13px 18px; font-size: 13.5px; box-shadow: var(--shadow-2);
  display: flex; align-items: center; gap: 10px;
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }

/* ============ FOOTER ============ */
#site-footer { border-top: 1px solid var(--stroke); background: var(--bg-2); margin-top: 60px; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 48px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 34px;
}
.footer-brand { font-size: 19px; }
.footer-brand-col p { color: var(--text-3); font-size: 13px; margin-top: 12px; max-width: 300px; }
.footer-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-2); font-size: 13.5px; padding: 4px 0; }
.footer-col a:hover { color: var(--text); }
.footer-col .fine { color: var(--text-3); font-size: 11.5px; line-height: 1.6; }
.footer-base {
  border-top: 1px solid var(--stroke); padding: 18px 24px; text-align: center;
  color: var(--text-3); font-size: 12px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .movers-head, .mover-row { grid-template-columns: 30px 1fr 110px 90px; }
  .movers-head .h-actions, .m-actions { display: none; }
  /* collection & watchlist keep their action controls; drop the delta col instead */
  .keep-actions .movers-head, .keep-actions .mover-row { grid-template-columns: 30px 1fr 130px 150px; }
  .keep-actions .h-actions { display: block; }
  .keep-actions .m-actions { display: flex; }
  .keep-actions .h-delta, .keep-actions .m-deltawrap { display: none; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .global-search-btn { min-width: 0; }
  .global-search-btn span { display: none; }
  .global-search-btn kbd { display: none; }
  .hero { padding: 54px 0 40px; }
  .movers-head, .mover-row { grid-template-columns: 26px 1fr 96px; }
  .movers-head .h-delta, .mover-row .m-deltawrap { display: none; }
  .keep-actions .movers-head, .keep-actions .mover-row { grid-template-columns: 26px 1fr 96px 130px; }
  .game-hero-actions { margin-left: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}

::selection { background: var(--brand-a); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--stroke-2); }
