:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.16), transparent 28rem),
    var(--bg);
  line-height: 1.6;
}

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

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

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.34);
}

.logo-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.1s ease;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-backdrop,
.detail-backdrop,
.category-overview-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.25)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 42%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 96px 24px 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--blue);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.32);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  color: #dbeafe;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 30px;
}

.hero-meta span,
.hero-meta a,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.52);
}

.hero-actions,
.detail-copy .primary-button {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 14px 40px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: #1d4ed8;
}

.ghost-button,
.section-more {
  min-height: 46px;
  padding: 0 20px;
  color: #dbeafe;
  border: 1px solid rgba(191, 219, 254, 0.24);
  background: rgba(15, 23, 42, 0.56);
}

.small-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  width: min(1280px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 1px solid rgba(191, 219, 254, 0.2);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-arrow:hover,
.hero-dot:hover,
.hero-dot.is-active {
  background: var(--blue);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.intro-section {
  padding-top: 40px;
}

.intro-panel,
.text-panel,
.side-card,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64));
  box-shadow: var(--shadow);
}

.intro-panel {
  padding: clamp(26px, 4vw, 44px);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.text-panel h2,
.side-card h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.intro-panel h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.intro-panel p {
  max-width: 820px;
  color: var(--muted-strong);
  font-size: 18px;
}

.intro-search,
.page-search {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  outline: none;
}

input[type="search"]:focus {
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

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

.section-heading h2 {
  font-size: clamp(26px, 3.4vw, 40px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.category-card,
.category-overview-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-image: var(--category-image);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.category-card {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
}

.category-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92)),
    rgba(2, 6, 23, 0.18);
  transition: background 0.2s ease;
}

.category-card:hover .category-layer {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.12), rgba(2, 6, 23, 0.95)),
    rgba(37, 99, 235, 0.18);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card span:last-child {
  color: #cbd5e1;
  font-size: 14px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.58);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

.poster-frame,
.ranking-poster,
.detail-poster {
  background-image: var(--poster-image);
  background-size: cover;
  background-position: center;
  background-color: #111827;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.62));
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--blue);
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover,
.ranking-info h2 a:hover,
.category-samples a:hover,
.side-card a:hover {
  color: #93c5fd;
}

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.movie-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #93c5fd;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.16);
}

.movie-meta {
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
}

.movie-meta a {
  color: #93c5fd;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.panel-title {
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 900;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.rank-number {
  grid-row: span 2;
  color: #60a5fa;
  font-weight: 900;
  font-size: 20px;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.34), transparent 28rem),
    linear-gradient(135deg, #020617, #0f172a);
}

.slim-hero,
.category-hero {
  padding: 86px 24px 64px;
}

.page-hero-content {
  max-width: 1280px;
  margin: 0 auto;
}

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

.page-hero p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #93c5fd;
  font-size: 14px;
}

.category-overview-card {
  min-height: 260px;
  padding: 26px;
}

.category-overview-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 208px;
  flex-direction: column;
  justify-content: end;
}

.category-overview-content h2 {
  margin: 0 0 8px;
  font-size: 25px;
}

.category-overview-content p {
  color: #cbd5e1;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.category-samples a {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.ranking-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
}

.ranking-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  background: var(--blue);
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.ranking-info p {
  color: var(--muted-strong);
}

.detail-hero {
  min-height: 560px;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 72px 24px 62px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 900px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 780px;
  color: #dbeafe;
  font-size: 20px;
}

.detail-tags {
  margin-top: 18px;
  margin-bottom: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-button.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 18px 60px rgba(37, 99, 235, 0.42);
}

.text-panel {
  padding: clamp(22px, 3vw, 34px);
}

.text-panel h2,
.side-card h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 94px;
}

.side-card {
  padding: 24px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: #64748b;
}

.side-card dd {
  margin: 0;
  color: var(--muted-strong);
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 32px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
}

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

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 28px;
}

.footer-logo {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
}

.footer-links,
.footer-categories {
  display: grid;
  gap: 10px;
  align-content: start;
}

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

.footer-links a:hover,
.footer-categories a:hover {
  color: #93c5fd;
}

.footer-bottom {
  padding: 18px 24px;
  text-align: center;
  color: #64748b;
  border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: grid;
    gap: 4px;
  }

  .hero-content {
    min-height: 74vh;
    padding-top: 84px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .large-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-hero-content,
  .detail-hero-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

  .intro-search,
  .page-search,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .category-grid,
  .category-overview-grid,
  .movie-grid,
  .large-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .play-icon {
    width: 64px;
    height: 64px;
  }
}
