:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-soft: #e0f2fe;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --page: #f8fafc;
  --card: #ffffff;
  --dark: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-wrap {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.32);
}

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

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

.desktop-nav > a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  color: #334155;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown:hover > button,
.desktop-nav > a.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-panel a {
  padding: 9px 12px;
  border-radius: 10px;
  color: #334155;
}

.dropdown-menu a:hover,
.mobile-panel a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.quick-search {
  width: 260px;
}

.quick-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: 0.2s ease;
}

.quick-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--primary-dark);
  border-radius: 20px;
}

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

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(14, 165, 233, 0.35), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.25));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #fff;
  padding: 70px 0 120px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-copy p {
  width: min(660px, 100%);
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.34);
}

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

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover,
.btn-soft:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.26);
}

.btn-soft {
  color: #fff;
  background: rgba(14, 165, 233, 0.28);
}

.small-actions .btn-ghost {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.hero-mini-panel {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  z-index: 5;
  width: 320px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(18px);
  color: #fff;
}

.hero-mini-title,
.ranking-head,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-mini-title {
  margin-bottom: 12px;
  font-weight: 800;
}

.hero-mini-list {
  display: grid;
  gap: 10px;
}

.hero-mini-list a {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-mini-list img {
  width: 52px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}

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

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

.section-heading {
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(14, 165, 233, 0.9);
  font-size: 12px;
  font-weight: 800;
}

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

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

.movie-card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta span {
  padding: 4px 8px;
  background: #f8fafc;
  color: #64748b;
}

.movie-card.compact {
  min-width: 210px;
}

.movie-card.large .poster-link {
  aspect-ratio: 16 / 10;
}

.movie-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}

.movie-strip .movie-card {
  flex: 0 0 230px;
  scroll-snap-align: start;
}

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

.category-tile {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #e0f2fe);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.08);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: #475569;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ranking-head {
  padding: 18px 18px 10px;
  font-weight: 900;
}

.rank-list {
  display: grid;
  padding: 0 10px 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px 50px 1fr;
  grid-template-areas: "idx img title" "idx img meta";
  gap: 4px 10px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.rank-row:hover {
  background: #f8fafc;
}

.rank-index {
  grid-area: idx;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  grid-area: img;
  width: 50px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  grid-area: title;
  font-weight: 800;
}

.rank-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 82px 0;
  color: #fff;
  background:
    radial-gradient(circle at 24% 22%, rgba(14, 165, 233, 0.36), transparent 32%),
    linear-gradient(135deg, #020617, #0f172a 58%, #075985);
}

.slim-hero {
  padding: 66px 0;
}

.page-hero p {
  width: min(720px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.category-hero {
  padding: 72px 0;
}

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

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

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

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

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 8px;
  background: #0f172a;
}

.category-cover img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: 12px;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
}

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-samples a {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

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

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

.rank-card-cover {
  position: relative;
  background: #0f172a;
}

.rank-card-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.rank-card-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}

.rank-card-body {
  padding: 20px 22px 20px 0;
}

.rank-card-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.rank-card-body p {
  color: var(--muted);
}

.detail-layout {
  padding: 34px 0 0;
}

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.lead {
  margin: 0 0 20px;
  color: #475569;
  font-size: 19px;
}

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

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

.player-section h2,
.prose-block h2 {
  margin: 0 0 18px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  z-index: 4;
  transition: 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  z-index: -1;
}

.player-cover:hover {
  background: rgba(2, 6, 23, 0.36);
}

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

.player-play-icon {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  padding-left: 6px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.player-cover strong {
  font-size: 20px;
}

.prose-block {
  font-size: 18px;
}

.prose-block p {
  margin: 0 0 24px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.site-footer {
  margin-top: 60px;
  padding: 36px 0;
  color: rgba(255, 255, 255, 0.74);
  background: #020617;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  color: #fff;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .quick-search {
    display: none;
  }

  .movie-grid,
  .library-grid,
  .category-movie-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;
  }

  .ranking-panel {
    position: static;
  }

  .hero-mini-panel {
    display: none;
  }
}

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

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

  body.nav-open .mobile-panel {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

  .hero-copy {
    padding: 52px 0 90px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .rank-card-body {
    padding: 20px;
  }

  .detail-poster img {
    height: auto;
    aspect-ratio: 3 / 4;
  }

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

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .hero-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .movie-grid,
  .featured-grid,
  .library-grid,
  .category-movie-grid,
  .category-overview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-card {
    padding: 16px;
    border-radius: 22px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
