:root {
  --primary: #0284c7;
  --primary-dark: #075985;
  --primary-soft: #e0f2fe;
  --accent: #059669;
  --secondary: #b45309;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --wash: #f9fafb;
  --night: #111827;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
}

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

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

.nav-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-soft);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary-dark);
}

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

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

.mobile-nav-inner {
  display: grid;
  gap: 4px;
  padding: 10px 0 16px;
}

.mobile-link {
  padding: 10px 0;
  color: #374151;
  font-weight: 650;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.26)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 64px;
  align-items: center;
  padding-top: 80px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 12px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow,
.page-hero .eyebrow,
.spotlight-card .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 26px rgba(2, 132, 199, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.btn-soft {
  color: var(--primary-dark);
  background: rgba(224, 242, 254, 0.95);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.22), transparent 45%);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: max(18px, calc((100% - 1180px) / 2 - 64px));
}

.hero-next {
  right: max(18px, calc((100% - 1180px) / 2 - 64px));
}

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

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

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

.home-search-block {
  position: relative;
  z-index: 9;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 28px;
  align-items: center;
  margin-top: -54px;
  padding: 26px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-search-block h2,
.section-heading h2,
.content-card h2,
.side-card h2,
.footer-main h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

.home-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.home-search-form button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

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

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

.compact-heading {
  align-items: start;
}

.section-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--primary);
  font-weight: 800;
}

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

.category-card,
.overview-card,
.content-card,
.side-card,
.spotlight-card,
.filter-panel {
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-card {
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.overview-card:hover,
.top-rank-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.category-card h3,
.movie-card h3,
.overview-card h2,
.top-rank-card h2 {
  margin: 0;
  line-height: 1.25;
}

.category-card p,
.movie-card p,
.overview-card p,
.top-rank-card p,
.content-card p,
.side-card dd {
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 18px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.quality-badge,
.year-badge,
.rank-crown,
.rank-num {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.quality-badge {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(2, 132, 199, 0.92);
}

.year-badge {
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: #111827;
  background: rgba(255, 255, 255, 0.9);
}

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

.movie-card h3 {
  font-size: 17px;
}

.movie-card h3 a:hover {
  color: var(--primary);
}

.movie-card p {
  min-height: 46px;
  margin: 8px 0 0;
  font-size: 14px;
}

.movie-meta-line,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.movie-meta-line {
  margin-top: 12px;
  color: #4b5563;
  font-size: 13px;
}

.movie-meta-line span,
.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 700;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 370px;
  gap: 28px;
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.rank-item img {
  width: 54px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item strong,
.rank-item small {
  display: block;
}

.rank-item small {
  margin-top: 4px;
  color: var(--muted);
}

.rank-num {
  left: -6px;
  top: 50%;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--secondary);
  transform: translateY(-50%);
}

.spotlight-card {
  padding: 32px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(135deg, var(--primary), var(--accent));
}

.spotlight-card p {
  color: rgba(255, 255, 255, 0.86);
}

.site-footer {
  margin-top: 80px;
  padding: 56px 0 26px;
  color: #d1d5db;
  background: var(--night);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: #fff;
  font-size: 20px;
}

.footer-main p {
  max-width: 560px;
  color: #9ca3af;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

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

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #6b7280;
  text-align: center;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.32), transparent 28%),
    linear-gradient(135deg, #0f172a, #075985 62%, #059669);
}

.simple-hero,
.ranking-hero {
  padding: 96px 0 72px;
}

.category-hero {
  padding: 76px 0 56px;
}

.category-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  align-items: center;
}

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

.hero-mini-rank .rank-item:nth-child(n + 6) {
  display: none;
}

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

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

.overview-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.overview-links a {
  padding: 6px 10px;
  color: var(--primary-dark);
  border-radius: 999px;
  background: var(--primary-soft);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 800;
}

.filter-selects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.no-results {
  display: none;
  margin: 22px 0 0;
  padding: 18px;
  color: var(--muted);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

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

.top-rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-rank-card img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-crown {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), #f59e0b);
}

.detail-hero {
  min-height: 610px;
  padding: 90px 0 58px;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-size: cover;
  background-position: center;
  filter: blur(4px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.45)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.24), rgba(2, 6, 23, 0.5));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.34);
  font-size: 34px;
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card h2 + p {
  margin-top: 10px;
}

.content-card p {
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: #374151;
  font-weight: 800;
}

.side-card dd {
  margin: 0;
}

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

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

  .hero-content,
  .category-hero-inner,
  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 320px;
  }

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

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

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

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

  .nav-toggle {
    display: flex;
  }

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

  .hero-content {
    gap: 30px;
    padding-top: 96px;
  }

  .hero-poster {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .home-search-block,
  .section-heading,
  .overview-card,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .home-search-block {
    margin-top: -30px;
  }

  .home-search-form,
  .filter-selects {
    grid-template-columns: 1fr;
  }

  .home-search-form {
    flex-direction: column;
  }

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

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

  .detail-layout {
    gap: 24px;
  }

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

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

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

  .hero-carousel {
    min-height: 620px;
  }

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

  .hero-summary,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

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

  .top-rank-card {
    grid-template-columns: 96px 1fr;
  }

  .top-rank-card img {
    width: 96px;
  }

  .overview-cover {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-block {
    padding-top: 52px;
  }
}
