:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --red: #ef4444;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --amber: #f59e0b;
  --radius: 24px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(239, 68, 68, 0.28), transparent 34rem),
    radial-gradient(circle at 84% 4%, rgba(249, 115, 22, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, var(--bg) 42%, #111827 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  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;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-size: clamp(20px, 2.4vw, 30px);
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.34);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fff;
  background: rgba(239, 68, 68, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
}

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

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

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.hero-carousel {
  position: relative;
  min-height: clamp(560px, 78vh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) 360px;
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 70px);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 600ms ease, transform 720ms ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74) 48%, rgba(2, 6, 23, 0.68)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.86)),
    var(--hero-image) center / cover;
  filter: saturate(1.16);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fecaca;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2.1vw, 23px);
  line-height: 1.85;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.primary-btn,
.ghost-btn,
.section-link,
.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease;
}

.primary-btn,
.small-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 38px rgba(239, 68, 68, 0.3);
}

.primary-btn {
  min-height: 52px;
  padding: 0 26px;
}

.ghost-btn,
.section-link {
  min-height: 52px;
  padding: 0 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

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

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fee2e2;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(239, 68, 68, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.hero-poster {
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 5vw, 70px);
  bottom: 28px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 38px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.hero-side-panel,
.tool-panel,
.content-card,
.detail-box,
.player-card,
.category-card,
.rank-item {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.72));
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.hero-side-panel {
  min-height: 560px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quick-search label,
.side-links h2 {
  display: block;
  margin: 0 0 12px;
  font-size: 15px;
  color: #fff;
  font-weight: 900;
}

.search-bar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(2, 6, 23, 0.52);
}

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

.search-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
}

.search-bar input::placeholder {
  color: #94a3b8;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transition: background 180ms ease, transform 180ms ease;
}

.side-links a:hover {
  transform: translateX(3px);
  background: rgba(239, 68, 68, 0.18);
}

.side-links em {
  color: #fca5a5;
  font-style: normal;
  font-weight: 900;
}

.category-pills,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a,
.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.category-pills a:hover {
  color: #fff;
  border-color: rgba(239, 68, 68, 0.64);
  background: rgba(239, 68, 68, 0.18);
}

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

.content-section {
  margin-top: 58px;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-heading p,
.section-heading p,
.detail-title p,
.category-card p,
.detail-box p,
.player-intro p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border 180ms ease, background 180ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(30, 41, 59, 0.9);
}

.movie-card.hidden {
  display: none;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.poster-link img {
  transition: transform 300ms ease, filter 300ms ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.05);
  filter: saturate(1.12);
}

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 14px;
}

.rank-badge {
  left: 14px;
  top: 14px;
  min-width: 42px;
  height: 34px;
  border-radius: 12px;
  font-size: 14px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2 {
  margin: 9px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.movie-card p {
  min-height: 66px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.tool-panel {
  margin: 28px 0;
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  min-height: 210px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -90px auto auto -90px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.22);
  filter: blur(10px);
}

.category-card h2 {
  position: relative;
  margin: 0 0 12px;
  font-size: 30px;
}

.category-card p,
.category-card .small-btn {
  position: relative;
}

.small-btn {
  min-height: 42px;
  padding: 0 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-cover {
  width: 86px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.detail-title {
  padding: 34px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.08)),
    rgba(15, 23, 42, 0.82);
}

.breadcrumb {
  margin-bottom: 12px;
  color: #fca5a5;
  font-size: 13px;
  font-weight: 800;
}

.player-card {
  margin-top: 34px;
  padding: 18px;
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.74));
  transition: opacity 180ms ease, visibility 180ms ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  font-size: 30px;
  cursor: pointer;
}

.player-intro {
  padding: 20px 4px 0;
}

.player-intro h2,
.detail-box h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.detail-box {
  padding: 24px;
  margin-bottom: 22px;
}

.side-card-list {
  display: grid;
  gap: 14px;
}

.side-mini {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.side-mini img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.side-mini h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.side-mini p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(2, 6, 23, 0.92));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 22px;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 40px;
}

.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 1020px) {
  .hero,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-side-panel {
    min-height: auto;
  }

  .hero-slide,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-item .small-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    width: calc(100% - 20px);
  }

  .main-content,
  .page-shell,
  .detail-layout,
  .detail-hero,
  .footer-grid,
  .copyright,
  .nav-shell,
  .mobile-panel {
    width: calc(100% - 20px);
  }
}
