:root {
  color-scheme: dark;
  --page: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(239, 68, 68, 0.5);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-soft: rgba(239, 68, 68, 0.15);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 30rem),
    var(--page);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

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

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

.site-logo-mark,
.footer-logo span {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.45);
}

.site-logo-text {
  font-size: 20px;
  white-space: nowrap;
}

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

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

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

.header-search,
.mobile-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.page-search input,
.filter-input,
.filter-select {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 14px;
}

.header-search button,
.mobile-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.page-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

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

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.mobile-search input {
  flex: 1;
  padding: 12px 14px;
}

.mobile-nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.52);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 600px;
  margin-top: 72px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.22));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  max-width: 1280px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.88);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.24);
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.ghost-button,
.section-link {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.48);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.ghost-button:hover,
.section-link:hover {
  border-color: var(--line-strong);
  background: rgba(239, 68, 68, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.8);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--accent);
}

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

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

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.52);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.82);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08));
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 38px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
}

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

.movie-meta {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
}

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

.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 5px 9px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-width: none;
}

.horizontal-scroller::-webkit-scrollbar {
  display: none;
}

.scroll-card {
  width: 310px;
  flex: 0 0 auto;
}

.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: 132px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.12), transparent),
    rgba(15, 23, 42, 0.58);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile span,
.category-overview-card p {
  color: var(--soft);
  line-height: 1.7;
}

.category-overview-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-cover-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.mini-cover-row img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.split-section,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.feature-panel,
.detail-content,
.detail-side,
.player-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: var(--shadow);
}

.feature-panel,
.detail-content,
.detail-side {
  padding: 28px;
}

.alt-panel {
  background: rgba(30, 41, 59, 0.42);
}

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

.small-movie {
  display: grid;
  grid-template-columns: auto 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--soft);
}

.small-movie img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.small-movie strong {
  display: block;
  color: #ffffff;
  line-height: 1.4;
}

.small-movie em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.list-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fecaca;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(30px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.17), transparent 45%),
    linear-gradient(225deg, rgba(59, 130, 246, 0.12), transparent 48%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.category-hero,
.rank-hero {
  min-height: 310px;
}

.filter-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.52);
}

.filter-input {
  flex: 1;
  min-width: 180px;
  padding: 13px 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 13px 36px 13px 16px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 32px;
  align-items: end;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.detail-tags {
  margin-top: 20px;
}

.player-card {
  position: relative;
  margin-top: 28px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.28), rgba(2, 6, 23, 0.68));
  color: #ffffff;
}

.play-mask span {
  width: 86px;
  height: 86px;
  margin: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  font-size: 34px;
  box-shadow: 0 0 60px rgba(239, 68, 68, 0.46);
}

.detail-grid {
  margin-top: 28px;
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.95;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px 18px;
  margin: 0 0 24px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: #ffffff;
}

.wide-button {
  width: 100%;
}

.page-search {
  width: min(720px, 100%);
  margin-top: 24px;
}

.page-search input {
  flex: 1;
  padding: 16px 18px;
}

.no-result {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.54);
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

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

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

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

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

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

@media (max-width: 820px) {
  .hero {
    height: 520px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid.four-cols,
  .movie-grid.three-cols,
  .split-section,
  .detail-grid,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .filter-panel,
  .filter-selects {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    width: min(100% - 20px, 1280px);
  }

  .site-logo-text {
    font-size: 17px;
  }

  .hero {
    height: 500px;
  }

  .content-section,
  .page-main {
    width: min(100% - 20px, 1280px);
  }

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

  .section-heading {
    display: block;
  }

  .section-link {
    margin-top: 14px;
  }

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

  .small-movie {
    grid-template-columns: auto 88px minmax(0, 1fr);
  }

  .small-movie img {
    width: 88px;
    height: 58px;
  }

  .page-hero,
  .detail-hero,
  .feature-panel,
  .detail-content,
  .detail-side {
    padding: 22px;
    border-radius: 22px;
  }

  .play-mask span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
