:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6ff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #ef4444;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  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: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand {
  font-size: 22px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  background: #eff6ff;
}

.global-search,
.wide-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search input,
.wide-search input,
.catalog-toolbar input,
.catalog-toolbar select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search input {
  width: 220px;
  padding: 10px 14px;
}

.global-search input:focus,
.wide-search input:focus,
.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.global-search button,
.wide-search button,
.primary-button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.global-search button {
  padding: 10px 16px;
}

.global-search button:hover,
.wide-search button:hover,
.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: 460px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: none;
  z-index: 100;
}

.search-panel.is-open {
  display: block;
}

.search-result {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: #f1f5f9;
}

.search-result img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
}

.search-result strong {
  display: block;
  line-height: 1.25;
  margin-bottom: 5px;
}

.search-result span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.search-empty {
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

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

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #1e293b;
}

.hero-slider {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease;
}

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

.hero-overlay,
.detail-hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.48), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58) 52%, rgba(15, 23, 42, 0.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1240px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(147, 197, 253, 0.34);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.detail-meta-row span,
.detail-tags a,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
}

.hero-tags span {
  color: #ffffff;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search-band {
  margin-top: -58px;
  position: relative;
  z-index: 8;
}

.quick-search-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-inner h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.quick-search-inner p {
  margin: 0;
  color: var(--muted);
}

.wide-search input {
  min-height: 50px;
  flex: 1;
  padding: 0 18px;
}

.wide-search button {
  min-height: 50px;
  padding: 0 22px;
}

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

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

.section-head.slim {
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-head a {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

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

.latest-grid,
.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(147, 197, 253, 0.9);
  box-shadow: var(--shadow);
}

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

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.72));
  opacity: 0.8;
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
}

.quality-badge {
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  background: rgba(37, 99, 235, 0.95);
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 5px 10px;
  background: rgba(239, 68, 68, 0.95);
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: var(--primary);
}

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

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

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

.tag-row span {
  color: var(--primary);
  padding: 3px 8px;
  background: #eff6ff;
}

.movie-card-compact .movie-card-body h3 {
  min-height: 42px;
  font-size: 15px;
}

.movie-card-compact .movie-card-body {
  padding: 13px;
}

.rank-section {
  width: 100%;
  max-width: none;
  margin-top: 72px;
  padding: 72px max(16px, calc((100% - 1240px) / 2)) 72px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff 48%, #f8fafc);
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
}

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

.rank-side,
.side-list {
  display: grid;
  gap: 14px;
}

.side-media {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-media:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.side-media img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.side-media strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

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

.side-rank {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
}

.category-zone {
  width: 100%;
  max-width: none;
  padding: 72px max(16px, calc((100% - 1240px) / 2));
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

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

.category-feature-card,
.category-overview-card {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
}

.category-feature-card .side-media {
  box-shadow: none;
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.sub-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 64px max(16px, calc((100% - 1240px) / 2));
  color: #ffffff;
}

.sub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.55), transparent 34%),
    radial-gradient(circle at 76% 36%, rgba(56, 189, 248, 0.28), transparent 32%),
    linear-gradient(135deg, #020617, #1e293b);
}

.sub-hero > div {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.sub-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 5vw, 62px);
  line-height: 1.08;
}

.sub-hero p:last-child {
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.category-card-head {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
}

.category-card-head span {
  font-size: 22px;
  font-weight: 900;
}

.category-card-head strong {
  font-size: 14px;
}

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

.category-sample-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-sample-links a {
  color: #334155;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.category-sample-links a:hover {
  color: var(--primary);
}

.catalog-toolbar {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.catalog-toolbar input {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
}

.catalog-toolbar select {
  min-height: 46px;
  padding: 0 34px 0 16px;
}

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

.detail-hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
  color: #ffffff;
}

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

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

.detail-top-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 7px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  background: #e2e8f0;
}

.detail-top-grid h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 800px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-meta-row span,
.detail-tags a {
  color: #ffffff;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags {
  margin-top: 14px;
}

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 30px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.play-layer strong {
  font-size: 22px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

.detail-article {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
}

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

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

.footer-grid li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.is-filter-hidden {
  display: none !important;
}

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

  .latest-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .rank-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
  }

  .global-search {
    order: 3;
    width: 100%;
  }

  .global-search input {
    width: 100%;
    flex: 1;
  }

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

  .quick-search-inner,
  .detail-section,
  .detail-top-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 210px;
  }

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

@media (max-width: 740px) {
  .hero-slider {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    padding-top: 30px;
  }

  .hero-actions,
  .catalog-toolbar,
  .wide-search,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .latest-grid,
  .related-grid,
  .catalog-grid,
  .rank-grid,
  .rank-main,
  .rank-side,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .side-media {
    grid-template-columns: 58px 1fr;
  }

  .side-media .side-rank {
    display: none;
  }

  .side-media img {
    width: 58px;
    height: 76px;
  }

  .movie-card-body h3 {
    min-height: 40px;
    font-size: 15px;
  }

  .movie-card-body p,
  .tag-row {
    display: none;
  }

  .detail-hero-content {
    padding: 34px 0;
  }
}

@media (max-width: 460px) {
  .brand {
    font-size: 18px;
  }

  .movie-grid,
  .latest-grid,
  .related-grid,
  .catalog-grid,
  .rank-grid,
  .rank-main,
  .rank-side,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .quick-search-band {
    margin-top: -28px;
  }

  .quick-search-inner {
    padding: 20px;
  }
}
