:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --violet: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.28);
}

.brand-text,
.footer-brand {
  font-size: 19px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.main-nav a,
.nav-dropdown button {
  padding: 8px 0;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown button:hover {
  color: #22d3ee;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 210px;
  padding: 12px;
  display: grid;
  gap: 4px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 8px 10px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: #334155;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.page-search input {
  width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 10px 15px;
  color: #fff;
  background: rgba(51, 65, 85, 0.8);
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.page-search input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #1e293b;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 16px 22px 22px;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.58);
}

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

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

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

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

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.12);
  transform: scale(1.08);
  opacity: 0.45;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(34, 211, 238, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.38));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 680px;
  margin: 0 auto;
  padding: 92px 22px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 54px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.hero-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
  color: #06b6d4;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

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

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.22);
  font-size: 13px;
  font-weight: 700;
}

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

.btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover,
.section-link:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.btn.primary,
.section-link {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.26);
}

.btn.ghost {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster {
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #22d3ee;
}

.quick-search-block,
.content-section,
.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 22px;
}

.quick-search-inner {
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 28px;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search-inner h2,
.section-head h2,
.page-hero h1,
.detail-content h1,
.rank-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.quick-search-inner p,
.section-head p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.quick-search-inner p {
  color: #cbd5e1;
}

.big-search {
  display: flex;
  gap: 10px;
}

.big-search input {
  flex: 1;
  width: auto;
  background: rgba(255, 255, 255, 0.08);
}

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

.section-head p:not(.eyebrow) {
  max-width: 740px;
}

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

.category-card,
.category-overview-card,
.movie-card,
.info-card,
.player-card,
.detail-content,
.rank-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-card,
.category-overview-card {
  padding: 22px;
}

.category-card h3,
.category-overview-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.category-card p,
.category-overview-card p,
.movie-card p,
.detail-content p,
.info-card dd,
.breadcrumbs {
  color: var(--muted);
}

.category-icon,
.category-overview-main span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.mini-links,
.overview-links {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.mini-links a,
.overview-links a {
  color: #2563eb;
  font-size: 14px;
  font-weight: 700;
}

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

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

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

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

.movie-card:hover {
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e2e8f0;
}

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

.poster-link img {
  transition: transform 0.32s ease;
}

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

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.86);
  font-size: 12px;
  font-weight: 800;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card p {
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.rank-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rank-panel-head a {
  color: #2563eb;
  font-weight: 800;
}

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

.rank-list a {
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
}

.rank-list a:hover {
  background: #e0f2fe;
}

.rank-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-list small {
  grid-column: 2;
  margin-top: -10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accent-section {
  margin-bottom: 38px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 38%),
    linear-gradient(180deg, #ffffff, #eff6ff);
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 22px 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.small-hero,
.category-hero,
.search-hero {
  min-height: 300px;
}

.page-search input {
  width: min(460px, 100%);
  color: var(--ink);
  background: #fff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-chip {
  color: #2563eb;
  background: #fff;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.empty-state {
  display: none;
  margin: 30px 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.empty-state.is-visible {
  display: block;
}

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

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

.wide-rank-list {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 14px;
}

.breadcrumbs a {
  color: #2563eb;
  font-weight: 800;
}

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

.player-card {
  padding: 12px;
  background: #020617;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

.player-overlay span {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
  font-weight: 900;
}

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

.detail-content {
  margin-top: 20px;
  padding: 28px;
}

.detail-content h1 {
  margin-bottom: 12px;
}

.detail-content .lead {
  font-size: 18px;
  color: #334155;
}

.detail-content h2,
.info-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-tags {
  margin: 18px 0 8px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.detail-cover {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #e2e8f0;
}

.info-card {
  padding: 22px;
}

.info-card h2 {
  margin-top: 0;
}

.info-card dl,
.info-card dd {
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.info-card dt {
  font-weight: 900;
}

.info-card a {
  color: #2563eb;
  font-weight: 800;
}

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

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 600px;
  margin: 12px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1180px) {
  .main-nav,
  .header-search {
    display: none;
  }

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

@media (max-width: 880px) {
  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 78px;
  }

  .hero-poster {
    width: min(260px, 70vw);
    transform: none;
  }

  .quick-search-inner,
  .split-layout,
  .detail-grid,
  .page-hero,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .page-hero {
    align-items: start;
  }

  .rank-panel,
  .detail-side {
    position: static;
  }

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

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .big-search,
  .mobile-search {
    flex-direction: column;
  }

  .quick-search-inner,
  .category-card,
  .category-overview-card,
  .detail-content,
  .info-card {
    padding: 20px;
  }

  .movie-grid,
  .movie-row,
  .category-grid,
  .overview-grid,
  .rank-wall {
    grid-template-columns: 1fr;
  }

  .player-overlay span {
    width: 82px;
    height: 82px;
    font-size: 14px;
  }
}
