:root {
  --bg: #08080a;
  --fg: #f4f4f5;
  --muted: #8e8e96;
  --faint: #55555c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hover: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blob: rgba(255, 255, 255, 0.10);
  --cell: rgba(255, 255, 255, 0.05);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  --radius: 18px;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f2f3;
    --fg: #0c0c0e;
    --muted: #66666e;
    --faint: #a0a0a8;
    --glass: rgba(255, 255, 255, 0.55);
    --glass-hover: rgba(255, 255, 255, 0.8);
    --line: rgba(0, 0, 0, 0.07);
    --line-strong: rgba(0, 0, 0, 0.14);
    --blob: rgba(0, 0, 0, 0.07);
    --cell: rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 20px 40px -30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}

a { color: inherit; text-decoration: none; }

.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.backdrop span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blob), transparent 65%);
  filter: blur(30px);
}
.backdrop span:nth-child(1) { width: 60vw; height: 60vw; top: -25vw; left: -15vw; }
.backdrop span:nth-child(2) { width: 50vw; height: 50vw; top: 30vh; right: -20vw; }
.backdrop span:nth-child(3) { width: 40vw; height: 40vw; bottom: -20vw; left: 25vw; opacity: 0.7; }

main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; fill: var(--fg); }
.brand b { font-weight: 600; }
.brand span { color: var(--muted); }
.brand span b { color: var(--fg); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.on i { background: var(--fg); box-shadow: 0 0 0 0 var(--line-strong); animation: pulse 2.4s infinite; }
.pill.on span { color: var(--fg); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--line-strong); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.search { margin: 26px 0 18px; font-size: 22px; letter-spacing: -0.02em; font-weight: 500; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 18px; margin: 0; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; }
.stat strong { display: block; font-size: 28px; font-weight: 500; letter-spacing: -0.03em; margin-top: 2px; }
.stat strong.none { font-size: 15px; color: var(--faint); font-weight: 400; margin-top: 12px; }

.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.muted { color: var(--faint); font-size: 12.5px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a, .list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 10px;
  margin: 0 -10px;
  border-radius: 12px;
  transition: background 0.15s;
}
.list a:hover { background: var(--glass-hover); }
.list .name { font-weight: 500; }
.list .meta { color: var(--muted); font-size: 13px; }
.list .side { text-align: right; white-space: nowrap; }
.list .price { font-weight: 500; }
.list .when { color: var(--faint); font-size: 12.5px; }
.list.compact a, .list.compact .row { padding: 9px 10px; }
.empty { color: var(--faint); padding: 14px 0 6px; margin: 0; }

.grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.grid .glass { margin-bottom: 0; }
.stack { display: grid; gap: 16px; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.feed li { display: grid; grid-template-columns: 86px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.feed li:first-child { border-top: 0; }
.feed .tag { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.feed .tag.hot { color: var(--fg); }
.feed .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .what span { color: var(--muted); }
.feed time { color: var(--faint); font-size: 12px; white-space: nowrap; }

.heat { display: grid; grid-template-columns: 30px repeat(24, 1fr); gap: 3px; font-size: 10.5px; color: var(--faint); }
.heat b { font-weight: 400; align-self: center; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--cell); }
.heat .h { text-align: center; }
.heat-note { margin: 10px 0 0; color: var(--faint); font-size: 12.5px; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.bars .bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--cell); overflow: hidden; }
.bars .bar span { display: block; height: 100%; background: var(--fg); opacity: 0.75; border-radius: 4px; }

footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; color: var(--faint); font-size: 12.5px; }
footer a:hover { color: var(--fg); }

@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .search { font-size: 19px; }
}

@media (max-width: 520px) {
  main { padding: 20px 14px 40px; }
  .brand { font-size: 15px; gap: 8px; }
  .pill { min-width: 0; padding: 6px 12px; }
  .pill span { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
  .list a, .list .row { align-items: flex-start; }
  .feed li { grid-template-columns: 72px 1fr; }
  .feed time { grid-column: 2; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .pill.on i { animation: none; }
}
