:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #070910;
  --panel: #111725;
  --panel-2: #161f31;
  --ink: #f7f8fb;
  --muted: #9ba8bd;
  --line: rgba(255,255,255,.12);
  --pink: #ff4f7b;
  --cyan: #5dd9ff;
  --violet: #9e7bff;
  --gold: #f3c65c;
  --shadow: 0 20px 44px rgba(0,0,0,.38);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(255,79,123,.18), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(93,217,255,.14), transparent 28%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1,h2,h3,p { margin-top: 0; }
button,input,select { font: inherit; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(7,9,16,.88);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 950;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
}
.nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.nav a,.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}
.nav a.active,.nav a:hover {
  color: #fff;
  border-color: rgba(255,79,123,.36);
  background: rgba(255,79,123,.18);
}
.pill {
  color: #070910;
  background: var(--cyan);
}

.stream,.page-title,.filters,.section,.detail,.footer {
  width: min(1320px, calc(100% - 36px));
  margin: 16px auto 0;
}
.stream { display: grid; gap: 14px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, .58fr);
  gap: 12px;
  align-items: stretch;
}
.hero-main {
  height: 350px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-main a { position: relative; display: block; height: 100%; }
.hero-main a::after,.cover::after,.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(0,0,0,.84));
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 2;
}
.hero-copy p {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #070910;
  background: var(--cyan);
  font-weight: 950;
}
.hero-copy h1 {
  margin-bottom: 7px;
  font-size: clamp(2rem, 4.6vw, 4.3rem);
  line-height: 1;
}
.hero-copy span { color: rgba(255,255,255,.9); font-weight: 950; }
.rank-card {
  height: 350px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,79,123,.14), rgba(93,217,255,.08)), var(--panel);
}
.rank-card h2,.list-panel h2 {
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 1.08rem;
}
.quick-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.strip-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 86px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.strip-art {
  height: 70px;
  overflow: hidden;
  border-radius: 8px;
}
.strip-copy b,.strip-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-copy b {
  margin-bottom: 4px;
  font-size: .88rem;
  line-height: 1.3;
}
.strip-copy small {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}

.channels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.channel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 86px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.channel img {
  height: 70px;
  border-radius: 8px;
}
.channel b,.channel small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel b { font-size: .96rem; }
.channel small { margin-top: 5px; color: var(--muted); }

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 12px;
}
.list-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.list-panel.accent {
  background: linear-gradient(135deg, rgba(158,123,255,.14), rgba(93,217,255,.08)), var(--panel);
}
.label {
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 950;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 15px;
  border-radius: 999px;
  color: #070910;
  background: var(--gold);
  font-weight: 950;
}
.text-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 36px;
  border-top: 1px solid var(--line);
}
.text-link span { color: var(--pink); font-weight: 950; }
.text-link b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-link em {
  color: var(--gold);
  font-style: normal;
  font-weight: 950;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 3px; font-size: 1.24rem; }
.section-head p,.tile-copy p,.page-title p,.detail-copy p,.footer p,.list-panel p {
  color: var(--muted);
  line-height: 1.58;
}
.section-head a,#resultCount {
  color: var(--cyan);
  font-weight: 950;
}
.collection-grid,.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}
.tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(93,217,255,.42);
  box-shadow: 0 14px 30px rgba(0,0,0,.34);
}
.cover {
  position: relative;
  aspect-ratio: 3 / 4.08;
  overflow: hidden;
  background: #151b28;
}
.cover span {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 999px;
  color: #070910;
  background: var(--cyan);
  font-size: .72rem;
  font-weight: 950;
}
.tile-copy { padding: 9px; }
.tile-copy h3 {
  margin-bottom: 5px;
  min-height: 2.42em;
  font-size: .9rem;
  line-height: 1.21;
}
.tile-copy p {
  margin-bottom: 7px;
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
}
.tile-copy b { color: var(--gold); }
.tile-copy em { font-style: normal; }

.page-title {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,79,123,.14), rgba(93,217,255,.08)), var(--panel);
  box-shadow: var(--shadow);
}
.page-title h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1;
}
.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.search-form { display: flex; gap: 8px; }
.search-form input,.search-form button,.filter-buttons button,.filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0c111d;
  color: var(--ink);
  font-weight: 900;
}
.search-form input { width: 100%; padding: 0 14px; }
.search-form button,.filter-buttons button,.filters select { padding: 0 13px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form button,.filter-buttons button:hover {
  color: #070910;
  background: var(--cyan);
}

.detail {
  display: grid;
  grid-template-columns: minmax(260px, 350px) minmax(0,1fr);
  gap: 16px;
  align-items: stretch;
}
.detail-cover {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.detail-copy {
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.detail-copy h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1;
}
.origin { font-weight: 950; color: var(--cyan); }
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.badges span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #070910;
  background: var(--cyan);
  font-weight: 950;
}

.footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(4, minmax(130px, .7fr));
  gap: 18px;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,79,123,.12), rgba(93,217,255,.08)), var(--panel);
}
.footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 1.18rem;
}
.footer h3 { margin-bottom: 9px; font-size: .95rem; }
.footer a {
  display: block;
  margin: 7px 0;
  color: var(--muted);
}
.footer a:hover { color: var(--cyan); }
.footer-copy {
  padding: 14px;
  border: 1px solid rgba(243,198,92,.42);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  background: rgba(243,198,92,.12);
}
.footer-copy h3 { color: var(--gold); }
.footer-copy p {
  margin-bottom: 6px;
  color: rgba(247,248,251,.9);
  font-weight: 850;
}
.footer-copy p:first-of-type {
  color: #fff;
  font-weight: 950;
}
.image-missing { outline: 2px solid var(--pink); }

@media (max-width: 1120px) {
  .hero,.dashboard,.detail { grid-template-columns: 1fr; }
  .hero-main { height: auto; aspect-ratio: 16 / 8; }
  .rank-card { height: auto; }
  .quick-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid,.mosaic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .header { grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .nav { justify-content: start; }
  .stream,.page-title,.filters,.section,.detail,.footer { width: calc(100% - 24px); }
  .hero-main { aspect-ratio: 16 / 10; }
  .quick-row,.channels,.collection-grid,.mosaic-grid,.footer { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-cover { min-height: auto; aspect-ratio: 2 / 2.8; }
}
