:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--slate-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #334155);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-600), var(--amber-400));
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.28);
}

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

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

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-400);
}

.global-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search input,
.filter-bar input,
.filter-bar select {
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: none;
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.global-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(148, 163, 184, 0.95);
}

.global-search button,
.btn,
.filter-bar select {
  min-height: 42px;
  border-radius: 12px;
}

.global-search button {
  padding: 0 16px;
  color: var(--white);
  background: var(--orange-600);
  transition: transform 0.2s ease, background 0.2s ease;
}

.global-search button:hover,
.btn-primary:hover {
  background: #c2410c;
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  margin-left: auto;
  padding: 10px 12px;
  color: var(--white);
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav a {
  display: block;
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.84);
}

.mobile-nav a:hover {
  color: var(--amber-400);
  background: rgba(255, 255, 255, 0.05);
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  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%;
  opacity: 0.6;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 20%, rgba(249, 115, 22, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.82) 46%, rgba(15, 23, 42, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 590px;
  padding: 80px 0 180px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--orange-600);
}

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

.hero-copy p,
.page-hero p,
.detail-hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-meta span,
.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--orange-600);
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.28);
}

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

.btn-ghost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 36px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  transform: translateX(-50%);
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  border-color: rgba(249, 115, 22, 0.9);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
}

.hero-thumb img {
  width: 66px;
  height: 48px;
  border-radius: 10px;
}

.hero-thumb span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 72px 0;
}

.section-light {
  background: var(--white);
}

.section-muted {
  background: var(--slate-50);
}

.section-head {
  margin-bottom: 30px;
}

.split-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.center-head {
  max-width: 760px;
  text-align: center;
}

.section-head h2,
.rank-copy h2,
.detail-panel h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.rank-copy p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.text-link {
  color: var(--orange-600);
  font-weight: 800;
}

.text-link:hover {
  color: #c2410c;
}

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

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-600));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
}

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: var(--white);
  background: rgba(234, 88, 12, 0.92);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-600), var(--amber-400));
  border-radius: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  margin-top: 12px;
  color: #64748b;
  font-size: 13px;
}

.meta-line span {
  display: inline-flex;
  align-items: center;
}

.meta-line span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-chip {
  color: #475569;
  background: #f1f5f9;
}

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

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--orange-600));
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
}

.category-card h3 {
  margin: 0;
  color: var(--slate-900);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.category-samples {
  display: grid;
  gap: 6px;
  margin: 16px 0 20px;
  color: #475569;
  font-size: 13px;
}

.category-samples span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card strong {
  margin-top: auto;
  color: var(--orange-600);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.rank-copy {
  position: sticky;
  top: 96px;
  padding: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.rank-copy h2,
.rank-copy p {
  color: var(--white);
}

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

.side-card,
.ranking-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-card:hover,
.ranking-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
}

.side-card img,
.ranking-row img {
  width: 108px;
  height: 72px;
  border-radius: 12px;
}

.side-card strong,
.ranking-row strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--slate-900);
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.28), transparent 28%),
    linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

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

.category-hero,
.search-hero {
  padding-bottom: 46px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 760px;
  margin-top: 30px;
}

.filter-bar input {
  flex: 1;
  min-width: 260px;
  color: var(--white);
}

.filter-bar select {
  min-width: 170px;
  color: var(--slate-900);
  background: var(--white);
}

.search-page-bar {
  max-width: 920px;
}

.empty-state {
  display: none;
  width: min(640px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.empty-state.is-visible {
  display: block;
}

.ranking-page {
  max-width: 980px;
}

.ranking-row {
  grid-template-columns: 54px 126px 1fr 110px;
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange-600), var(--amber-400));
  border-radius: 14px;
  font-weight: 900;
}

.ranking-main p {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-hot {
  color: var(--orange-600);
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  padding: 56px 0;
  overflow: hidden;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: center;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.12);
}

.detail-cover {
  width: 280px;
  aspect-ratio: 3 / 4;
  border: 6px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-section {
  padding-top: 42px;
}

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

.detail-main,
.detail-side {
  min-width: 0;
}

.player-stage {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding-left: 6px;
  color: var(--white);
  background: var(--orange-600);
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(234, 88, 12, 0.38);
}

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

.detail-panel,
.side-box {
  margin-top: 24px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.detail-panel h2,
.side-box h3 {
  margin-bottom: 14px;
  font-size: 24px;
}

.detail-panel p {
  color: #334155;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.info-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  color: #334155;
}

.info-list dt {
  color: var(--muted);
  font-weight: 700;
}

.info-list dd {
  margin: 0;
}

.wide-tags {
  margin-top: 0;
}

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

.detail-nav a {
  overflow: hidden;
  padding: 16px;
  color: var(--slate-900);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.detail-nav a:last-child {
  text-align: right;
}

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

.detail-side {
  position: sticky;
  top: 94px;
}

.side-box {
  margin-top: 0;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

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

.site-footer p {
  margin-top: 14px;
  max-width: 420px;
  line-height: 1.7;
}

.site-footer h3 {
  margin-bottom: 14px;
  color: var(--white);
  font-weight: 900;
}

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

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

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 12px;
  }

  .global-search input {
    width: 190px;
  }

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

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

  .detail-layout,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .detail-side,
  .rank-copy {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .global-search {
    display: none;
  }

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

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

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

  .hero-content {
    min-height: 520px;
    padding-bottom: 240px;
  }

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

  .split-head,
  .detail-hero-grid,
  .detail-info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split-head {
    align-items: flex-start;
  }

  .detail-cover {
    width: min(100%, 340px);
  }

  .ranking-row {
    grid-template-columns: 44px 92px 1fr;
  }

  .ranking-hot {
    display: none;
  }

  .side-card,
  .ranking-row {
    grid-template-columns: 92px 1fr;
  }

  .ranking-number {
    grid-column: 1;
    grid-row: 1;
  }
}

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

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

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

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

  .hero-copy p,
  .page-hero p,
  .detail-hero p {
    font-size: 16px;
  }

  .hero-actions,
  .filter-bar {
    flex-direction: column;
  }

  .hero-actions .btn,
  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .hero-thumbs,
  .card-grid,
  .featured-grid,
  .category-grid,
  .related-grid,
  .detail-nav {
    grid-template-columns: 1fr;
  }

  .hero-thumb:nth-child(n + 5) {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

  .card-body h3 {
    min-height: auto;
  }

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

  .detail-nav a:last-child {
    text-align: left;
  }
}
