:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --muted-strong: #334155;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  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: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #0f172a);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.brand-text {
  font-size: 20px;
}

.brand.compact .brand-text {
  color: #fff;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-weight: 700;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(15, 23, 42, 0.68) 45%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 76px 0;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
}

.hero-tags span:first-child {
  background: var(--accent);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-actions,
.search-callout,
.section-heading,
.detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.mini-button:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.5);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.82);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  background: #fff;
}

.band {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.home-search {
  padding: 28px 0;
}

.search-callout {
  justify-content: space-between;
}

.search-callout h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
}

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

.content-section {
  padding: 56px 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--primary);
  font-weight: 850;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow);
}

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

.poster-wrap img,
.compact-card img,
.rank-cover img,
.category-cover img,
.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
}

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 950;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.inline-links a:hover {
  color: var(--primary);
}

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

.tag-row span {
  color: #1d4ed8;
  background: #dbeafe;
}

.category-band {
  margin: 20px 0;
  padding: 54px 0;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-tile {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  color: #fff;
  background: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 950;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-tile:hover p {
  color: #dbeafe;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 220px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
}

.compact-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.compact-card img {
  aspect-ratio: 16 / 10;
}

.compact-card span,
.compact-card em {
  display: block;
  padding: 0 14px;
}

.compact-card span {
  padding-top: 12px;
  font-weight: 950;
}

.compact-card em {
  padding-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.9), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a 55%, #020617);
}

.small-hero {
  padding: 74px 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.search-box input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  outline: 0;
}

.search-box input {
  padding: 0 16px;
}

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

.filter-selects {
  display: grid;
  grid-template-columns: repeat(3, 148px);
  gap: 10px;
}

.filter-selects select {
  padding: 0 12px;
}

.empty-state {
  display: none;
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.category-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: #dbeafe;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 26px;
  line-height: 1.2;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--muted-strong);
}

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

.inline-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 128px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f97316);
  font-weight: 950;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: #dbeafe;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--muted-strong);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-button {
  min-height: 38px;
  padding: 0 16px;
  color: #fff;
  background: var(--primary);
  font-size: 14px;
}

.detail-shell {
  padding: 32px 0 0;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.player-card {
  overflow: hidden;
  background: #020617;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.38));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
  font-size: 30px;
  text-indent: 5px;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.detail-meta {
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 850;
}

.lead-text {
  color: var(--muted-strong);
  font-size: 18px;
  font-weight: 700;
}

.detail-card h2 {
  margin: 26px 0 10px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: var(--muted-strong);
}

.detail-tags a {
  color: #1d4ed8;
  background: #dbeafe;
}

.side-card {
  position: sticky;
  top: 96px;
  overflow: hidden;
  padding: 16px;
}

.side-card img {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: #dbeafe;
}

.side-card h2 {
  margin: 16px 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.side-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.block-button {
  width: 100%;
}

.related-section {
  padding-top: 42px;
}

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

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

.footer-brand p {
  max-width: 440px;
  margin: 16px 0 0;
}

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

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  text-align: center;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

  .side-card {
    position: static;
  }

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

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

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

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

  .hero {
    height: 520px;
  }

  .hero-content {
    padding: 52px 0 74px;
  }

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

  .hero-control {
    display: none;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 88px 1fr;
  }

  .rank-row .mini-button {
    grid-column: 2 / -1;
    width: 100%;
  }

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

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-actions,
  .search-callout,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .card-body {
    padding: 14px;
  }
}
