:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --primary: #2563eb;
  --secondary: #7c3aed;
  --accent: #f97316;
  --dark: #020617;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f6f8ff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.78));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #334155;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--primary);
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  background: var(--primary);
  transition: right 0.2s ease;
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
  right: 0;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 24px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

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

.hero {
  position: relative;
  height: 82vh;
  min-height: 620px;
  background: var(--dark);
  overflow: hidden;
}

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

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

.hero-slide > img,
.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.image-missing {
  opacity: 0 !important;
}

.poster-link,
.detail-poster,
.category-tile,
.player-shell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #312e81 48%, #7c2d12);
}

.poster-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.22), transparent 26%),
    linear-gradient(135deg, #1e293b, #4338ca 54%, #ea580c);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2,6,23,0.92) 0%, rgba(2,6,23,0.62) 43%, rgba(2,6,23,0.14) 100%),
    linear-gradient(0deg, rgba(2,6,23,0.92) 0%, rgba(2,6,23,0.16) 55%, rgba(2,6,23,0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 150px 0 135px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(255,255,255,0.84);
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-actions,
.mini-link-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.hero-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.hero-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.hero-search button,
.search-page-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.32);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15,23,42,0.34);
  backdrop-filter: blur(10px);
  font-size: 42px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(760px, calc(100% - 32px));
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input,
.inline-filter input,
.inline-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #ffffff;
  color: var(--text);
}

.section-block {
  padding: 58px 0;
}

.intro-grid,
.category-grid,
.footer-grid,
.detail-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.info-card,
.movie-card,
.rank-panel,
.content-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 26px;
  min-height: 166px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(15,23,42,0.16);
}

.info-card span,
.info-card em {
  color: var(--primary);
  font-style: normal;
  font-weight: 800;
}

.info-card strong {
  display: block;
  margin: 12px 0 18px;
  font-size: 24px;
  line-height: 1.18;
}

.hot-entry {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #7c3aed 54%, #f97316);
}

.hot-entry span,
.hot-entry em {
  color: #ffffff;
}

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

.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-title > a,
.section-title > span {
  color: var(--primary);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  display: block;
  aspect-ratio: 2 / 3;
}

.poster-link.wide {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
}

.poster-link img,
.category-tile img,
.detail-poster img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.05);
}

.badge-year {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15,23,42,0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta-line a {
  color: var(--primary);
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border-radius: var(--radius);
  color: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2,6,23,0.9), rgba(2,6,23,0.1));
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile strong,
.category-tile em,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  font-size: 22px;
  line-height: 1.15;
}

.category-tile em {
  color: #dbeafe;
  font-style: normal;
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num meta"
    "num score";
  gap: 2px 12px;
  padding: 13px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row a:hover {
  background: #eef2ff;
  transform: translateX(3px);
}

.rank-num {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 900;
}

.rank-title {
  grid-area: title;
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta,
.rank-score {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  grid-area: meta;
}

.rank-score {
  grid-area: score;
  color: var(--primary);
  font-weight: 750;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 15% 20%, rgba(59,130,246,0.38), transparent 30%),
    linear-gradient(135deg, #020617, #1e1b4b 56%, #7c2d12);
}

.compact-hero,
.category-hero {
  padding: 92px 0 70px;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 18px;
}

.inline-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  max-width: 900px;
  margin-top: 26px;
}

.search-page-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card h2 {
  margin: 10px 0 8px;
  font-size: 34px;
  line-height: 1;
}

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

.mini-link-row a,
.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #334155;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 750;
}

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

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

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  filter: blur(6px) saturate(1.1);
  transform: scale(1.04);
}

.detail-shade {
  background:
    linear-gradient(90deg, rgba(2,6,23,0.96), rgba(2,6,23,0.68) 48%, rgba(2,6,23,0.28)),
    linear-gradient(0deg, rgba(2,6,23,0.96), rgba(2,6,23,0.10));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 650px;
  padding: 120px 0 70px;
}

.breadcrumb {
  position: absolute;
  top: 92px;
  left: 0;
  right: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
}

.breadcrumb a {
  color: #dbeafe;
  font-weight: 800;
}

.breadcrumb em {
  font-style: normal;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.38);
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.detail-info p {
  max-width: 760px;
  color: rgba(255,255,255,0.84);
  font-size: 20px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  font-weight: 750;
}

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

.detail-tags span {
  color: #ffffff;
  background: rgba(255,255,255,0.14);
}

.player-panel {
  overflow: hidden;
  border-radius: 28px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.player-shell {
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle, rgba(37,99,235,0.34), rgba(2,6,23,0.48) 42%, rgba(2,6,23,0.78));
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 20px 45px rgba(37,99,235,0.42);
  font-size: 28px;
}

.play-overlay strong {
  font-size: 22px;
}

.player-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: rgba(255,255,255,0.78);
}

.player-note strong {
  color: #ffffff;
}

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

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 10px 0 12px;
  font-size: 32px;
  line-height: 1;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  margin-top: 40px;
  padding: 48px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

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

.site-footer p {
  max-width: 420px;
  color: #94a3b8;
}

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

.site-footer .footer-links a {
  color: #e2e8f0;
  background: rgba(255,255,255,0.08);
}

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

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 130px 0 160px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search,
  .inline-filter,
  .search-page-form {
    grid-template-columns: 1fr;
    border-radius: 26px;
  }

  .intro-grid,
  .footer-grid,
  .detail-content-grid,
  .large-rank-list {
    grid-template-columns: 1fr;
  }

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

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

  .category-overview-card,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(260px, 80vw);
  }

  .player-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .hero h1,
  .detail-info h1 {
    letter-spacing: -0.05em;
  }

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

  .section-block {
    padding: 42px 0;
  }

  .category-tile {
    min-height: 180px;
  }
}
