:root {
  --primary-50: #e0f2fe;
  --primary-100: #bae6fd;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-50: #fff7ed;
  --accent-500: #d97706;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 16px 36px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--secondary-900);
  background: var(--secondary-50);
}

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

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--secondary-900);
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
  font-size: 14px;
}

.desktop-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.desktop-nav a,
.footer-links a,
.text-link {
  color: var(--secondary-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--primary-600);
}

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

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--secondary-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--secondary-200);
  background: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--secondary-700);
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: background-image 0.45s ease, transform 0.45s ease;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.38), transparent 35%),
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.26));
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 44px;
  align-items: center;
  padding: 72px 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--primary-100);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--primary-600);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: 0 16px 35px rgba(2, 132, 199, 0.34);
}

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

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-showcase {
  border-radius: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-slides {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border-radius: 22px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(22px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease;
  background: var(--secondary-900);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.hero-poster {
  position: absolute;
  inset: 0;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 24%, rgba(15, 23, 42, 0.86));
}

.hero-slide-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 2;
}

.hero-slide-info span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.hero-slide-info h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.hero-slide-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding-top: 14px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  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.is-active {
  width: 24px;
  background: var(--white);
}

.section {
  padding: 68px 0;
}

.soft-section {
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-100);
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--secondary-200), var(--primary-50));
}

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

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

.quality-badge,
.score-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.quality-badge {
  left: 12px;
  background: rgba(2, 132, 199, 0.92);
}

.score-badge {
  right: 12px;
  background: rgba(15, 23, 42, 0.82);
}

.card-content {
  padding: 16px;
}

.meta-line {
  margin: 0 0 8px;
  color: var(--secondary-500);
  font-size: 13px;
  line-height: 1.5;
}

.movie-card h3,
.rank-main h3 {
  margin: 0 0 9px;
  color: var(--secondary-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.card-desc {
  min-height: 44px;
  margin: 0 0 13px;
  color: var(--secondary-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card.compact .card-content {
  padding: 14px;
}

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

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

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

.category-card {
  display: block;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(2, 132, 199, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.16);
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-700);
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.75;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.38), transparent 32%),
    linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

.compact-hero {
  padding: 88px 0;
}

.compact-hero h1 {
  font-size: clamp(38px, 6vw, 62px);
}

.search-box {
  margin-top: 28px;
}

.search-box.wide {
  max-width: 680px;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  outline: none;
  color: var(--secondary-900);
  background: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.searchable-item.is-hidden {
  display: none;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 86px 1fr 70px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: var(--secondary-100);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main p {
  margin: 0;
  color: var(--secondary-600);
  line-height: 1.65;
}

.rank-score {
  color: var(--primary-700);
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  color: var(--white);
  background-size: cover;
  background-position: center;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-copy h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 680px;
  margin-top: 26px;
}

.detail-meta-grid span {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

.player-section {
  background: var(--secondary-900);
  color: var(--white);
}

.player-section .section-kicker {
  color: var(--primary-100);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(2, 132, 199, 0.16), rgba(15, 23, 42, 0.55));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-600);
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.38);
  font-size: 34px;
  transform: translateX(3px);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--secondary-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--secondary-700);
  line-height: 1.9;
}

.site-footer {
  padding: 46px 0 26px;
  color: var(--secondary-300);
  background: var(--secondary-900);
}

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

.footer-brand {
  color: var(--white);
}

.site-footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--secondary-300);
  line-height: 1.8;
}

.footer-links a {
  color: var(--secondary-300);
}

.footer-bottom {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--secondary-500);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .hero-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    padding-top: 48px;
  }

  .hero-showcase {
    max-width: 520px;
  }

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-layout {
    min-height: auto;
  }

  .hero-layout,
  .detail-layout,
  .compact-hero {
    padding: 48px 0;
  }

  .hero-showcase {
    width: 100%;
    padding: 10px;
    border-radius: 22px;
  }

  .hero-slides {
    min-height: 360px;
  }

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

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

  .section {
    padding: 46px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-content {
    padding: 13px;
  }

  .detail-layout {
    gap: 26px;
  }

  .detail-poster {
    width: min(240px, 72vw);
  }

  .detail-meta-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 70px 1fr;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
    font-size: 18px;
  }

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

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}

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

  .brand {
    font-size: 19px;
  }

  .hero-actions {
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 38px 64px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-number {
    width: 36px;
    height: 36px;
  }
}
