:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --yellow: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 78% 8%, rgba(59, 130, 246, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #07111f 52%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.header-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #001018;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #67e8f9 46%, #f8fafc);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text strong,
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-nav-link {
  color: var(--soft);
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  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;
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav-link {
  display: block;
  padding: 13px 16px;
  margin: 4px 0;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.05) 42%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 82px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow,
.hero-badges,
.movie-tags,
.wide-tags,
.rank-meta,
.detail-meta,
.card-meta,
.category-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.eyebrow span,
.hero-badges span,
.movie-tags span,
.wide-tags span,
.rank-meta span,
.detail-meta span,
.category-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.76);
}

.eyebrow strong,
.hero-badges strong,
.card-meta strong,
.rank-meta strong,
.score-pill {
  color: #020617;
  background: var(--yellow);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 900;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.hero-lead {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.55;
  text-shadow: 0 12px 35px rgba(0, 0, 0, 0.55);
}

.hero-summary {
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.8;
  max-width: 60ch;
}

.hero-actions,
.section-head,
.list-head,
.detail-actions,
.wide-actions,
.player-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-action-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.btn-soft,
.btn-ghost,
.wide-actions a,
.player-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn {
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, var(--cyan));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.btn-soft,
.wide-actions a,
.player-actions a {
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.btn-ghost {
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
}

.btn:hover,
.btn-soft:hover,
.btn-ghost:hover,
.wide-actions a:hover,
.player-actions a:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 46px;
  display: flex;
  gap: 10px;
}

.hero-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 38px;
  background: var(--cyan);
}

.section,
.page-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 72px 0;
}

.section.alt {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100vw - 1240px) / 2));
  background: rgba(15, 23, 42, 0.28);
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

.section h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.detail-title p,
.category-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 330px);
  gap: 22px;
  overflow-x: auto;
  padding: 8px 2px 22px;
  scroll-snap-type: x proximity;
}

.scroller > * {
  scroll-snap-align: start;
}

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

.movie-card {
  min-width: 0;
}

.movie-card.featured {
  width: 320px;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(8, 47, 73, 0.72));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.movie-card.featured .poster-link,
.wide-cover {
  aspect-ratio: 16 / 9;
}

.movie-cover,
.poster-link img,
.wide-cover img,
.rank-cover img,
.detail-poster img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72) 0%, transparent 58%);
  opacity: 0.65;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 18px);
  opacity: 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.poster-link:hover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.poster-link:hover .poster-shade {
  opacity: 1;
}

.poster-link:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, 0);
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 145, 178, 0.88);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  padding: 14px 2px 0;
}

.movie-card h3,
.wide-card h3,
.rank-content h2,
.category-card h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.35;
}

.movie-card h3 {
  font-size: 16px;
}

.movie-card h3 a,
.wide-card h3 a,
.rank-content h2 a,
.category-card h2 a {
  transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover,
.rank-content h2 a:hover,
.category-card h2 a:hover {
  color: var(--cyan);
}

.card-line {
  min-height: 44px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wide-list,
.rank-list,
.catalog-list {
  display: grid;
  gap: 18px;
}

.wide-card,
.rank-row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.wide-cover,
.rank-cover,
.detail-poster,
.category-card-media {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(8, 47, 73, 0.72));
}

.wide-body,
.rank-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-card h3 {
  margin: 14px 0 10px;
  font-size: 24px;
}

.wide-card p,
.rank-content p,
.detail-copy p,
.article-block p {
  color: var(--soft);
  line-height: 1.8;
}

.wide-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.wide-actions strong {
  color: var(--yellow);
  font-size: 18px;
}

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

.category-tile,
.category-card,
.info-panel,
.article-block {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -58px;
  top: -60px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.14);
}

.category-tile strong {
  font-size: 21px;
}

.category-tile span {
  color: var(--cyan);
  font-weight: 800;
}

.page-main {
  padding: 56px 0 76px;
}

.page-title {
  margin-bottom: 34px;
}

.page-title p {
  max-width: 760px;
  margin: 14px 0 0;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 26px 0 34px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.74);
  outline: none;
}

.search-input:focus {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

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

.category-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.category-card-media {
  border-radius: 0;
  min-height: 220px;
}

.category-card-body {
  padding: 24px;
}

.category-card h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.rank-row {
  grid-template-columns: 72px 110px minmax(0, 1fr);
  align-items: center;
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #001018;
  background: linear-gradient(135deg, #facc15, #67e8f9);
  font-weight: 900;
  font-size: 20px;
}

.rank-cover {
  aspect-ratio: 3 / 4;
}

.rank-content h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.rank-meta {
  margin-top: 12px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.86) 52%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.54) 100%);
}

.detail-shell {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 54px 0;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title p {
  max-width: 760px;
  font-size: 18px;
}

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

.movie-tags {
  margin-top: 20px;
}

.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 56px auto 0;
}

.player-frame {
  position: relative;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.46) 100%);
}

.play-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
  box-shadow: 0 22px 50px rgba(34, 211, 238, 0.28);
  font-size: 30px;
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-icon {
  transform: scale(1.05);
}

.content-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 46px auto 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-block {
  padding: 28px;
  margin-bottom: 22px;
}

.article-block h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.info-panel {
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.info-list {
  display: grid;
  gap: 13px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list span {
  color: var(--muted);
}

.info-list strong {
  text-align: right;
}

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

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

.footer-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.footer-brand {
  color: var(--text);
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 540px;
}

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

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

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.empty-state.is-visible {
  display: block;
}

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

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

  .detail-shell,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 300px;
  }

  .info-panel {
    position: static;
  }
}

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

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

  body.menu-open .mobile-nav {
    display: block;
  }

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 640px;
  }

  .hero-inner {
    align-items: center;
    padding: 96px 0 92px;
  }

  .hero-controls {
    right: 16px;
    bottom: 24px;
  }

  .hero-dots {
    left: 16px;
    transform: none;
    bottom: 42px;
  }

  .section,
  .section.alt,
  .page-main {
    padding-top: 48px;
    padding-bottom: 48px;
  }

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

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

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

  .rank-row {
    gap: 14px;
  }

  .rank-cover {
    width: 120px;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .detail-shell {
    padding: 36px 0;
  }

  .content-layout {
    margin-top: 34px;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .header-shell,
  .section,
  .page-main,
  .detail-shell,
  .player-section,
  .content-layout,
  .footer-shell {
    width: min(100% - 24px, 1240px);
  }

  .movie-grid,
  .related-grid {
    gap: 14px;
  }

  .card-line {
    display: none;
  }

  .movie-card h3 {
    font-size: 14px;
  }
}
