:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #fbbf24;
  --amber-strong: #f59e0b;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
  --radius: 22px;
  --container: min(1180px, calc(100vw - 32px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(251, 191, 36, 0.12), transparent 28rem),
    radial-gradient(circle at 84% 8%, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 28rem, #111827 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.35);
}

.nav-shell {
  width: var(--container);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(251, 191, 36, 0.92));
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.2);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: #111827;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: var(--container);
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  width: var(--container);
  margin: 28px auto 56px;
}

.hero-stage {
  position: relative;
  min-height: 560px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  box-shadow: var(--shadow);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(15, 23, 42, 0.32) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 42%),
    radial-gradient(circle at 25% 22%, rgba(251, 191, 36, 0.18), transparent 22rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: clamp(28px, 7vw, 72px);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 850px;
  font-size: clamp(36px, 7vw, 70px);
}

.hero h2 {
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 52px);
}

.hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.85;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  color: #111827;
  background: var(--amber);
  box-shadow: 0 18px 45px rgba(251, 191, 36, 0.22);
}

.primary-button:hover {
  background: #fcd34d;
  transform: translateY(-2px);
}

.ghost-button,
.more-link {
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.ghost-button:hover,
.more-link:hover {
  border-color: rgba(251, 191, 36, 0.5);
  color: var(--amber);
  transform: translateY(-2px);
}

.hero-tabs {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: min(640px, calc(100% - 48px));
}

.hero-tab {
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.66);
  color: var(--soft);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  text-align: left;
  backdrop-filter: blur(10px);
}

.hero-tab.is-active {
  border-color: rgba(251, 191, 36, 0.75);
  color: var(--text);
}

.hero-tab img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-tab span {
  display: block;
  padding: 8px 10px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.hero-category-links {
  margin: 16px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-category-links a {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.66);
  border: 1px solid var(--line);
  color: var(--soft);
  font-weight: 700;
}

.hero-category-links a:hover {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.48);
}

.page-width,
.search-band,
.content-section,
.category-wall {
  width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  margin-bottom: 44px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--line);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.28);
}

.sticky-search {
  position: sticky;
  top: 88px;
  z-index: 20;
}

.search-band h2,
.section-heading h2,
.story-panel h2,
.tag-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
}

.search-band p,
.section-intro {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  outline: none;
  padding: 0 18px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
}

.search-box input:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.content-section,
.category-wall {
  margin-bottom: 58px;
}

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

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.25);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(2, 6, 23, 0.96));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border-radius: 10px;
  padding: 5px 8px;
  background: rgba(2, 6, 23, 0.85);
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #111827;
  background: var(--amber);
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  font-weight: 900;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-body h3 a:hover {
  color: var(--amber);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-body p {
  min-height: 42px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
  gap: 6px;
}

.tag-row span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
  background: rgba(51, 65, 85, 0.7);
}

.tag-row.large span {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.26);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.45);
}

.category-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-previews img {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.75);
}

.category-card strong {
  color: var(--text);
  font-size: 22px;
}

.category-card span:last-child {
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  width: var(--container);
  margin: 30px auto 44px;
  padding: clamp(32px, 6vw, 70px);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.78)),
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.16), transparent 26rem);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero.small-hero {
  min-height: 270px;
  display: flex;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--soft);
  line-height: 1.8;
  font-size: 18px;
}

.rank-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 26px;
  align-items: center;
}

.rank-spots {
  display: grid;
  gap: 12px;
}

.rank-spot {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

.rank-spot img {
  grid-row: span 3;
  width: 92px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-spot span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.rank-spot strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-spot em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 32px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.watch-main,
.detail-side,
.story-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #111827;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.player-cover-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18)),
    var(--poster-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.player-icon {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 22px 52px rgba(251, 191, 36, 0.28);
  transition: transform 0.22s ease, background 0.22s ease;
}

.player-cover:hover .player-icon {
  transform: scale(1.06);
  background: #fcd34d;
}

.video-player.is-playing .player-cover {
  display: none;
}

.player-error {
  position: absolute;
  inset: auto 18px 18px;
  z-index: 3;
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  background: rgba(127, 29, 29, 0.86);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.video-player.is-error .player-error {
  display: block;
}

.detail-copy {
  padding: 24px;
}

.detail-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
}

.lead {
  color: var(--soft);
  line-height: 1.8;
  font-size: 18px;
}

.detail-meta {
  margin-top: 18px;
}

.detail-side {
  padding: 16px;
  position: sticky;
  top: 92px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
}

.tag-panel {
  margin-top: 18px;
}

.tag-panel h2 {
  font-size: 20px;
}

.story-panel {
  margin-top: 26px;
  padding: 26px;
}

.story-panel h2 {
  font-size: 26px;
  margin-bottom: 14px;
}

.story-panel p {
  color: var(--soft);
  line-height: 1.95;
  font-size: 17px;
  margin: 0;
}

.review-panel {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.92));
}

.related-section {
  margin-top: 34px;
}

.site-footer {
  margin-top: 76px;
  background: rgba(2, 6, 23, 0.92);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: var(--container);
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--amber);
  font-size: 22px;
  font-weight: 850;
  margin-bottom: 12px;
}

.site-footer h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.site-footer p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--amber);
}

.footer-bottom {
  width: var(--container);
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

[data-search-item].is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-stage {
    min-height: 620px;
  }

  .hero-slide {
    align-items: start;
  }

  .hero-content {
    padding-bottom: 210px;
  }

  .hero-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-band,
  .rank-hero,
  .watch-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-grid,
  .category-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-side {
    position: static;
    max-width: 380px;
  }
}

@media (max-width: 720px) {
  :root {
    --container: min(100vw - 24px, 1180px);
  }

  .brand span:last-child {
    font-size: 18px;
  }

  .hero {
    margin-top: 16px;
  }

  .hero-stage {
    min-height: 700px;
    border-radius: 24px;
  }

  .hero-content {
    padding: 28px 22px 250px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero-tabs {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-tab:nth-child(n+5) {
    display: none;
  }

  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }

  .search-band,
  .page-hero,
  .story-panel {
    padding: 20px;
  }

  .rank-spot {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .rank-spot img {
    width: 78px;
  }
}
