:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 32rem),
    linear-gradient(180deg, #fff7ed 0, var(--bg) 34rem);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--orange-dark);
  background: #ffedd5;
}

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

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
  align-items: center;
  gap: 36px;
  padding: 70px max(32px, calc((100vw - 1180px) / 2)) 150px;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(14px) saturate(1.14);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.52) 100%),
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.46), transparent 26rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.35);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.category-pills,
.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-list span,
.category-pills a {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  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: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.32);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  max-height: 470px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-search-panel {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
}

.hero-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-search {
  flex: 1;
}

.hero-search input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.hero-search button,
.inline-search button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  font-weight: 900;
  cursor: pointer;
}

.hero-quick-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 160px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.content-section {
  margin: 56px 0;
}

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

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

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: var(--orange-dark);
  font-weight: 900;
}

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

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

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

.large-card-stack {
  display: grid;
  gap: 22px;
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.rank-item:hover,
.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(249, 115, 22, 0.24), transparent 15rem),
    linear-gradient(135deg, #1f2937, #111827);
}

.poster-frame img,
.category-cover::before,
.rank-poster img,
.poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.wide-poster {
  aspect-ratio: 21 / 9;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-topline,
.movie-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-topline span:last-child {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  padding: 3px 8px;
  border-radius: 999px;
}

.movie-card strong,
.rank-info strong,
.poster-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.36;
  font-weight: 950;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card em,
.rank-info em,
.category-tile em,
.poster-card span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-large {
  position: relative;
  min-height: 300px;
  color: #ffffff;
}

.movie-card-large .movie-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.08));
}

.movie-card-large strong {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 38px);
}

.movie-card-large em,
.movie-card-large .movie-meta-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
}

.pill {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.9);
  font-size: 13px;
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 20px;
  border-radius: 26px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-cover {
  position: absolute;
  inset: 0;
  background-image: var(--category-image);
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  transform: scale(1.06);
}

.category-tile::after,
.category-overview-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.25));
}

.category-tile > span:last-child,
.category-overview-head > * {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  display: block;
  margin-top: 78px;
  font-size: 24px;
  font-weight: 950;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.76);
}

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

.ranking-panel,
.detail-card,
.side-panel,
.plain-content,
.category-overview-card {
  padding: 24px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-list,
.ranking-page-list,
.side-related {
  display: grid;
  gap: 12px;
}

.rank-row,
.ranking-page-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.rank-row > span,
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 950;
}

.rank-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.rank-info strong {
  font-size: 15px;
}

.rank-info span {
  color: var(--muted);
  font-size: 12px;
}

.rank-score {
  color: var(--orange-dark);
  font-size: 20px;
  font-weight: 950;
}

.page-main {
  padding: 38px 0 20px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 7vw, 78px);
  border-radius: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.38), transparent 28rem),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #431407);
  box-shadow: var(--shadow);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.inline-search {
  width: min(620px, 100%);
  margin-top: 26px;
}

.full-search {
  width: 100%;
  max-width: none;
  margin: 0 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--orange-dark);
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

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

.category-overview-head {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #7c2d12);
}

.category-overview-head span {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 950;
}

.category-overview-head strong {
  display: block;
  margin: 52px 0 10px;
  font-size: 26px;
  font-weight: 950;
}

.category-overview-head em {
  color: rgba(255, 255, 255, 0.78);
}

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

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

.detail-primary {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  border: 0;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.32)),
    var(--poster-image) center / cover;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.42);
  font-size: 32px;
  line-height: 1;
}

.player-cover strong {
  max-width: 720px;
  font-size: clamp(24px, 4vw, 46px);
  font-weight: 950;
}

.player-cover em {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.8);
  font-style: normal;
  line-height: 1.7;
}

.detail-card {
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-card h2,
.plain-content h2,
.side-panel h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-card p,
.plain-content p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

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

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #1f2937, #111827);
}

.poster-card div {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.poster-card .btn {
  width: 100%;
}

.ranking-page-list .rank-item {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  background: #ffffff;
}

.plain-content {
  margin-top: 32px;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 360px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

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

.footer-column a {
  color: #94a3b8;
  font-size: 14px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
}

[hidden] {
  display: none !important;
}

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

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

  .split-section,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 40px;
    padding-bottom: 190px;
  }

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

  .hero-search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search,
  .inline-search {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-dots {
    left: 32px;
    right: auto;
    bottom: 178px;
  }

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

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

@media (max-width: 560px) {
  .container,
  .header-inner,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 20px, 1180px);
  }

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

  .hero {
    min-height: 800px;
  }

  .hero-slide {
    padding-left: 18px;
    padding-right: 18px;
  }

  .page-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .mini-card-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .ranking-page-list .rank-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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