:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --muted-light: #cbd5e1;
  --brand: #38bdf8;
  --brand-strong: #0284c7;
  --accent: #facc15;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(2, 6, 23, 0.48);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

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

.nav-container {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 16px 32px rgba(14, 165, 233, 0.28);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-light);
  font-weight: 600;
}

.desktop-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  color: var(--muted-light);
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 7s ease;
}

.hero-slide.is-active .hero-image {
  transform: scale(1.1);
}

.hero-layer,
.hero-side-layer {
  position: absolute;
  inset: 0;
}

.hero-layer {
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.65) 46%, rgba(15, 23, 42, 0.15) 100%);
}

.hero-side-layer {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.18) 58%, rgba(15, 23, 42, 0.82));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 42px;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-kicker::before,
.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 20px currentColor;
}

.hero h1 {
  margin: 18px 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  color: #ffffff;
  text-shadow: 0 16px 44px rgba(2, 6, 23, 0.68);
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  font-size: 19px;
  line-height: 1.8;
  color: #dbeafe;
}

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

.hero-meta span,
.detail-meta span,
.meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--muted-light);
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
}

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

.primary-btn,
.ghost-btn,
.global-search button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.global-search button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
  border: 0;
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.global-search button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 42px;
  background: #ffffff;
}

.home-search {
  position: relative;
  z-index: 3;
  margin-top: -36px;
}

.global-search {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.global-search input,
.filter-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: #ffffff;
  outline: 0;
  background: rgba(15, 23, 42, 0.9);
}

.global-search input:focus,
.filter-search input:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.content-section {
  padding: 76px 0;
}

.no-top-padding {
  padding-top: 24px;
}

.section-muted {
  background: rgba(15, 23, 42, 0.42);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-heading h2 {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: #ffffff;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.48);
  background: rgba(30, 41, 59, 0.76);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), transparent 48%);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 12px;
  padding: 0 10px;
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.82);
}

.rank-badge {
  left: 12px;
  min-width: 32px;
  color: #0f172a;
  background: var(--accent);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-line {
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
}

.meta-line span {
  min-height: 24px;
  padding: 3px 8px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 12px;
}

.two-column {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 36px;
}

.ranking-list,
.related-list {
  display: grid;
  gap: 14px;
}

.horizontal-card {
  display: flex;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.58);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(56, 189, 248, 0.38);
}

.horizontal-poster {
  width: 112px;
  min-height: 86px;
  flex: 0 0 112px;
  background: #111827;
}

.horizontal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horizontal-info {
  min-width: 0;
  padding: 12px 12px 12px 0;
}

.horizontal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #ffffff;
}

.horizontal-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-pill {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 999px;
  color: #0f172a;
  background: var(--accent);
  font-weight: 900;
  font-size: 12px;
}

.horizontal-info p {
  margin: 0 0 8px;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.horizontal-info span {
  color: var(--muted);
  font-size: 12px;
}

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

.category-tile,
.category-card-large a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 12rem),
    rgba(30, 41, 59, 0.58);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile {
  padding: 24px;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
}

.category-tile span,
.category-card-body h2 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-card-body p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
  height: 170px;
  background: rgba(2, 6, 23, 0.38);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

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

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 800;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  padding: 96px 0 64px;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.2), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.76));
  border-bottom: 1px solid var(--line);
}

.compact-hero h1 {
  margin: 12px 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-light);
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  position: sticky;
  top: 86px;
  z-index: 30;
  margin: 26px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.32);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.filter-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-light);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(14, 165, 233, 0.24);
}

.empty-state {
  margin: 16px 0 0;
  color: var(--muted);
}

.movie-card.is-hidden,
.horizontal-card.is-hidden {
  display: none;
}

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

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  padding-top: 24px;
}

.detail-primary {
  min-width: 0;
}

.player-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.58);
  box-shadow: var(--shadow);
}

.movie-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #0f172a;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.1));
  cursor: pointer;
  z-index: 4;
}

.movie-player.is-playing .play-overlay,
.play-overlay[hidden] {
  display: none;
}

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.42);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
  background: #ffffff;
}

.detail-card,
.text-panel,
.sticky-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.58);
  backdrop-filter: blur(14px);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

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

.detail-tags {
  margin-bottom: 22px;
}

.text-panel {
  padding: 22px;
  margin-top: 18px;
}

.text-panel h2,
.sticky-panel h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 20px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-light);
  line-height: 1.9;
  white-space: pre-line;
}

.detail-aside {
  min-width: 0;
}

.sticky-panel {
  position: sticky;
  top: 98px;
  padding: 20px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

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

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

  .detail-aside .sticky-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-copy {
    padding: 96px 0 48px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .global-search {
    display: grid;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

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

  .filter-panel {
    position: relative;
    top: auto;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .nav-container {
    min-height: 64px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 16px;
  }

  .hero {
    min-height: 560px;
  }

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

  .hero-actions {
    display: grid;
  }

  .content-section {
    padding: 52px 0;
  }

  .movie-grid,
  .full-grid,
  .mini-grid,
  .category-grid,
  .category-large-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-poster {
    width: 96px;
    flex-basis: 96px;
  }

  .detail-card,
  .text-panel,
  .sticky-panel {
    padding: 18px;
  }

  .play-circle {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
