:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --panel-light: #f8fafc;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(34, 211, 238, 0.35);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dark-text: #0f172a;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --gold: #facc15;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.20), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #111827 100%);
}

body.light-page {
  color: var(--dark-text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 55%, #f1f5f9 100%);
}

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

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

.page-shell {
  min-height: 100vh;
  padding-top: 72px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.90), rgba(15, 23, 42, 0.94));
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
  transition: transform 220ms ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-name {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: transparent;
  background: linear-gradient(90deg, #bae6fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #bfdbfe;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.88);
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a:hover {
  color: #67e8f9;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
  width: min(280px, 28vw);
}

.search-form input,
.filter-input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  padding: 0 14px 0 40px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-form input::placeholder,
.filter-input::placeholder {
  color: #94a3b8;
}

.search-form input:focus,
.filter-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
  background: rgba(15, 23, 42, 0.82);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.20);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 22px;
  display: grid;
  gap: 14px;
}

.mobile-nav a {
  padding: 9px 0;
  color: #dbeafe;
  font-weight: 700;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(30, 64, 175, 0.82), rgba(15, 23, 42, 0.96) 48%, rgba(8, 47, 73, 0.90)),
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.20), transparent 24rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  padding: 82px 0 74px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(14, 165, 233, 0.16);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-title,
.detail-title {
  margin: 0;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(40px, 6vw, 72px);
  color: transparent;
  background: linear-gradient(90deg, #a5f3fc, #bfdbfe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 700px;
  margin: 22px 0 30px;
  color: #dbeafe;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.hero-buttons,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.30);
}

.btn-secondary {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-primary:hover {
  box-shadow: 0 24px 44px rgba(37, 99, 235, 0.42);
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-item {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms ease;
}

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

.hero-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.hero-item:hover img {
  transform: scale(1.06);
}

.hero-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.18) 40%, rgba(2, 6, 23, 0.92));
}

.hero-item-content {
  position: relative;
  z-index: 1;
  padding: 32px;
}

.hero-item-title {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
}

.hero-item-desc {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badge,
.tag,
.meta-pill,
.year-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.hero-arrow:hover {
  background: rgba(14, 165, 233, 0.82);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 14px;
}

.hero-next {
  right: 14px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 32px;
  bottom: 20px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dots button.is-active {
  width: 28px;
  background: #67e8f9;
}

.main-area {
  padding: 56px 0 72px;
}

.section {
  margin-bottom: 58px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-title,
.page-title {
  color: #f8fafc;
}

.light-page .section-title,
.light-page .page-title,
.light-page .detail-title {
  color: #0f172a;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.more-link {
  color: #22d3ee;
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.18);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.light-page .movie-card {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.20);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 52px rgba(14, 165, 233, 0.18);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.86));
  opacity: 0.78;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.year-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.74);
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0;
  min-height: 42px;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.light-page .card-title {
  color: #0f172a;
}

.card-title:hover {
  color: #0284c7;
}

.card-meta,
.card-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  min-height: 188px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.82), rgba(30, 64, 175, 0.84)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.30), transparent 12rem);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.84), rgba(79, 70, 229, 0.84));
}

.category-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(14, 165, 233, 0.74));
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 58px rgba(14, 165, 233, 0.28);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.65;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.light-page .rank-item {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.22);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #22d3ee);
  font-weight: 950;
}

.rank-thumb {
  width: 72px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.rank-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 58px 0 36px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.86));
  color: #ffffff;
}

.page-title {
  font-size: clamp(34px, 5vw, 56px);
}

.filter-panel {
  margin: 28px 0 26px;
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 14px;
  align-items: center;
}

.filter-panel .filter-input {
  color: #0f172a;
  background: #ffffff;
  padding-left: 16px;
}

.filter-status {
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb {
  margin-bottom: 20px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-page {
  padding: 42px 0 72px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 28px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 22px 58px rgba(2, 6, 23, 0.42);
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-title {
  color: #f8fafc;
  font-size: clamp(30px, 4.5vw, 52px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}

.detail-summary {
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.tag {
  color: #cffafe;
  background: rgba(8, 47, 73, 0.68);
}

.player-section,
.story-section,
.related-section {
  margin-top: 34px;
  padding: 28px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 20px 58px rgba(2, 6, 23, 0.22);
}

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

.player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button-core {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.36);
}

.story-section h2,
.player-section h2,
.related-section h2 {
  margin: 0 0 18px;
  color: #f8fafc;
  font-size: 26px;
  font-weight: 950;
}

.story-section p {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  padding: 34px 0 42px;
  color: #94a3b8;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
}

.footer-title {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-weight: 950;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a:hover {
  color: #67e8f9;
}

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

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

@media (max-width: 900px) {
  .site-nav,
  .header-actions {
    display: none;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 60px 0 58px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .header-inner {
    height: 66px;
  }

  .page-shell {
    padding-top: 66px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero-visual,
  .hero-item {
    min-height: 360px;
  }

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

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .player-section,
  .story-section,
  .related-section,
  .detail-hero {
    padding: 18px;
    border-radius: 22px;
  }

  .rank-item {
    grid-template-columns: auto 56px minmax(0, 1fr);
  }

  .rank-thumb {
    width: 56px;
  }
}
