* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 38rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #111827 100%);
}

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

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.nav-inner {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link {
  position: relative;
  color: #d1d5db;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -23px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  opacity: 0;
  transform: scaleX(0.4);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 23px;
}

.mobile-panel {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #d1d5db;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 74px 22px 96px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-slide::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.9)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(9px) saturate(1.15);
  transform: scale(1.08);
}

.hero-slide::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 46%;
  z-index: -1;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.34);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 20px 0 0;
  font-size: clamp(36px, 7vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero-content h1 + h2 {
  margin-top: 16px;
  font-size: clamp(28px, 4.6vw, 48px);
  color: #fecaca;
}

.hero-content p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tag-row.large span {
  font-size: 13px;
  padding: 8px 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 19px;
  border-radius: 14px;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.btn.ghost {
  background: rgba(15, 23, 42, 0.66);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.28);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.35), transparent 52%);
}

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

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

.hero-dots button {
  width: 32px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

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

.search-band,
.section-wrap,
.split-section,
.page-main,
.site-footer {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  gap: 24px;
  align-items: center;
  margin-top: -34px;
  padding-top: 28px;
  padding-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-band h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2,
.site-footer h2 {
  margin: 0;
}

.search-band h2,
.section-head h2,
.page-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.search-band p,
.page-hero p,
.category-overview-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

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

.search-box.inline {
  min-width: min(520px, 100%);
}

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

input,
select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 15px 16px;
  outline: 0;
  font-size: 15px;
}

select {
  max-width: 220px;
}

input:focus,
select:focus {
  border-color: rgba(248, 113, 113, 0.72);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.section-wrap {
  padding-top: 72px;
}

.section-wrap.full {
  padding-top: 38px;
}

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

.section-head.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-head a {
  color: #fed7aa;
  font-weight: 900;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.72)), var(--tile-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 113, 113, 0.5);
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.category-tile strong {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 113, 113, 0.48);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

.play-badge,
.year-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  z-index: 2;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
}

.year-badge {
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.card-body {
  padding: 15px;
}

.card-body h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.36;
}

.card-body h2 a:hover {
  color: #fca5a5;
}

.meta-line {
  margin-top: 7px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 800;
}

.card-body p {
  min-height: 54px;
  margin: 9px 0 13px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  padding-top: 76px;
}

.rank-panel,
.editor-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-num,
.ranking-big {
  color: #fb7185;
  font-weight: 1000;
}

.rank-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.page-main {
  padding-top: 44px;
  padding-bottom: 80px;
}

.page-hero.small {
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.42), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow);
}

.page-hero.small p {
  max-width: 780px;
  margin-bottom: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  margin-top: 24px;
}

.category-overview-grid {
  padding-top: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-overview-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-height: 260px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.category-samples a {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  color: #fde68a;
  font-size: 13px;
}

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

.ranking-card {
  position: relative;
}

.ranking-big {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 3;
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.3);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.38));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.48);
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.22);
  font-weight: 800;
  font-size: 13px;
}

.player-section {
  padding-top: 32px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(2, 6, 23, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 22px 54px rgba(239, 68, 68, 0.38);
  font-size: 34px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 32px;
}

.detail-content article {
  padding: 30px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
}

.detail-content p {
  margin-bottom: 0;
  color: #dbe4f0;
  line-height: 1.9;
}

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

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

.site-footer {
  padding-top: 60px;
  padding-bottom: 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.58);
}

.site-footer h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

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

.footer-links a {
  color: var(--soft);
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.24);
}

.footer-bottom {
  color: var(--muted);
  text-align: center;
  padding-top: 22px;
  font-size: 13px;
}

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

.no-result {
  grid-column: 1 / -1;
  padding: 26px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.28);
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.wide,
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

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

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 42px;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
    transform: none;
  }

  .search-band,
  .split-section,
  .detail-hero,
  .detail-content,
  .footer-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .nav-inner,
  .mobile-panel,
  .search-band,
  .section-wrap,
  .split-section,
  .page-main,
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand {
    font-size: 20px;
  }

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

  .hero-content p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .search-band,
  .page-hero.small,
  .rank-panel,
  .editor-panel,
  .detail-hero,
  .detail-content article,
  .footer-grid {
    border-radius: 22px;
    padding: 22px;
  }

  .category-grid,
  .movie-grid,
  .movie-grid.wide,
  .mini-grid,
  .ranking-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  select,
  .search-box.inline {
    max-width: none;
    width: 100%;
  }
}
