:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #dbeafe;
  --gold: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text span {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 99px;
}

.nav-category-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.nav-pill {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 700;
}

.hero-slider {
  position: relative;
  height: 66vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1.2s ease;
  transform: scale(1.03);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.08));
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: white;
}

.hero-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-kicker span {
  padding: 8px 13px;
  border-radius: 999px;
  color: white;
  background: rgba(37, 99, 235, 0.88);
  font-weight: 800;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: var(--blue);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.34);
}

.primary-btn:hover,
.more-link:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(2, 6, 23, 0.48);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.7);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: white;
}

.content-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 22px;
}

.section-block {
  margin-bottom: 54px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading.with-actions,
.split-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.section-heading h2,
.side-panel h2,
.detail-text h2,
.library-year h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.side-panel p {
  margin: 0;
  color: var(--muted);
}

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

.featured-grid,
.movie-grid:has(.movie-card.wide) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

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

.movie-card.wide .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent);
}

.poster-type,
.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 10px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-type {
  top: 10px;
  right: 10px;
}

.poster-year {
  left: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: rgba(245, 158, 11, 0.92);
}

.movie-info {
  display: block;
  padding: 15px;
}

.movie-info strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
}

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

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 225px;
}

.rail-actions {
  display: flex;
  gap: 10px;
}

.rail-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #334155;
  background: white;
  box-shadow: var(--soft-shadow);
  font-size: 26px;
  cursor: pointer;
}

.rail-actions button:hover {
  background: #eff6ff;
  color: var(--blue-dark);
}

.split-layout {
  grid-template-columns: minmax(0, 1fr) 410px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 70px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-row img {
  width: 70px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-row strong,
.rank-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row strong {
  font-weight: 900;
}

.rank-row em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rank-row b {
  color: var(--gold);
}

.list-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.more-link {
  margin-top: 18px;
  color: white;
  background: var(--blue);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  box-shadow: var(--soft-shadow);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.2));
}

.category-content {
  position: relative;
  z-index: 2;
  min-height: 210px;
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-content strong {
  font-size: 24px;
  font-weight: 900;
}

.category-content em {
  display: -webkit-box;
  margin: 7px 0 12px;
  overflow: hidden;
  color: #e2e8f0;
  font-size: 14px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-links a {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-color: #0f172a;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.55));
}

.compact-hero {
  min-height: 300px;
  background-image: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.36), transparent 35%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero > div {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 64px 22px;
  color: white;
}

.page-hero p {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-weight: 900;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero span {
  display: block;
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
}

.category-overview-list {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.category-overview-cover {
  min-height: 220px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.category-overview-cover span {
  width: 100%;
  padding: 48px 20px 18px;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent);
  font-size: 28px;
  font-weight: 950;
}

.category-overview-text h2 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.category-overview-text p {
  color: var(--muted);
}

.category-overview-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.category-overview-links a,
.library-links a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-weight: 800;
}

.category-overview-links span,
.library-links span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--ink);
  background: #f8fafc;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-field {
  margin-bottom: 14px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.filter-target .is-hidden {
  display: none;
}

.side-panel {
  position: sticky;
  top: 118px;
  padding: 20px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.detail-shell {
  padding-top: 28px;
}

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

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

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

.player-card {
  overflow: hidden;
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

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

.play-cover span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  font-size: 38px;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.35);
  transition: transform 0.2s ease;
}

.play-cover:hover span {
  transform: scale(1.08);
}

.play-cover.is-hidden {
  display: none;
}

.detail-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: var(--soft-shadow);
}

.detail-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-meta-grid span {
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

.detail-meta-grid b {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-meta-grid a {
  color: var(--blue-dark);
  font-weight: 900;
}

.detail-text {
  padding: 26px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.detail-text p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 17px;
}

.library-shell {
  display: grid;
  gap: 26px;
}

.library-year {
  padding: 20px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

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

.library-links a {
  min-width: 0;
  flex-direction: column;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 10px;
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

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

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

.footer-links.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #60a5fa;
}

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

  .featured-grid,
  .movie-grid:has(.movie-card.wide),
  .split-layout,
  .category-page-layout {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
  }
}

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

  .nav-menu {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 68px;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: grid;
  }

  .nav-link {
    display: block;
  }

  .hero-slider {
    height: 72vh;
    min-height: 600px;
  }

  .hero-inner {
    align-items: flex-end;
    padding-bottom: 96px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .movie-grid:has(.movie-card.wide),
  .category-grid,
  .filter-row,
  .category-overview-card,
  .footer-inner,
  .detail-main,
  .detail-meta-grid,
  .library-links {
    grid-template-columns: 1fr;
  }

  .category-overview-cover {
    min-height: 180px;
  }

  .detail-main {
    padding: 20px;
  }

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

@media (max-width: 540px) {
  .nav-shell {
    padding: 0 14px;
  }

  .brand {
    min-width: 0;
  }

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

  .nav-category-bar,
  .content-shell,
  .page-hero > div,
  .hero-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero-actions a {
    width: 100%;
  }

  .movie-grid {
    gap: 16px;
  }

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

  .rank-row b {
    display: none;
  }

  .rank-row img {
    width: 58px;
    height: 46px;
  }
}
