:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --red-deep: #dc2626;
  --orange: #f97316;
  --cyan: #22d3ee;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  display: block;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.9));
}

.max-wrap {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(18px);
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

.logo-text,
.footer-logo span:last-child {
  font-size: 1.22rem;
  color: transparent;
  background: linear-gradient(90deg, #ef4444, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  color: #d1d5db;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

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

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  outline: none;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  height: 38px;
  padding: 0 14px;
}

.nav-search button,
.btn-primary,
.btn-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-search button,
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.22);
}

.nav-search button {
  height: 38px;
  padding: 0 16px;
}

.btn-primary {
  min-height: 44px;
  padding: 0 22px;
}

.btn-outline,
.btn-ghost {
  min-height: 42px;
  padding: 0 18px;
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.btn-ghost {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.22);
}

.nav-search button:hover,
.btn-primary:hover,
.btn-outline:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
}

.hero-slider {
  position: relative;
  height: 74vh;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.26) 45%, rgba(2, 6, 23, 0.46) 100%);
}

.hero-content {
  position: absolute;
  bottom: 78px;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(660px, calc(100% - 48px));
}

.hero-kicker,
.detail-kicker,
.section-eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.8rem, 6vw, 5.9rem);
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0;
  color: #dbe4f0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 5px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
  font-size: 0.76rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 2rem;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--red);
}

.page-main {
  padding-top: 92px;
}

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

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

.section-heading h2,
.page-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-link {
  color: #fca5a5;
  font-weight: 800;
}

.movie-grid,
.featured-grid,
.category-tile-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 24px 60px rgba(239, 68, 68, 0.16);
  transform: translateY(-4px);
}

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

.poster-link img {
  height: 100%;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.35);
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.movie-card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.movie-card-desc {
  display: -webkit-box;
  min-height: 3.2em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.movie-card.compact .movie-card-desc {
  display: none;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
}

.category-tile {
  min-height: 210px;
  padding: 22px;
}

.category-tile img,
.category-overlay {
  position: absolute;
  inset: 0;
  height: 100%;
}

.category-tile img {
  opacity: 0.42;
  transition: transform 0.35s ease;
}

.category-overlay {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile strong {
  margin-top: 120px;
  color: #fff;
  font-size: 1.35rem;
  font-style: normal;
  font-weight: 950;
}

.category-tile em {
  margin-top: 6px;
  color: #cbd5e1;
  font-style: normal;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

.side-ranking {
  position: sticky;
  top: 92px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(15, 23, 42, 0.78);
}

.ranking-list {
  display: grid;
  gap: 14px;
  padding-bottom: 64px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 64px 82px 1fr;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.side-ranking .ranking-item {
  grid-template-columns: 42px 1fr;
}

.side-ranking .ranking-poster {
  display: none;
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  font-weight: 950;
}

.ranking-poster {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 2 / 3;
}

.ranking-poster img {
  height: 100%;
}

.ranking-title {
  color: #fff;
  font-weight: 950;
}

.ranking-body p {
  display: -webkit-box;
  margin: 6px 0 10px;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ranking-meta span,
.ranking-meta a {
  border-radius: 999px;
  padding: 4px 9px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.55);
  font-size: 0.76rem;
}

.horizontal-scroller {
  display: grid;
  grid-auto-columns: 190px;
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
}

.horizontal-scroller .movie-card {
  scroll-snap-align: start;
}

.page-hero {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 48px;
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 68, 68, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow-lg);
}

.slim-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 1.04rem;
  line-height: 1.8;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.78);
}

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

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 42px;
  padding: 0 14px;
}

.filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.filter-count {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-overview-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
}

.category-overview-poster img {
  height: 100%;
}

.category-overview-body span {
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 900;
}

.category-overview-body h2 {
  margin: 8px 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 950;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--soft);
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mini-links a {
  border-radius: 999px;
  padding: 5px 10px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.55);
  font-size: 0.78rem;
}

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

.breadcrumb a {
  color: #fca5a5;
}

.player-section {
  margin-bottom: 30px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(239, 68, 68, 0.28), transparent 24rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-overlay .play-icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.32);
  font-size: 2rem;
}

.player-overlay strong,
.player-overlay em {
  display: block;
  text-align: center;
}

.player-overlay strong {
  margin-top: -100px;
  font-size: 1.15rem;
}

.player-overlay em {
  margin-top: -150px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 0.86rem;
}

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

.detail-poster {
  position: sticky;
  top: 94px;
}

.detail-poster img {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3;
}

.full-width {
  width: 100%;
  margin-top: 16px;
}

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

.detail-content h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 24px;
  color: #dbe4f0;
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.detail-meta-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.32);
}

.detail-meta-grid .wide {
  grid-column: 1 / -1;
}

.detail-meta-grid dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.detail-meta-grid dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 850;
}

.detail-meta-grid a {
  color: #fca5a5;
}

.detail-tags {
  margin-bottom: 22px;
}

.article-section {
  margin-top: 26px;
}

.article-section h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.28rem;
  font-weight: 950;
}

.article-section p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.95;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.footer-copy {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-links strong {
  color: #fff;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1100px) {
  .nav-shell {
    grid-template-columns: auto auto;
  }

  .mobile-menu-toggle {
    display: block;
    justify-self: end;
  }

  .nav-links,
  .nav-search {
    display: none;
  }

  .site-header.menu-open .nav-shell {
    grid-template-columns: auto auto;
    padding: 12px 0;
  }

  .site-header.menu-open .nav-links,
  .site-header.menu-open .nav-search {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-header.menu-open .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

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

  .side-ranking,
  .detail-poster {
    position: static;
  }

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

@media (max-width: 760px) {
  .hero-slider {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 84px;
  }

  .hero-control {
    display: none;
  }

  .featured-grid,
  .movie-grid,
  .small-grid,
  .category-tile-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-grid,
  .footer-inner,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-content {
    padding: 24px;
  }

  .ranking-item {
    grid-template-columns: 46px 1fr;
  }

  .ranking-poster {
    display: none;
  }
}

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

  .horizontal-scroller {
    grid-auto-columns: 78%;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
}
