:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --purple: #7c3aed;
  --amber: #f59e0b;
  --green: #16a34a;
  --red: #ef4444;
  --slate: #0f172a;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f8fafc;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: #ffffff;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
body:not(.home-page) .site-header {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.3);
}

.brand-text {
  font-size: 1.3rem;
}

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

.nav-link {
  position: relative;
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 10px 24px 20px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.hero {
  min-height: 760px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.65s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(59, 130, 246, 0.58), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.70) 48%, rgba(15, 23, 42, 0.38)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 180px 24px 160px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.eyebrow.dark {
  color: var(--primary);
  background: var(--primary-soft);
}

.hero h1 {
  max-width: 780px;
  margin: 24px 0 18px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.hero p {
  max-width: 700px;
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.center-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.slim-actions {
  margin-top: 22px;
}

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

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

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.ghost-button.light {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.text-link {
  min-height: 0;
  padding: 0;
  color: var(--primary);
}

.hero-bottom {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 32px;
  z-index: 3;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

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

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

.hero-library {
  color: #ffffff;
  font-weight: 800;
  opacity: 0.9;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px;
}

.light-section {
  max-width: none;
  padding-left: max(24px, calc((100% - 1180px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1180px) / 2 + 24px));
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-heading.left-align {
  margin-left: 0;
  text-align: left;
}

.section-heading h2,
.panel-head h2,
.content-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-heading p,
.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

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

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

.catalog-grid {
  margin-top: 32px;
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.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(180deg, transparent 55%, rgba(2, 6, 23, 0.7));
  opacity: 0.7;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.82);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.movie-info strong {
  display: block;
  margin: 8px 0 8px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.movie-desc {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card,
.category-overview-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-glow {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(8px);
}

.category-name,
.category-summary,
.category-sample {
  position: relative;
  z-index: 1;
  display: block;
}

.category-name {
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-summary,
.category-sample {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.category-sample {
  margin-top: 20px;
  font-weight: 800;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin: 14px 0 20px;
}

.category-samples a {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

.tone-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.tone-pink { background: linear-gradient(135deg, #ec4899, #fb7185); }
.tone-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.tone-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.tone-amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.tone-green { background: linear-gradient(135deg, #16a34a, #14b8a6); }
.tone-red { background: linear-gradient(135deg, #ef4444, #f97316); }
.tone-indigo { background: linear-gradient(135deg, #4f46e5, #2563eb); }
.tone-teal { background: linear-gradient(135deg, #0d9488, #06b6d4); }
.tone-slate { background: linear-gradient(135deg, #0f172a, #475569); }

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.panel,
.content-card,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.08);
}

.panel {
  padding: 28px;
}

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

.rank-item,
.ranking-row {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item {
  grid-template-columns: 44px 1fr auto;
  padding: 14px;
}

.rank-item:hover,
.ranking-row:hover {
  transform: translateX(4px);
  background: #eff6ff;
}

.rank-number,
.ranking-pos {
  color: var(--primary);
  font-weight: 900;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  grid-column: 2 / 3;
  color: var(--muted);
  font-size: 0.88rem;
}

.rank-heat,
.ranking-score {
  color: var(--primary);
  font-weight: 850;
  white-space: nowrap;
}

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

.movie-card.compact .movie-info {
  padding: 14px;
}

.movie-card.compact .movie-info strong {
  font-size: 1rem;
}

.movie-card.compact .movie-desc,
.movie-card.compact .tag-row {
  display: none;
}

.page-main {
  padding-top: 76px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.62), transparent 32%), linear-gradient(135deg, #020617, #1e3a8a 55%, #0891b2);
}

.compact-hero,
.category-hero {
  min-height: 390px;
  display: flex;
  align-items: center;
  padding: 76px 24px;
}

.page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-hero h1,
.detail-info h1 {
  max-width: 860px;
  margin: 22px 0 16px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(170px, 220px));
  gap: 16px;
  align-items: end;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

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

.filter-status {
  margin: 0;
  color: var(--primary);
  font-weight: 800;
  align-self: center;
}

.ranking-row {
  grid-template-columns: 70px 74px 1fr minmax(170px, auto) 112px;
  padding: 12px 16px;
}

.ranking-cover {
  width: 58px;
  height: 78px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--primary-soft);
}

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

.ranking-main strong,
.ranking-main em {
  display: block;
}

.ranking-main em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.92rem;
}

.ranking-side {
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  min-height: 680px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.75) 60%, rgba(2, 6, 23, 0.46));
}

.detail-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: 46px;
  align-items: center;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-tags span {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.72);
}

.detail-section {
  padding-bottom: 40px;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player.is-ready .player-cover,
.player.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 22px 44px rgba(37, 99, 235, 0.38);
  font-size: 1.8rem;
}

.player-cover strong {
  font-size: clamp(1.3rem, 3vw, 2.3rem);
}

.player-cover em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-weight: 700;
}

.detail-text-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 28px;
}

.content-card {
  padding: 30px;
}

.content-card p {
  color: #374151;
  font-size: 1.02rem;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #020617, #111827);
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 36px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 38px;
}

.footer-grid p {
  max-width: 420px;
  color: #9ca3af;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: #9ca3af;
  font-weight: 700;
}

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

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden],
.is-hidden {
  display: none !important;
}

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

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

  .split-section,
  .detail-text-section {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 58px 62px 1fr 92px;
  }

  .ranking-side {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    height: 66px;
    padding: 0 18px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content {
    padding: 130px 20px 140px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 40px);
  }

  .section {
    padding: 58px 20px;
  }

  .movie-grid,
  .featured-grid,
  .mini-grid,
  .category-grid,
  .category-overview-grid,
  .filter-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-info {
    padding: 14px;
  }

  .movie-desc,
  .tag-row {
    display: none;
  }

  .compact-hero,
  .category-hero {
    min-height: 330px;
    padding: 54px 20px;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    width: calc(100% - 40px);
    gap: 28px;
    padding: 38px 0 56px;
  }

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

  .ranking-row {
    grid-template-columns: 48px 54px 1fr;
    gap: 10px;
  }

  .ranking-score {
    grid-column: 3 / 4;
  }

  .rank-item {
    grid-template-columns: 38px 1fr;
  }

  .rank-heat {
    grid-column: 2 / 3;
  }
}

@media (max-width: 480px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
