:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #d97706;
  --accent-dark: #b45309;
  --accent-soft: #fff7ed;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  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(var(--container), calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.brand.mini {
  color: #ffffff;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: #334155;
  border-radius: 999px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search {
  width: 260px;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus {
  border-color: rgba(217, 119, 6, 0.6);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 999px;
}

.hero {
  position: relative;
  height: min(72vh, 700px);
  min-height: 520px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #334155);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(245, 158, 11, 0.32), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - var(--container)) / 2));
  bottom: 82px;
  width: min(720px, calc(100% - 48px));
  color: #ffffff;
}

.hero-tags,
.detail-tags,
.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.detail-tags a,
.card-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span:nth-child(2),
.detail-tags span:nth-child(2) {
  background: rgba(37, 99, 235, 0.9);
}

.hero-tags span:nth-child(3),
.detail-tags span:nth-child(3) {
  background: rgba(22, 163, 74, 0.9);
}

.hero-tags span:nth-child(4),
.detail-tags span:nth-child(4) {
  background: rgba(124, 58, 237, 0.9);
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.intro-strip,
.page-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 26px rgba(217, 119, 6, 0.26);
}

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

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

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

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

.intro-strip,
.page-shell,
.page-section {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.intro-strip {
  justify-content: space-between;
  margin-top: -48px;
  padding: 28px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-strip h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
}

.intro-strip p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.page-section {
  padding: 58px 0;
}

.no-padding-top {
  padding-top: 0;
}

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

.section-heading h2,
.panel-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

.section-heading a,
.panel-title a,
.text-link {
  color: var(--accent-dark);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

.category-tile img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #334155);
  transition: transform 0.35s ease;
}

.category-tile:hover img,
.category-card:hover .category-cover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.tile-shade,
.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(15, 23, 42, 0.9) 100%);
}

.category-tile strong,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #ffffff;
}

.category-tile strong {
  bottom: 56px;
  font-size: 20px;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #334155);
  transition: transform 0.35s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.82) 100%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

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

.card-badges span {
  min-height: 24px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
}

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

.movie-card h3 a:hover {
  color: var(--accent-dark);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.player-card,
.detail-content,
.detail-side,
.category-card,
.rank-table {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 60px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--surface-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--accent-soft);
  transform: translateX(3px);
}

.rank-no,
.rank-number {
  color: var(--accent-dark);
  font-weight: 900;
}

.rank-item img {
  width: 60px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--muted);
}

.page-shell {
  padding: 34px 0 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 700;
}

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 10px;
  color: #cbd5e1;
}

.page-hero {
  justify-content: space-between;
  margin-bottom: 36px;
  padding: 34px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.45), transparent 32%),
    linear-gradient(135deg, #111827 0%, #1e293b 58%, #334155 100%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.eyebrow {
  color: #fed7aa;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

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

.category-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 18px;
}

.category-cover {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.category-card h2 {
  margin: 8px 0 10px;
}

.category-card p {
  color: var(--muted);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.filter-bar button {
  min-height: 36px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: var(--surface-soft);
  cursor: pointer;
  font-weight: 750;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: #ffffff;
  background: var(--accent);
}

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

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

.movie-card-large .poster-link {
  aspect-ratio: 16 / 10;
}

.rank-table {
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: var(--accent-soft);
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-main strong,
.rank-main small {
  display: block;
}

.rank-main small,
.rank-meta-text {
  color: var(--muted);
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  padding: 14px;
  background: #0f172a;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #000000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(217, 119, 6, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.82));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-frame.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.34);
}

.detail-content {
  padding: clamp(22px, 4vw, 38px);
}

.detail-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.detail-content .lead {
  color: #334155;
  font-size: 18px;
}

.detail-content h2 {
  margin: 30px 0 10px;
  font-size: 24px;
}

.detail-content p {
  color: #475569;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0 8px;
}

.tag-cloud span {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 750;
}

.detail-side {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #111827;
}

.side-meta {
  padding: 20px;
}

.side-meta h2 {
  margin: 0 0 14px;
}

.side-meta p {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  margin: 10px 0;
  color: var(--muted);
}

.side-meta strong {
  color: var(--ink);
}

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

.site-footer {
  margin-top: 68px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
}

.footer-brand p {
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  justify-content: end;
  align-content: start;
  align-items: start;
  gap: 16px 26px;
  flex-wrap: wrap;
}

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

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

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 55;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

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

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

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

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .header-search {
    width: min(42vw, 220px);
  }

  .hero {
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 72px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .intro-strip,
  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 62px 1fr;
  }

  .rank-meta-text {
    display: none;
  }

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

  .footer-links {
    justify-content: start;
  }
}

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

  .header-search {
    display: none;
  }

  .hero {
    min-height: 520px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .intro-strip,
  .page-hero,
  .detail-content {
    padding: 22px;
  }

  .category-grid,
  .category-list-grid,
  .lead-grid,
  .movie-grid,
  .movie-grid.compact,
  .category-movies {
    grid-template-columns: 1fr;
  }

  .movie-card p {
    min-height: auto;
  }

  .side-meta p {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
