:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(251, 191, 36, 0.14);
  --glow: rgba(251, 191, 36, 0.32);
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 0 34px var(--glow);
  font-size: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

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

.brand-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-link {
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

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

.header-search {
  position: relative;
  width: 250px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.62);
  padding: 10px 12px;
}

.search-icon {
  color: var(--muted);
  font-size: 18px;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.header-search input::placeholder {
  color: var(--muted);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 520px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-panel.open {
  display: grid;
  gap: 8px;
}

.search-result {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: rgba(30, 41, 59, 0.55);
}

.search-result img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(30, 41, 59, 0.95));
}

.search-result strong {
  display: block;
  font-size: 14px;
}

.search-result span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.78);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  padding: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-panel.open {
  display: grid;
}

.mobile-panel a {
  border-radius: 12px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.68);
  color: var(--soft);
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: clamp(440px, 62vw, 680px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.9)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 46%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: clamp(440px, 62vw, 680px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 48px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 16px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.85;
}

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

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

.hero-tags span,
.detail-meta span,
.movie-meta-line span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.78);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.28);
}

.ghost-btn,
.section-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(30, 41, 59, 0.94));
  box-shadow: var(--shadow), 0 0 80px rgba(251, 191, 36, 0.15);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.42);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.quick-categories,
.content-section,
.split-section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-categories {
  margin-top: -44px;
  position: relative;
  z-index: 6;
}

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

.category-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.26;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent);
}

.category-card span,
.category-card strong {
  position: relative;
  z-index: 1;
}

.category-card span {
  color: var(--accent);
  font-weight: 900;
}

.category-card strong {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.content-section,
.split-section {
  margin-top: 72px;
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(24px, 3.5vw, 40px);
  letter-spacing: -0.05em;
}

.slim-heading h2 {
  font-size: 30px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.36);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(30, 41, 59, 0.95));
}

.poster-wrap img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

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

.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

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

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

.movie-card-body p {
  margin: 0;
  min-height: 68px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent);
  background: rgba(251, 191, 36, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
}

.rank-panel,
.search-guide,
.story-card,
.player-section,
.filter-bar,
.page-hero,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-panel,
.search-guide {
  padding: 24px;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-card {
  display: grid;
  grid-template-columns: 34px 54px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.55);
}

.compact-card span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #111827;
  background: var(--accent);
  font-weight: 900;
}

.compact-card img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(30, 41, 59, 0.95));
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.search-guide {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.search-guide h2 {
  margin: 16px 0 12px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.search-guide p {
  color: var(--soft);
  line-height: 1.8;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.guide-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.56);
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.page-main,
.detail-main {
  padding: 38px 0 80px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.76);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.07em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
}

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

.category-cover img {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(30, 41, 59, 0.95));
}

.category-overview-card h2 {
  margin: 14px 0 10px;
  font-size: 30px;
}

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

.filter-bar {
  margin-top: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 12px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 12px;
  background: rgba(2, 6, 23, 0.56);
  color: var(--text);
}

.page-grid {
  margin-top: 24px;
}

.detail-main {
  max-width: min(1180px, calc(100% - 32px));
}

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

.breadcrumb a:hover {
  color: var(--accent);
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(30, 41, 59, 0.95));
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.detail-line {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 28px;
}

.player-section {
  margin-top: 28px;
  overflow: hidden;
  padding: 0;
}

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

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.32);
  font-size: 34px;
}

.video-frame.playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.story-card {
  padding: 28px;
}

.story-card h2 {
  margin: 16px 0 12px;
  font-size: 28px;
}

.story-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.9;
}

.related-section {
  width: 100%;
}

.rank-hero {
  min-height: 360px;
}

.rank-hero img {
  position: absolute;
  inset: 0;
  opacity: 0.22;
}

.rank-hero > div,
.rank-hero > a {
  position: relative;
  z-index: 2;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.footer-brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

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

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

.image-missing {
  opacity: 0;
}

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr 260px;
  }

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

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

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

  .brand-text em {
    display: none;
  }

  .header-search {
    width: min(48vw, 210px);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 36px 0 72px;
  }

  .hero-poster {
    display: none;
  }

  .quick-categories {
    margin-top: 22px;
  }

  .quick-inner,
  .movie-grid,
  .compact-grid,
  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

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

  .detail-cover {
    max-width: 300px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

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

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

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