:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e5e7eb;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --blue: #2563eb;
  --slate: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f8fafc 100%);
  color: var(--text);
}

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

img,
video {
  display: block;
  width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
}

.hero-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.2) 100%),
              linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.08) 48%, rgba(15, 23, 42, 0.45) 100%);
}

.hero-content {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 76px;
  max-width: 720px;
  color: #ffffff;
}

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

.hero-tags span,
.detail-meta span,
.meta-line span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
}

.meta-line span {
  background: #f1f5f9;
  color: #475569;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.42);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-inline-tags {
  margin-top: 18px;
}

.hero-nav {
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.hero-nav button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  width: 44px;
  background: #ffffff;
}

.hero-panel {
  border-radius: 28px;
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 48%, #fff7ed 100%);
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-panel h2,
.section-heading h2,
.page-hero h1,
.detail-intro h1,
.article-card h2,
.side-card h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.hero-panel h2 {
  font-size: 30px;
}

.hero-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.mini-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 56px auto;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 42px);
}

.section-heading span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-more,
.text-link {
  color: var(--orange-dark);
  font-weight: 800;
}

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 116px 1fr;
  min-height: 144px;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card.compact .poster {
  aspect-ratio: auto;
  height: 100%;
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #facc15;
  font-style: normal;
  font-weight: 900;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--orange-dark);
}

.movie-info p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.dark-section {
  width: 100%;
  max-width: none;
  padding: 54px max(16px, calc((100% - 1280px) / 2));
  background: radial-gradient(circle at 10% 0%, rgba(249, 115, 22, 0.3), transparent 28%), linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
}

.dark-section .section-heading,
.dark-section .rank-grid {
  width: min(1280px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.dark-section .section-heading span {
  color: rgba(255, 255, 255, 0.68);
}

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.dark-section .movie-info p,
.dark-section .meta-line span {
  color: rgba(255, 255, 255, 0.72);
}

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

.category-card,
.category-overview-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.category-card {
  min-height: 156px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
}

.category-card strong {
  font-size: 24px;
}

.category-card span,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 68px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.4), transparent 30%), linear-gradient(135deg, #111827, #1e3a8a 52%, #0f172a);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  padding: 54px 68px;
}

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

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  font-size: 18px;
}

.listing-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(460px, 100%);
}

.search-box span {
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  padding: 12px 16px;
}

.search-box input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

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

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  border-color: transparent;
}

.category-overview-card {
  overflow: hidden;
}

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

.category-cover-stack img {
  aspect-ratio: 3 / 4;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-overview-card div:not(.category-cover-stack) {
  padding: 22px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  filter: blur(8px);
  transform: scale(1.04);
}

.detail-backdrop img {
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.76));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

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

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

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

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

.detail-intro h1 {
  max-width: 900px;
  font-size: clamp(36px, 6vw, 72px);
}

.one-line {
  max-width: 900px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
  line-height: 1.8;
}

.detail-intro .btn {
  margin-top: 24px;
}

.player-section {
  margin-top: 40px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.46));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.42);
  font-size: 34px;
  transform: translateX(3px);
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.article-card,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  padding: 28px;
}

.article-card h2 + p {
  margin-top: 14px;
}

.article-card h2:not(:first-child) {
  margin-top: 28px;
}

.article-card p {
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

.side-card dl {
  margin: 18px 0 0;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.site-footer {
  margin-top: 70px;
  padding: 44px 0;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

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

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

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

  .hero-panel {
    order: 2;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    left: 24px;
    right: 24px;
    bottom: 78px;
  }

  .hero-nav {
    left: 22px;
    right: 22px;
  }

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

  .listing-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

  .page-hero {
    padding: 42px 26px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-wrap,
  .hero-shell,
  .content-section,
  .page-hero,
  .detail-wrap,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    height: 520px;
    border-radius: 22px;
  }

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

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

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

  .movie-card.compact {
    grid-template-columns: 100px 1fr;
  }

  .hero-panel,
  .article-card,
  .side-card {
    padding: 22px;
  }

  .detail-intro h1 {
    font-size: 34px;
  }

  .side-card dl {
    grid-template-columns: 70px 1fr;
  }
}
