:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --text: #111827;
  --muted: #6b7280;
  --muted-light: #d1d5db;
  --line: #e5e7eb;
  --card: #ffffff;
  --rose: #e11d48;
  --rose-soft: #fff1f2;
  --rose-dark: #be123c;
  --gold: #f59e0b;
  --green: #16a34a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f7f8fb;
  min-width: 320px;
}

body.no-scroll {
  overflow: hidden;
}

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

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: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.navbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand {
  color: #111827;
  font-size: 21px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), #fb7185);
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.32);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--rose);
  background: var(--rose-soft);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #111827;
  border-radius: 99px;
  transition: 0.2s ease;
}

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

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: var(--rose);
  background: var(--rose-soft);
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-shade,
.detail-shade,
.page-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(15, 23, 42, 0.42), rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 20% 10%, rgba(244, 63, 94, 0.4), transparent 36%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  max-width: 760px;
  padding: 96px 0;
}

.hero-eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #fb7185;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-content .hero-movie-title {
  margin-top: 18px;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.03em;
  color: #ffe4e6;
}

.hero-content p:not(.hero-eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  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: #ffffff;
  background: var(--rose);
  box-shadow: 0 14px 26px rgba(225, 29, 72, 0.35);
}

.btn-primary:hover {
  background: var(--rose-dark);
}

.btn-light {
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 32px;
  line-height: 1;
  backdrop-filter: blur(14px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 99px;
  background: #ffffff;
}

.section {
  padding: 78px 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-heading h2,
.ranking-layout h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p:not(.section-kicker),
.ranking-layout p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

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

.all-grid {
  align-items: stretch;
}

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden,
.ranking-card.is-hidden {
  display: none;
}

.movie-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 113, 133, 0.45);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  min-height: 270px;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.92), rgba(15, 23, 42, 0.84)),
    var(--poster-image, none);
  background-position: center;
  background-size: cover;
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.62));
}

.movie-year,
.movie-type {
  position: absolute;
  z-index: 2;
  top: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(12px);
}

.movie-year {
  left: 14px;
}

.movie-type {
  right: 14px;
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.movie-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-desc {
  min-height: 44px;
}

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

.tag-row span,
.detail-cats a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--rose-dark);
  background: var(--rose-soft);
  font-size: 12px;
  font-weight: 800;
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.horizontal-list {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x proximity;
}

.horizontal-list .movie-card {
  flex: 0 0 310px;
  scroll-snap-align: start;
}

.movie-card-compact .movie-poster {
  min-height: 190px;
}

.movie-card-compact .movie-desc {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 26px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(225, 29, 72, 0.78)),
    var(--category-image, none);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

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

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 900;
}

.category-tile strong {
  max-width: 90%;
  color: #f9fafb;
  font-size: 15px;
  line-height: 1.7;
}

.category-tile.large {
  min-height: 220px;
}

.ranking-preview {
  color: #ffffff;
  background: radial-gradient(circle at 18% 10%, rgba(225, 29, 72, 0.42), transparent 32%), #0f172a;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
}

.ranking-layout h2,
.ranking-layout p {
  color: #ffffff;
}

.ranking-layout p {
  color: #d1d5db;
  margin-bottom: 26px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: var(--rose);
  font-weight: 900;
}

.rank-name {
  font-weight: 900;
}

.rank-meta {
  color: #d1d5db;
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(225, 29, 72, 0.38), transparent 35%), #0f172a;
  background-position: center;
  background-size: cover;
}

.compact-hero .container,
.ranking-hero .container {
  position: relative;
  z-index: 2;
  padding: 90px 0;
}

.page-hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p:not(.section-kicker) {
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 220px;
  gap: 16px;
  margin-bottom: 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #111827;
  background: #f9fafb;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 640px;
  padding: 74px 0;
}

.detail-poster {
  min-height: 455px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.75), rgba(15, 23, 42, 0.85)),
    var(--detail-image, none);
  background-position: center;
  background-size: cover;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: #f3f4f6;
  font-size: 20px;
  line-height: 1.8;
}

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

.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.player-section {
  padding-top: 60px;
  padding-bottom: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.68), rgba(225, 29, 72, 0.32)),
    var(--player-image, none);
  background-position: center;
  background-size: cover;
  text-align: center;
  z-index: 3;
}

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

.play-circle {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: var(--rose);
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.player-overlay strong {
  max-width: min(620px, 86%);
  padding: 0 18px;
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.2;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 32px;
}

.content-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 25px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.92;
}

.related-list .movie-card {
  flex: 0 0 280px;
}

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

.ranking-card {
  min-width: 0;
}

.ranking-link {
  display: grid;
  grid-template-columns: 70px 140px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.ranking-index {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  background: var(--rose);
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover {
  display: block;
  width: 140px;
  height: 92px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(225, 29, 72, 0.8), rgba(15, 23, 42, 0.78)),
    var(--rank-image, none);
  background-position: center;
  background-size: cover;
}

.ranking-content {
  display: grid;
  gap: 8px;
}

.ranking-content strong {
  color: #111827;
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
}

.ranking-content em,
.ranking-content span {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.site-footer {
  color: #d1d5db;
  background: #0b1120;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0;
}

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

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

.site-footer p {
  margin: 14px 0 0;
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.site-footer a:not(.footer-brand):hover {
  color: #fb7185;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-hero-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .detail-poster {
    min-height: 360px;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

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

  .hero-control {
    display: none;
  }

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

  .ranking-layout,
  .detail-hero-layout,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(310px, 100%);
    min-height: 420px;
  }

  .ranking-link {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .ranking-cover {
    display: none;
  }
}

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

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

  .hero-content {
    padding: 70px 0;
  }

  .section {
    padding: 56px 0;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .movie-poster {
    min-height: 230px;
  }

  .rank-list a {
    grid-template-columns: 48px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .detail-hero-layout {
    min-height: auto;
    padding: 54px 0;
  }

  .detail-poster {
    min-height: 330px;
  }

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