:root {
  --bg: #030712;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --red: #dc2626;
  --red-dark: #991b1b;
  --orange: #f97316;
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.16), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

main {
  padding-top: 76px;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.28);
  color: #fff;
  font-size: 16px;
}

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

.brand-text strong,
.footer-brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.desktop-nav a,
.mobile-nav a,
.nav-pill {
  padding: 10px 16px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-weight: 650;
  transition: 0.22s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.nav-pill:hover,
.nav-pill.active {
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  box-shadow: 0 14px 32px rgba(220, 38, 38, 0.22);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
}

.hero-shell,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: min(720px, calc(100vh - 76px));
  background: linear-gradient(180deg, #111827, #030712);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 50px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(16px) saturate(1.15);
  transform: scale(1.08);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.66), rgba(3, 7, 18, 0.78)),
    radial-gradient(circle at 30% 35%, rgba(220, 38, 38, 0.22), transparent 32rem);
}

.hero-copy,
.hero-poster,
.detail-layout {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.26);
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-heading h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-line,
.hero-copy p,
.page-hero p,
.detail-heading p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 22px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  border: 1px solid rgba(203, 213, 225, 0.16);
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
}

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

.hero-tags,
.detail-tags,
.tag-row,
.nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags a,
.detail-tags a,
.tag-row span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted-strong);
  font-size: 12px;
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-poster span,
.detail-poster span {
  display: block;
  padding: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: max(20px, calc((100vw - 1240px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dot.active {
  width: 54px;
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.search-band,
.content-section,
.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  margin-top: -34px;
  position: relative;
  z-index: 8;
}

.search-panel,
.filter-bar,
.story-card,
.ranking-panel,
.overview-card,
.category-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 24px;
}

.search-panel h2,
.section-heading h2,
.ranking-panel-head h2,
.story-card h2,
.site-footer h2,
.overview-body h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.2;
}

.search-panel p,
.section-heading p,
.overview-body p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px 8px 16px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.76);
}

.search-box span {
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.search-box input::placeholder {
  color: #64748b;
}

.content-section {
  padding: 72px 0 0;
}

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

.section-heading a,
.ranking-panel-head a {
  color: #fb923c;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.84));
  opacity: 0.72;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(220, 38, 38, 0.94);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--red));
}

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

.movie-card h3 {
  min-height: 44px;
  margin: 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
}

.movie-card h3 a:hover {
  color: #fca5a5;
}

.card-meta,
.card-desc {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  margin-top: 10px;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 22px;
}

.ranking-panel-head,
.ranking-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.ranking-link {
  justify-content: flex-start;
  padding: 10px;
  border-radius: 16px;
  background: rgba(3, 7, 18, 0.5);
  transition: 0.22s ease;
}

.ranking-link:hover {
  background: rgba(127, 29, 29, 0.42);
}

.ranking-number {
  width: 30px;
  color: #fb923c;
  font-weight: 900;
}

.ranking-link img {
  width: 48px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-text {
  min-width: 0;
  flex: 1;
}

.ranking-text strong,
.ranking-text em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-text strong {
  color: #fff;
}

.ranking-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.heat-value {
  color: #fca5a5;
  font-weight: 900;
}

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

.category-card,
.overview-card {
  overflow: hidden;
  border-radius: 22px;
  transition: 0.22s ease;
}

.category-card {
  display: grid;
  min-height: 220px;
  padding: 20px;
}

.category-card:hover,
.overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 146, 60, 0.45);
}

.category-title {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-desc {
  margin-top: 10px;
  color: var(--muted);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  align-self: end;
  margin-top: 18px;
}

.category-thumbs img,
.overview-cover img {
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
}

.page-hero {
  min-height: 380px;
  padding: 86px max(16px, calc((100vw - 1240px) / 2)) 70px;
  background: linear-gradient(180deg, #111827, #030712);
}

.compact-hero::before {
  background-image: linear-gradient(135deg, rgba(220, 38, 38, 0.32), transparent 42%), linear-gradient(315deg, rgba(249, 115, 22, 0.22), transparent 48%);
  filter: none;
  opacity: 1;
  transform: none;
}

.page-hero > * {
  position: relative;
  z-index: 2;
}

.nav-pills {
  margin-top: 28px;
}

.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 20px;
}

.sticky-filter {
  position: sticky;
  top: 92px;
  z-index: 20;
}

.wide-search {
  width: min(620px, 100%);
}

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

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

.overview-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 14px;
  background: rgba(3, 7, 18, 0.52);
}

.overview-body {
  padding: 22px;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.overview-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.16);
  color: #fecaca;
  font-size: 12px;
}

.ranking-hero {
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 46px;
  padding: 70px max(16px, calc((100vw - 1240px) / 2));
  background: #030712;
}

.full-ranking {
  margin-top: 0;
}

.narrow-section {
  max-width: 920px;
}

.detail-hero {
  min-height: 560px;
  padding: 64px max(16px, calc((100vw - 1240px) / 2));
  background: #030712;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

.breadcrumbs a:hover {
  color: #fca5a5;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
}

.detail-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: saturate(1.12);
}

.big-play {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 24px 58px rgba(220, 38, 38, 0.38);
  font-size: 32px;
  text-indent: 4px;
}

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

.detail-content {
  display: grid;
  gap: 18px;
}

.story-card {
  padding: 24px;
  border-radius: 22px;
}

.story-card p {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.site-footer {
  margin-top: 86px;
  padding: 44px 0 30px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

.footer-links {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

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

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

.footer-bottom {
  margin-top: 36px;
  color: #64748b;
  font-size: 13px;
}

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

@media (max-width: 1120px) {
  .home-grid,
  .archive-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  main {
    padding-top: 68px;
  }

  .header-inner {
    height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .hero-slide,
  .detail-layout,
  .overview-card,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    align-content: center;
    gap: 24px;
  }

  .hero-poster,
  .detail-poster {
    justify-self: start;
    width: min(260px, 76vw);
  }

  .hero-dots {
    right: 18px;
    bottom: 18px;
  }

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

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

@media (max-width: 560px) {
  .home-grid,
  .archive-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-heading h1 {
    font-size: 40px;
  }

  .content-section {
    padding-top: 52px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero,
  .detail-hero {
    padding-top: 54px;
    padding-bottom: 54px;
  }
}
