:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --card: rgba(30, 41, 59, 0.72);
  --card-hover: rgba(30, 41, 59, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.14), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
  color: var(--soft);
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

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

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.12) contrast(1.06);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.70) 48%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%),
    radial-gradient(circle at 28% 35%, rgba(34, 211, 238, 0.28), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  padding-top: 132px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-main-card h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 20px;
}

.hero-tags,
.movie-meta-line,
.tag-row,
.hero-actions,
.category-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.movie-meta-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--soft);
  font-size: 12px;
}

.hero-mini-tags {
  margin-top: 14px;
}

.hero-actions {
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.text-link,
.global-search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-btn,
.global-search-box button {
  border: 0;
  color: #04111f;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.18);
  cursor: pointer;
}

.primary-btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.ghost-btn {
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.58);
  color: var(--text);
}

.hero-search-panel {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 58px;
  z-index: 5;
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-search-panel p,
.hero-search-panel h2 {
  margin: 0;
}

.hero-search-panel p {
  color: var(--cyan);
  font-weight: 800;
}

.hero-search-panel h2 {
  margin-top: 8px;
  font-size: 22px;
}

.hero-search-box,
.filter-bar,
.global-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-search-box {
  margin-top: 18px;
}

.hero-search-box input,
.filter-bar input,
.filter-bar select,
.global-search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  outline: none;
  background: rgba(2, 6, 23, 0.58);
  color: var(--text);
  padding: 0 16px;
}

.hero-search-box a {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 800;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 54px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.rank-panel-head h2,
.detail-main-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.text-link {
  min-height: auto;
  padding: 0;
  color: var(--cyan);
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.category-card img,
.category-card span {
  position: absolute;
  inset: 0;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

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

.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 20px;
}

.category-card em {
  margin-top: 6px;
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
}

.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.7;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
  background: var(--card-hover);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.14);
}

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

.movie-card-compact .poster-link {
  aspect-ratio: 2 / 3;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, 0.88));
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.25);
}

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

.movie-meta-line {
  gap: 6px;
}

.movie-meta-line.large span {
  min-height: 34px;
  padding-inline: 12px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-compact h3 {
  font-size: 15px;
}

.movie-card-compact p,
.movie-card-compact .tag-row {
  display: none;
}

.rank-panel,
.side-card,
.detail-main-card,
.category-overview-card,
.page-hero,
.filter-bar,
.search-results {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.rank-panel-head {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.rank-panel-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 34px 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.86);
}

.rank-number {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.rank-line img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

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

.rank-text em,
.full-rank-main em,
.full-rank-meta {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  margin-top: 36px;
  padding: 42px;
}

.simple-hero {
  min-height: 260px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover-strip img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

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

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--soft);
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: center;
}

.category-quick-links {
  margin-top: 22px;
}

.category-quick-links a {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.28);
}

.hero-poster-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.4);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-poster-card strong,
.hero-poster-card span {
  display: block;
  padding-inline: 16px;
}

.hero-poster-card strong {
  padding-top: 14px;
  font-size: 18px;
}

.hero-poster-card span {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 16px;
}

.filter-bar select {
  width: 170px;
  color: var(--text);
}

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

.full-rank-row {
  display: grid;
  grid-template-columns: 64px 66px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.full-rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(30, 41, 59, 0.78);
}

.full-rank-index {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.full-rank-row img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.full-rank-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.global-search-box {
  max-width: 720px;
  margin-top: 26px;
}

.search-results {
  padding: 22px;
}

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

.detail-shell {
  display: grid;
  gap: 22px;
}

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

.breadcrumb a {
  color: var(--cyan);
}

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

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #04111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: 34px;
  box-shadow: 0 22px 54px rgba(34, 211, 238, 0.28);
}

.player-box.is-playing .play-overlay {
  display: none;
}

.detail-main-card {
  margin-top: 22px;
  padding: 26px;
}

.detail-main-card h1 {
  margin-top: 14px;
  font-size: clamp(32px, 4vw, 54px);
}

.detail-one {
  color: var(--soft);
  font-size: 18px;
}

.detail-main-card h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 24px;
}

.detail-main-card p {
  color: var(--soft);
}

.detail-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 18px;
}

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

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

.side-card {
  padding: 18px;
}

.side-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 30px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--soft);
  font-size: 14px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 13px;
}

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 780px;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero-search-panel {
    left: 16px;
    right: 16px;
    bottom: 26px;
    width: auto;
  }

  .hero-search-box,
  .filter-bar,
  .global-search-box,
  .section-head,
  .footer-inner,
  .category-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .full-rank-row {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .full-rank-meta {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

  .hero p,
  .page-hero p {
    font-size: 16px;
  }
}
