:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.18);
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 28rem), linear-gradient(180deg, #0f172a 0%, #020617 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  position: relative;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 0 32px rgba(59, 130, 246, 0.45);
}

.brand-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color 0.25s ease;
}

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

.nav-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.icon-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 20px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.icon-button:hover {
  border-color: rgba(59, 130, 246, 0.65);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
}

.header-search,
.mobile-menu {
  display: none;
  grid-column: 1 / -1;
  padding: 0 0 18px;
}

.header-search.open,
.mobile-menu.open {
  display: block;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

.search-input,
.hero-search input,
.page-filter,
.page-select,
.genre-select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.75);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
}

.search-input:focus,
.hero-search input:focus,
.page-filter:focus,
.page-select:focus,
.genre-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  min-height: 720px;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
  padding: 96px max(28px, calc((100vw - 1280px) / 2 + 22px)) 130px;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.42) saturate(1.2);
  transform: scale(1.08);
  z-index: -2;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.74) 52%, rgba(2, 6, 23, 0.44) 100%);
  z-index: -1;
}

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

.hero-kicker,
.eyebrow {
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 13px;
  margin: 0 0 14px;
}

.hero-content h1,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
}

.hero-content p,
.page-hero p,
.section-head p,
.card-desc,
.ranking-info p,
.category-card p,
.story-block p,
.lead-text {
  color: var(--muted);
  line-height: 1.75;
}

.hero-content p {
  max-width: 660px;
  font-size: 18px;
}

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

.primary-button,
.ghost-button,
.section-link,
.text-link,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.primary-button,
.hero-search button {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #ffffff;
  border: 0;
  cursor: pointer;
}

.ghost-button,
.section-link,
.text-link {
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.46);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.text-link:hover,
.hero-search button:hover {
  transform: translateY(-2px);
}

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

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

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

.hero-dot {
  width: 38px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: #60a5fa;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 6;
  width: min(760px, calc(100% - 44px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
  border-radius: 22px;
}

.quick-entry {
  max-width: 1280px;
  margin: 26px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quick-entry a {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.86));
  border-radius: 20px;
  padding: 22px;
  font-weight: 800;
  text-align: center;
  color: #dbeafe;
}

.content-section,
.ranking-section,
.category-list,
.toolbar-section,
.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 22px;
}

.section-dark {
  max-width: none;
  padding-left: max(22px, calc((100vw - 1280px) / 2 + 22px));
  padding-right: max(22px, calc((100vw - 1280px) / 2 + 22px));
  background: rgba(15, 23, 42, 0.45);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
}

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

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

.movie-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 32px 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(59, 130, 246, 0.65);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32);
}

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

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(234, 88, 12, 0.94);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.ranking-info h3 a:hover,
.category-card h2 a:hover {
  color: #93c5fd;
}

.card-desc {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.tag-row span,
.genre-row span {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 12px;
  padding: 5px 8px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #0f172a;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.9) 100%);
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: #cbd5e1;
  margin-top: 8px;
  line-height: 1.55;
}

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

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 22px 54px;
}

.compact-hero,
.ranking-hero {
  min-height: 320px;
  display: grid;
  align-items: center;
}

.compact-hero > div,
.ranking-hero > div {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.82));
  border-radius: 30px;
  padding: clamp(30px, 5vw, 56px);
  box-shadow: var(--shadow);
}

.small-actions {
  margin-top: 20px;
}

.category-list {
  display: grid;
  gap: 22px;
}

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  padding: 18px;
}

.category-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-card h2 {
  margin: 6px 0 8px;
}

.category-sample {
  color: #cbd5e1;
}

.toolbar-section {
  padding-top: 24px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

.toolbar-section:not(.search-toolbar) {
  grid-template-columns: 1fr 180px;
}

.page-grid-section {
  padding-top: 34px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 70px 82px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
}

.ranking-rank {
  font-size: 26px;
  font-weight: 900;
  color: #60a5fa;
}

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

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

.ranking-info h3 {
  margin: 0 0 8px;
}

.ranking-info p {
  margin: 0 0 8px;
}

.heat-index {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: #bfdbfe;
  font-weight: 900;
}

.detail-shell {
  padding-top: 34px;
}

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

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

.player-card {
  border: 1px solid var(--line);
  background: #000000;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  display: grid;
  place-items: center;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 34px;
  box-shadow: 0 0 46px rgba(59, 130, 246, 0.52);
  padding-left: 5px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  margin-top: 34px;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  height: max-content;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-content {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  padding: clamp(24px, 4vw, 40px);
}

.lead-text {
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

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

.story-block {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}

.story-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.info-table dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.info-table dl div {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 14px;
  padding: 14px;
}

.info-table dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.info-table dd {
  margin: 0;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  color: var(--muted);
}

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

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

.no-result {
  grid-column: 1 / -1;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 20px;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr 280px;
  }
}

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

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

  .nav-shell {
    grid-template-columns: auto auto;
  }

  .hero-carousel,
  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 84px;
    padding-bottom: 160px;
  }

  .hero-poster {
    width: min(240px, 58vw);
    justify-self: start;
  }

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

  .quick-entry {
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .toolbar-section,
  .toolbar-section:not(.search-toolbar) {
    grid-template-columns: 1fr;
  }

  .category-card,
  .detail-grid,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .category-cover {
    aspect-ratio: 16 / 9;
  }

  .ranking-cover {
    width: 98px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .brand-text {
    font-size: 17px;
  }

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

  .content-section,
  .ranking-section,
  .category-list,
  .toolbar-section,
  .detail-shell,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .info-table dl {
    grid-template-columns: 1fr;
  }
}
