:root {
  --rose: #e11d48;
  --rose-dark: #9f1239;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #fff7ed 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 12px 25px rgba(225, 29, 72, 0.28);
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  white-space: nowrap;
}

.main-nav a,
.mobile-nav a {
  font-size: 15px;
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--rose);
}

.header-search {
  width: 260px;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 9px 12px;
  background: transparent;
}

.header-search button,
.large-search button,
.search-page-form button {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.24);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: linear-gradient(120deg, #881337, #78350f);
}

.hero-track,
.hero-slide {
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(245, 158, 11, 0.22), transparent 35%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.55) 43%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  height: 100%;
  padding: 90px 24px 80px;
  margin-left: max(24px, calc((100vw - 1280px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

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

.hero-kicker span,
.movie-meta span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-kicker span {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 680px;
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.9;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  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(--rose), var(--amber));
  box-shadow: 0 18px 38px rgba(225, 29, 72, 0.34);
}

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

.btn-light {
  color: var(--rose-dark);
  background: #fff1f2;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.search-band,
.content-section,
.page-hero,
.breadcrumb,
.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  margin-top: -50px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.large-search,
.search-page-form {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.large-search input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

.content-section {
  padding-top: 58px;
  padding-bottom: 30px;
}

.tinted-section {
  margin-top: 30px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.8), rgba(255, 251, 235, 0.8));
}

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

.compact-head,
.inline-head {
  display: block;
  margin-bottom: 0;
}

.section-head span,
.page-hero span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--rose);
  font-weight: 950;
  letter-spacing: 0.08em;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  font-weight: 950;
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-head > a {
  color: var(--rose);
  font-weight: 900;
}

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

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

.compact-grid,
.catalogue-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(225, 29, 72, 0.22);
  box-shadow: 0 26px 52px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #881337, #78350f);
}

.poster-link img,
.category-card img,
.rank-thumb img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

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

.movie-meta span {
  padding: 5px 9px;
  color: #9f1239;
  background: #fff1f2;
  font-size: 12px;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
}

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

.movie-card h2 a:hover,
.rank-info h2 a:hover {
  color: var(--rose);
}

.movie-card p,
.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.movie-tags {
  margin-top: 12px;
}

.movie-tags span {
  padding: 5px 9px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.category-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
  z-index: 1;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(229, 231, 235, 0.85);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 950;
}

.rank-thumb {
  width: 76px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #881337, #78350f);
}

.rank-info h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 950;
}

.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  color: var(--rose);
  border-radius: 999px;
  background: #fff1f2;
  font-weight: 900;
}

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

.page-hero {
  padding-top: 70px;
  padding-bottom: 70px;
}

.page-hero > div {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  padding: 46px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 22%, rgba(245, 158, 11, 0.45), transparent 32%),
    linear-gradient(135deg, #881337, #9f1239 48%, #78350f);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 780px;
  font-size: clamp(36px, 5vw, 58px);
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.category-overview-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.12);
}

.category-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 950;
}

.category-overview-card h2 {
  margin: 18px 0 10px;
  font-size: 26px;
  font-weight: 950;
}

.category-overview-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.8;
}

.category-overview-card strong {
  color: var(--rose);
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: #fff;
}

.filter-panel input {
  flex: 1;
  min-width: 240px;
}

.breadcrumb {
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.breadcrumb a:after {
  content: "/";
  margin-left: 8px;
  color: #d1d5db;
}

.detail-hero {
  padding-top: 30px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: linear-gradient(135deg, #881337, #78350f);
  box-shadow: var(--shadow);
}

.detail-info {
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  color: #4b5563;
  font-size: 18px;
  line-height: 1.9;
}

.watch-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 20px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(225, 29, 72, 0.28), transparent 25%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.52));
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  box-shadow: 0 20px 50px rgba(225, 29, 72, 0.38);
  font-size: 32px;
  padding-left: 5px;
}

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

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

.story-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.story-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.95;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
  border-top: 1px solid var(--line);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  font-size: 22px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 950;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: #4b5563;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--rose);
}

.footer-bottom {
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

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

  .main-nav {
    justify-content: flex-end;
  }

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

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

  .full-rank-list {
    grid-template-columns: 1fr;
  }
}

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

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

  .header-inner {
    height: 64px;
  }

  .hero {
    height: 76vh;
  }

  .hero-content {
    padding-top: 80px;
    padding-bottom: 70px;
    margin-left: 0;
  }

  .hero-arrow {
    display: none;
  }

  .search-band {
    grid-template-columns: 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }

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

  .detail-cover {
    max-width: 360px;
    width: 100%;
    margin: 0 auto;
  }

  .category-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 19px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

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

  .search-band,
  .content-section,
  .page-hero,
  .breadcrumb,
  .detail-hero,
  .watch-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero > div,
  .detail-info {
    padding: 26px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalogue-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .movie-card p {
    font-size: 13px;
  }

  .category-card {
    min-height: 170px;
  }

  .rank-row {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }

  .rank-number {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .rank-thumb {
    width: 58px;
  }

  .large-search,
  .search-page-form {
    border-radius: 24px;
    flex-direction: column;
  }

  .large-search input,
  .search-page-form input {
    min-height: 44px;
  }

  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }

  .play-layer span {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
