:root {
  --bg: #000;
  --panel: #101114;
  --panel-2: #17191f;
  --panel-3: #1e2129;
  --text: #f5f5f7;
  --muted: #a6a8b0;
  --muted-2: #74767e;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --blue: #0070d1;
  --blue-bright: #4a9eff;
  --green: #2fd08a;
  --red: #ff6b6b;
  --gold: #f2c45a;
  --radius: 10px;
  --card-w: 208px;
  --page: 1480px;
  --sans: "Segoe UI", "SST", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 78% -140px, rgba(0, 112, 209, 0.16), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { display: block; }
[hidden] { display: none !important; }

::selection { background: rgba(0, 112, 209, 0.55); color: #fff; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  max-width: var(--page);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ps-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(145deg, #1684ea, #0063bb);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 18px rgba(0, 112, 209, 0.28);
}

.brand-word {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.35px;
  white-space: nowrap;
}

.brand-sub {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.main-nav a {
  color: #d3d4d8;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15px;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.main-nav a:hover { color: #fff; }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #d3d4d8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.icon-btn svg, .search-box svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

.signin {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border-radius: 100px;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.signin:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 255, 255, 0.16); }

.subnav {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.subnav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar { display: none; }

.subnav-item {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.subnav-item:hover { color: #fff; }

.subnav-item.is-active { color: #fff; }
.subnav-item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--blue-bright);
}

.source-note {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 32px 30px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: 430px;
  margin: 26px 0 12px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 34%;
  transform: scale(1.015);
  filter: saturate(1.05);
  z-index: -2;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.94) 26%, rgba(0, 0, 0, 0.62) 52%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.3) 42%, transparent 72%);
  z-index: -1;
}

.hero-content {
  position: relative;
  width: min(680px, 100%);
  padding: 52px 54px 46px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: clamp(32px, 4.3vw, 54px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -1.6px;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.65);
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.hero-price { font-size: 23px; font-weight: 700; letter-spacing: -0.4px; }
.hero-old { color: var(--muted); font-size: 15px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 5px;
  background: #fff;
  color: #000;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hero-sub {
  margin: 14px 0 0;
  max-width: 470px;
  color: #c8c9cf;
  font-size: 14px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 26px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 20px;
  border-radius: 100px;
  background: #fff;
  color: #000;
  font-size: 13.5px;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255, 255, 255, 0.18); }
.btn-primary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.hero-updated { color: rgba(255, 255, 255, 0.55); font-size: 12px; }

/* --------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--line-soft);
}

.toolbar-status {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 220px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 208, 138, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.live-dot.is-busy { background: var(--blue-bright); box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.14); animation-duration: 1s; }
.live-dot.is-error { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14); animation: none; }
.live-dot.is-stale { background: var(--gold); box-shadow: 0 0 0 4px rgba(242, 196, 90, 0.13); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-detail {
  color: var(--muted-2);
  font-size: 12px;
  min-height: 18px;
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 220px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: border-color 0.15s ease, background 0.15s ease, width 0.2s ease;
}

.search-box:focus-within { border-color: rgba(74, 158, 255, 0.75); background: rgba(255, 255, 255, 0.07); }
.search-box svg { position: absolute; left: 13px; pointer-events: none; }
.search-box input {
  width: 100%;
  height: 100%;
  padding: 0 34px 0 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-box input::-webkit-search-cancel-button { filter: invert(0.7); }
.search-box kbd {
  position: absolute;
  right: 10px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 10px;
}

.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.chip.is-active { background: #fff; border-color: #fff; color: #000; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: #e7e7ea;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.btn-ghost:disabled { opacity: 0.55; cursor: default; }
.refresh-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.is-spinning .refresh-icon { animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

.result-note {
  min-height: 18px;
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 12px;
}

/* ------------------------------------------------------------------ rows */

.catalog {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 24px;
}

.row { min-width: 0; }

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.row-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.45px;
}

.row-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.view-all {
  margin-right: 4px;
  color: var(--blue-bright);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.view-all:hover { text-decoration: underline; text-underline-offset: 3px; }

.scroll-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(20, 21, 26, 0.7);
  color: #d7d8dc;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.scroll-btn:hover { background: #23252c; color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.scroll-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.row-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
  margin: 0 -6px;
  padding: 4px 6px 8px;
}

.row-scroller::-webkit-scrollbar { display: none; }

.row-track {
  display: flex;
  align-items: stretch;
  gap: 16px;
  width: max-content;
  padding-bottom: 2px;
}

/* ----------------------------------------------------------------- cards */

.card {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease;
}

.card:hover { transform: translateY(-4px); }

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #1c1e25, #111217);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.38);
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.2, 0.65, 0.3, 1), filter 0.25s ease;
}

.card:hover .card-art img { transform: scale(1.045); filter: brightness(1.06); }

.art-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), transparent);
  pointer-events: none;
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: calc(100% - 16px);
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.25px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.badge-discount { background: #fff; color: #000; }
.badge-preorder { background: rgba(0, 112, 209, 0.95); color: #fff; }
.badge-service {
  background: rgba(8, 9, 12, 0.82);
  color: #e8e9ed;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
  backdrop-filter: blur(6px);
}

.card-info {
  display: flex;
  flex-direction: column;
  padding: 10px 2px 0;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
  color: #e9eaee;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.36;
  letter-spacing: -0.1px;
}

.card-title:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
  min-height: 21px;
}

.price { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.old-price { color: var(--muted-2); font-size: 12px; }

.change-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 19px;
  margin-top: 3px;
}

.delta {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.delta.is-down { background: rgba(47, 208, 138, 0.13); color: var(--green); }
.delta.is-up { background: rgba(255, 107, 107, 0.13); color: var(--red); }

.lowest {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid rgba(242, 196, 90, 0.38);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.spark { margin-top: 6px; height: 22px; opacity: 0.9; }
.spark svg { width: 100%; height: 22px; overflow: visible; }
.spark .spark-line { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark .spark-area { opacity: 0.1; }

/* -------------------------------------------------------------- skeleton */

.skeleton-row { margin-top: 30px; }
.skeleton-title {
  width: 180px;
  height: 20px;
  margin-bottom: 16px;
  border-radius: 5px;
  background: #17191f;
}
.skeleton-track { display: flex; gap: 16px; overflow: hidden; }
.skeleton-card { flex: 0 0 var(--card-w); }
.skeleton-art {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #15171c;
}
.skeleton-line { height: 12px; margin-top: 10px; border-radius: 4px; background: #15171c; }
.skeleton-line.short { width: 62%; }

.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer { to { transform: translateX(100%); } }

/* ------------------------------------------------------------ empty/fatal */

.empty, .fatal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin-top: 30px;
  color: var(--muted);
}

.empty-icon { font-size: 34px; color: var(--muted-2); line-height: 1; }
.empty h2, .fatal h2 { margin: 14px 0 4px; color: #fff; font-size: 19px; }
.empty p, .fatal p { margin: 0 0 18px; font-size: 13.5px; }

/* ---------------------------------------------------------------- footer */

.footer {
  margin-top: 30px;
  border-top: 1px solid var(--line-soft);
  background: #050506;
}

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 30px 32px 46px;
}

.footer p { margin: 0 0 8px; font-size: 12px; color: #c2c3c9; max-width: 900px; }
.footer p.muted { color: var(--muted-2); line-height: 1.6; }
.footer strong { color: #fff; }

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 100;
  max-width: min(90vw, 460px);
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(24, 26, 32, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: #f1f1f4;
  font-size: 12.5px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  :root { --card-w: 188px; }
  .main-nav { gap: 18px; }
  .source-note { display: none; }
}

@media (max-width: 980px) {
  .header-inner { gap: 18px; padding: 0 20px; }
  .main-nav { display: none; }
  .page { padding: 0 20px 24px; }
  .subnav-inner { padding: 0 20px; }
  .hero-content { padding: 36px 32px; }
  .search-box { width: 190px; }
}

@media (max-width: 760px) {
  :root { --card-w: 150px; }
  .site-header { height: 56px; }
  .subnav { top: 56px; height: 44px; }
  .subnav-inner { height: 44px; gap: 20px; }
  .brand-word { font-size: 15px; }
  .brand-sub { display: none; }
  .signin { height: 31px; padding: 0 14px; font-size: 12px; }
  .hero { min-height: 350px; margin-top: 18px; border-radius: 10px; }
  .hero-content { padding: 26px 22px; }
  .hero-title { letter-spacing: -1px; }
  .hero-shade { background: linear-gradient(0deg, #000 12%, rgba(0, 0, 0, 0.74) 58%, rgba(0, 0, 0, 0.25) 100%); }
  .toolbar { align-items: stretch; }
  .toolbar-status { min-width: 100%; }
  .toolbar-controls { width: 100%; }
  .search-box { width: 100%; order: -1; }
  .chips { flex: 1; }
  .row-head { flex-wrap: wrap; }
  .row-title { font-size: 18px; }
  .scroll-btn { display: none; }
  .result-note { margin-top: 12px; }
  .footer-inner { padding: 24px 20px 36px; }
}

@media (max-width: 480px) {
  :root { --card-w: 136px; }
  .chips { gap: 5px; }
  .chip { padding: 0 11px; font-size: 12px; }
  .toolbar-controls .btn-ghost span { display: none; }
  .toolbar-controls .btn-ghost { padding: 0 12px; }
  .card-title { font-size: 12.5px; }
  .hero-actions { gap: 10px; }
}

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