:root {
  --bg: #07090d;
  --panel: #101721;
  --panel-2: #172230;
  --ink: #edf4f6;
  --muted: #9eadb8;
  --line: rgba(210, 226, 232, 0.16);
  --cyan: #5fd4d0;
  --lime: #c4e86b;
  --rose: #e45f78;
  --amber: #f1c36a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 12% 8%, rgba(95, 212, 208, 0.18), transparent 34%),
    radial-gradient(circle at 90% 15%, rgba(228, 95, 120, 0.16), transparent 30%),
    var(--bg);
  letter-spacing: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 15px 0;
  background: rgba(7, 9, 13, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-size: 22px;
  font-weight: 900;
}

.brand-dot {
  width: 38px;
  height: 38px;
  border: 2px solid var(--cyan);
  background:
    linear-gradient(90deg, transparent 42%, rgba(95,212,208,0.95) 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(196,232,107,0.95) 42% 58%, transparent 58%);
  box-shadow: 0 0 26px rgba(95, 212, 208, 0.35);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.nav a,
.top-action,
.chip-link,
.button-link {
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.82);
  color: var(--ink);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.nav a {
  padding: 10px 14px;
  font-size: 14px;
}

.top-action,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  font-weight: 800;
}

.nav a:hover,
.nav a.active,
.top-action:hover,
.chip-link:hover,
.button-link:hover {
  border-color: var(--cyan);
  background: rgba(95, 212, 208, 0.12);
  transform: translateY(-2px);
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

h1,
h2,
h3,
p,
span {
  overflow-wrap: anywhere;
}

.hero-console {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  min-width: 0;
  padding: 38px 0 16px;
}

.hero-screen {
  min-height: 520px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.screen-card {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 520px;
  overflow: hidden;
}

.screen-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(1.05) contrast(1.05);
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.screen-card:hover img {
  transform: scale(1.04);
  opacity: 0.72;
}

.screen-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 10%, rgba(7,9,13,0.45) 45%, rgba(7,9,13,0.92) 100%);
}

.screen-info {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 28px;
}

.eyebrow,
.section-head p {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.screen-info h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 1.02;
}

.screen-info p,
.lead {
  color: #c8d5dc;
  line-height: 1.75;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(23, 34, 48, 0.86), rgba(16, 23, 33, 0.62));
  padding: 30px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 94px);
  line-height: 0.95;
}

.lead {
  margin: 18px 0 0;
  font-size: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.metric-row span {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 14px;
  color: var(--muted);
  background: rgba(7,9,13,0.4);
}

.metric-row b {
  display: block;
  color: var(--lime);
  font-size: 24px;
}

.control-strip {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 16px 0;
}

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

.quick-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.72);
  padding: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.quick-card:hover {
  transform: translateY(-6px);
  border-color: var(--lime);
}

.mini-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #05070a;
}

.mini-poster img,
.lane-poster img,
.preview-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-card h3 {
  margin: 4px 0 8px;
  font-size: 16px;
  line-height: 1.25;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding-top: 48px;
}

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

.section-head.small {
  display: block;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.channel-card {
  position: relative;
  min-height: 330px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.channel-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.channel-card:hover img {
  transform: scale(1.08);
  opacity: 0.62;
}

.channel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(7,9,13,0.22), rgba(7,9,13,0.9));
}

.channel-content h3 {
  margin: 0;
  font-size: 24px;
}

.channel-content ul {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.channel-content li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: #d8e4e9;
  font-size: 14px;
}

.channel-content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dual-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.36fr);
  gap: 20px;
  min-width: 0;
}

.focus-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.focus-item {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.78);
  padding: 16px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.focus-item:hover {
  border-color: var(--rose);
  background: rgba(228, 95, 120, 0.12);
  transform: translateY(-4px);
}

.focus-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.focus-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span,
.score-badge {
  border: 1px solid var(--line);
  padding: 5px 8px;
  color: #dbe8ec;
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 800;
}

.watch-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(7,9,13,0.5);
  padding: 16px;
}

.trend-list {
  display: grid;
  gap: 8px;
}

.trend-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(210,226,232,0.12);
}

.trend-item b {
  color: var(--amber);
  font-size: 22px;
}

.trend-item strong,
.trend-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-item small {
  color: var(--muted);
}

.ribbon-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.ribbon-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(23, 34, 48, 0.62);
  padding: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.ribbon-card:hover {
  transform: translateX(6px);
  border-color: var(--cyan);
}

.lane-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #05070a;
}

.ribbon-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.ribbon-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  padding-top: 54px;
}

.support-grid article,
.footer {
  border-top: 1px solid var(--line);
}

.support-grid article {
  min-width: 0;
  padding: 20px 0;
}

.support-grid h2 {
  margin: 0 0 10px;
  color: var(--cyan);
}

.support-grid p,
.footer p {
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 24px;
  width: min(1200px, calc(100% - 32px));
  margin: 54px auto 0;
  padding: 28px 0 36px;
}

.copyright {
  align-self: end;
}

.library-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 24px;
  align-items: end;
  min-width: 0;
  padding: 42px 0 24px;
  border-bottom: 1px solid var(--line);
}

.library-copy h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.08;
}

.library-count {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--cyan);
  background: rgba(95, 212, 208, 0.08);
}

.library-count b {
  color: var(--lime);
  font-size: 56px;
}

.library-count span {
  color: var(--muted);
}

.browse-console {
  display: grid;
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
  gap: 18px;
  min-width: 0;
  padding-top: 22px;
}

.preview-panel {
  position: sticky;
  top: 86px;
  min-width: 0;
  align-self: start;
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.76);
  overflow: hidden;
}

.preview-poster {
  aspect-ratio: 16 / 20;
  overflow: hidden;
}

.preview-info {
  padding: 18px;
}

.preview-info h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.preview-info p {
  color: var(--muted);
  line-height: 1.7;
}

.browse-main {
  min-width: 0;
}

.filter-bar {
  position: sticky;
  top: 82px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) minmax(150px, 210px);
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(7,9,13,0.88);
  backdrop-filter: blur(16px);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  height: 43px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #0b1119;
  padding: 0 11px;
  outline: none;
}

.browse-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.browse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 86px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(210,226,232,0.12);
  background: rgba(16, 23, 33, 0.58);
  padding: 14px 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.browse-row:hover {
  transform: translateX(5px);
  border-color: var(--cyan);
  background: rgba(95, 212, 208, 0.09);
}

.browse-row strong,
.browse-row small,
.browse-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-row strong {
  display: block;
  font-size: 17px;
}

.browse-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 0.68fr);
  gap: 28px;
  min-width: 0;
  padding-top: 46px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-copy {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.72);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1.02;
}

.detail-copy p {
  color: #c8d5dc;
  line-height: 1.78;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 18px;
  min-width: 0;
  padding-top: 22px;
}

.story-card,
.facts-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(16, 23, 33, 0.62);
  padding: 20px;
}

.story-card h2,
.facts-card h2 {
  margin: 0 0 12px;
  color: var(--cyan);
}

.facts-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.facts-card dt {
  color: var(--muted);
}

.facts-card dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

@media (max-width: 980px) {
  .topbar,
  .hero-console,
  .dual-zone,
  .library-shell,
  .browse-console,
  .detail-hero,
  .detail-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: start;
    overflow-x: auto;
  }

  .quick-picks,
  .channel-grid,
  .focus-board,
  .ribbon-list,
  .support-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-panel,
  .filter-bar {
    position: static;
  }
}

@media (max-width: 620px) {
  main,
  .topbar,
  .footer {
    width: min(100% - 24px, 1200px);
  }

  .top-action {
    display: none;
  }

  .hero-screen,
  .screen-card {
    min-height: 420px;
  }

  .metric-row,
  .quick-picks,
  .channel-grid,
  .focus-board,
  .ribbon-list,
  .support-grid,
  .related-grid,
  .filter-bar,
  .browse-row {
    grid-template-columns: 1fr;
  }

  .ribbon-card {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .ribbon-card .score-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }
}


/* stable responsive guards */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; }
h1, h2, h3, h4, p, a, span, strong, small, b, em, li { min-width: 0; overflow-wrap: anywhere; }
main, header, footer, section, article, aside, nav, div { min-width: 0; }
.poster-grid, .feature-grid, .movie-grid, .library-grid, .library-list, .related-grid, .content-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
