:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #111820;
  --panel-2: #172330;
  --ink: #f2f6f8;
  --muted: #9aaab5;
  --line: #263745;
  --cyan: #00b8c8;
  --red: #e6574f;
  --lime: #b7d85b;
  --shadow: 0 24px 58px rgba(0,0,0,.38);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% 5%, rgba(0,184,200,.20), transparent 32%),
    linear-gradient(180deg, #0b1118, var(--bg) 42%);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
h1, h2, h3, p { margin: 0; }
button, select { font: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(8,11,15,.92);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #061014;
  background: var(--cyan);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.rail nav {
  display: grid;
  align-content: start;
  gap: 9px;
}

.rail nav a,
.stage-head a,
.actions a,
.section-head a,
.tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  font-weight: 800;
  white-space: nowrap;
}

.rail nav a {
  justify-content: flex-start;
}

.rail nav a.active,
.rail nav a:hover,
.stage-head a,
.actions a:first-child,
.tabs button.active {
  color: #061014;
  border-color: var(--cyan);
  background: var(--cyan);
}

.rail-copy {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rail-copy b {
  color: var(--ink);
}

.stage {
  min-width: 0;
  padding: 22px 22px 34px;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.label {
  margin-bottom: 7px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.stage-head h1 {
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1;
}

.spotlight {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.spot-card,
.ticker div,
.rail-section,
.rank-panel,
.compact-panel,
.library-head,
.filter-line,
.catalog-card,
.detail-panel,
.daily-picks {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17,24,32,.86);
  box-shadow: var(--shadow);
}

.spot-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
}

.spot-card img {
  height: 100%;
  object-fit: cover;
  opacity: .88;
}

.spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 34%, rgba(0,0,0,.82));
}

.spot-card span {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 3px;
}

.spot-card em {
  color: var(--lime);
  font-style: normal;
  font-weight: 900;
}

.spot-card b {
  font-size: 18px;
  line-height: 1.12;
}

.ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.ticker div {
  min-height: 78px;
  padding: 14px;
}

.ticker b {
  display: block;
  color: var(--lime);
  font-size: 34px;
}

.ticker span {
  color: var(--muted);
  font-weight: 800;
}

.rail-section,
.bottom-grid,
.library-head,
.filter-line,
.catalog-grid,
.detail-panel,
.daily-picks {
  margin-top: 16px;
}

.rail-section,
.rank-panel,
.compact-panel,
.library-head,
.filter-line,
.daily-picks {
  padding: 16px;
}

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

.section-head h2 {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.04;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 126px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.scroll-row.large {
  grid-auto-columns: 150px;
}

.row-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.row-card img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.rank-item i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #061014;
  background: var(--lime);
  border-radius: 50%;
  font-style: normal;
  font-weight: 900;
}

.rank-item strong {
  color: var(--red);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.compact-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 74px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.compact-card img {
  width: 54px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.spot-card b,
.row-card b,
.rank-item b,
.compact-card b,
.catalog-card b {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.spot-card small,
.row-card small,
.rank-item small,
.compact-card small,
.catalog-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.library-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.library-head h1,
.detail-panel h1 {
  margin-bottom: 8px;
  font-size: clamp(38px, 5vw, 70px);
  line-height: 1;
}

.library-head p,
.detail-panel p,
.footer p {
  color: var(--muted);
  line-height: 1.78;
}

.library-head strong {
  color: var(--lime);
  font-size: 40px;
  white-space: nowrap;
}

.filter-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-line label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-line select {
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.catalog-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  min-height: 106px;
  padding: 8px;
  box-shadow: none;
}

.catalog-card img {
  width: 74px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}

.catalog-card em {
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.catalog-card small {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.catalog-card strong {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #061014;
  border-radius: 50%;
  background: var(--cyan);
}

.detail-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  align-items: center;
  padding: 20px;
}

.detail-panel > img {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-meta span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-weight: 800;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
}

.footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 24px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer b {
  color: var(--cyan);
  font-size: 24px;
}

.footer h3 {
  margin: 0 0 10px;
  color: var(--cyan);
}

.footer a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.empty {
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .rail {
    position: static;
    height: auto;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .rail nav {
    display: flex;
    overflow-x: auto;
  }
  .rail-copy {
    grid-column: 1 / -1;
  }
  .spotlight,
  .bottom-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .stage {
    padding: 14px;
  }
  .stage-head,
  .library-head,
  .filter-line,
  .footer {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }
  .ticker,
  .compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .catalog-card,
  .detail-panel {
    grid-template-columns: 1fr;
  }
  .detail-panel > img {
    width: min(280px, 100%);
  }
}

@media (max-width: 520px) {
  .rail {
    padding: 14px;
  }
  .spotlight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scroll-row,
  .scroll-row.large {
    grid-auto-columns: 118px;
  }
  .catalog-card {
    grid-template-columns: 66px minmax(0, 1fr);
  }
  .catalog-card img {
    width: 66px;
    height: 84px;
  }
  .catalog-card strong {
    display: none;
  }
}
