:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --cyan: #22d3ee;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.22),
      transparent 34rem
    ),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

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

main {
  overflow: hidden;
}

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

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 999px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.header-search {
  width: 250px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.header-search input,
.wide-search input,
.inline-filter input {
  width: 100%;
  min-width: 0;
  background: transparent;
  outline: none;
  color: #fff;
}

.header-search input::placeholder,
.wide-search input::placeholder,
.inline-filter input::placeholder {
  color: rgba(203, 213, 225, 0.72);
}

.header-search button,
.wide-search button,
.inline-filter button {
  flex: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: #fff;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hero-shell {
  position: relative;
  max-width: 1240px;
  min-height: 620px;
  margin: 0 auto;
  padding: 54px 20px 26px;
}

.hero-glow {
  position: absolute;
  inset: 42px 20px 40px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(34, 211, 238, 0.08)),
    radial-gradient(
      circle at 82% 24%,
      rgba(96, 165, 250, 0.35),
      transparent 24rem
    );
  box-shadow: var(--shadow);
  pointer-events: none;
}

.hero-stage {
  position: relative;
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.92),
    rgba(30, 58, 138, 0.62)
  );
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.62fr);
  align-items: center;
  gap: 42px;
  padding: 58px;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
  pointer-events: none;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.38)),
    radial-gradient(
      circle at 72% 52%,
      rgba(96, 165, 250, 0.22),
      transparent 28rem
    );
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(28px, 4.5vw, 54px);
}

.hero-copy p,
.page-hero p,
.quick-search-panel p,
.section-heading p,
.category-overview-head p {
  color: var(--muted);
  line-height: 1.85;
}

.hero-copy p {
  max-width: 720px;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.ranking-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.25s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.34);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 18px;
  color: #e2e8f0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.ranking-play:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.hero-poster {
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 800;
}

.hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: -56px;
}

.hero-dots button {
  width: 36px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: all 0.25s ease;
}

.hero-dots button.active {
  width: 58px;
  background: #fff;
}

.quick-search-panel,
.content-section,
.page-main,
.page-hero,
.player-section,
.prose-section,
.detail-hero,
.category-overview-block,
.ranking-section {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.6fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.category-overview-head h2,
.ranking-section h2,
.prose-section h2,
.player-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.wide-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.45);
}

.wide-search button,
.inline-filter button {
  min-height: 44px;
  padding: 0 20px;
}

.content-section,
.category-overview-block,
.ranking-section,
.player-section,
.prose-section {
  padding: 46px 20px;
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-more {
  min-height: 40px;
  padding: 0 16px;
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(37, 99, 235, 0.14);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e40af);
}

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

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

.cover-badge,
.cover-year {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.cover-badge {
  left: 10px;
}

.cover-year {
  right: 10px;
}

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

.movie-title {
  display: block;
  min-height: 44px;
  color: #fff;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

.movie-card-body p {
  margin: 8px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 42px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}

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

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 900;
}

.rank-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-num {
  color: #93c5fd;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-weight: 700;
}

.rank-meta {
  color: var(--soft);
  font-size: 12px;
}

.page-main {
  padding: 28px 20px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 auto 20px;
  color: var(--soft);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.breadcrumb em {
  font-style: normal;
  color: #fff;
}

.page-hero {
  padding: 46px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 64, 175, 0.5)),
    radial-gradient(
      circle at right,
      rgba(34, 211, 238, 0.22),
      transparent 28rem
    );
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 780px;
  font-size: 17px;
}

.category-hero .inline-filter,
.search-page-form {
  max-width: 680px;
  margin-top: 24px;
}

.category-overview-block {
  border-top: 1px solid var(--line);
}

.ranking-section {
  border-top: 1px solid var(--line);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 48px 82px minmax(0, 1fr) 86px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.ranking-index {
  color: #93c5fd;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-thumb {
  overflow: hidden;
  border-radius: 14px;
}

.ranking-thumb img {
  width: 82px;
  height: 112px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.ranking-title {
  display: inline-block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.ranking-row p {
  color: var(--soft);
  line-height: 1.7;
}

.ranking-play {
  min-height: 38px;
  color: #fff;
  background: rgba(37, 99, 235, 0.78);
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.42)),
    radial-gradient(
      circle at 86% 20%,
      rgba(96, 165, 250, 0.24),
      transparent 24rem
    );
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.detail-lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #dbeafe;
}

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

.video-frame {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72)),
    radial-gradient(circle, rgba(37, 99, 235, 0.2), transparent 20rem);
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
  font-size: 32px;
}

.player-overlay strong {
  font-size: 20px;
}

.prose-section {
  color: var(--muted);
  line-height: 1.95;
  border-top: 1px solid var(--line);
}

.prose-section h2 {
  margin: 18px 0 10px;
  color: #fff;
}

.prose-section p {
  margin: 0 0 18px;
  font-size: 16px;
}

.empty-state {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  text-align: center;
}

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

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  color: var(--soft);
}

.footer-inner strong {
  color: #fff;
  font-size: 18px;
}

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

.footer-links a {
  color: #dbeafe;
}

.copyright {
  grid-column: 1 / -1;
  color: #64748b;
}

[hidden] {
  display: none !important;
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .hero-shell {
    min-height: auto;
    padding-top: 30px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px;
  }

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

  .hero-dots {
    margin-top: -42px;
  }

  .quick-search-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .ranking-row {
    grid-template-columns: 38px 70px minmax(0, 1fr);
  }

  .ranking-play {
    grid-column: 2 / -1;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 14px;
  }

  .brand-name {
    font-size: 18px;
  }

  .mobile-nav.open {
    grid-template-columns: 1fr;
  }

  .hero-shell,
  .page-main,
  .content-section,
  .category-overview-block,
  .ranking-section,
  .player-section,
  .prose-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-stage {
    min-height: 730px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

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

  .quick-search-panel,
  .page-hero,
  .detail-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .wide-search,
  .inline-filter {
    border-radius: 22px;
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .movie-title {
    min-height: auto;
  }

  .section-heading,
  .category-overview-head {
    align-items: start;
    flex-direction: column;
  }

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

  .ranking-row {
    grid-template-columns: 34px 64px minmax(0, 1fr);
    gap: 10px;
  }

  .ranking-thumb img {
    width: 64px;
    height: 90px;
  }
}
