:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --violet: #6366f1;
  --pink: #f472b6;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(99, 102, 241, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

button,
input {
  font: inherit;
}

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

.header-shell {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 74px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #082f49;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(34, 211, 238, 0.28);
}

.brand-name {
  font-size: 1.25rem;
  background: linear-gradient(120deg, #f8fafc, #67e8f9 46%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: white;
  background: rgba(56, 189, 248, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.header-search input,
.mobile-search input,
.search-panel input {
  width: 240px;
  min-width: 0;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 9px 12px;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  color: white;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-button {
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28);
}

.ghost-button,
.section-more {
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  transform: translateY(-2px);
}

.primary-button.full {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: white;
  border-radius: 99px;
}

.mobile-panel {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  margin: 6px 0;
}

.hero {
  position: relative;
  height: clamp(560px, 72vh, 820px);
  overflow: hidden;
  isolation: isolate;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
  transform: scale(1.03);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.8) 36%, rgba(2, 6, 23, 0.24) 72%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100% - 40px));
  height: 100%;
  margin-left: max(20px, calc((100vw - 1480px) / 2));
  padding-top: 80px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(14, 116, 144, 0.24);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 999px;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p,
.page-hero p,
.detail-info .lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 1.6vw, 1.24rem);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: white;
  font-size: 2.2rem;
  line-height: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.32);
  border: 0;
  border-radius: 999px;
}

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

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

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

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

.section-heading h2,
.strip-title h3,
.detail-content h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.55rem, 2.8vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.category-page-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.16));
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-card-large:hover img {
  transform: scale(1.06);
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--gold);
  border-radius: 999px;
}

.card-body {
  padding: 14px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-meta span,
.detail-meta span {
  padding: 3px 8px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
}

.card-body h3 {
  margin: 10px 0 7px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.3;
}

.card-body p {
  margin: 0;
  min-height: 46px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  color: #a5f3fc;
  font-size: 0.72rem;
  background: rgba(8, 145, 178, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
}

.tag-row.large span {
  font-size: 0.86rem;
}

.movie-card.compact .card-body p {
  min-height: 36px;
}

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

.category-tile,
.category-card-large a {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 188px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.category-tile:hover img,
.category-card-large:hover img {
  opacity: 0.42;
}

.category-tile::after,
.category-card-large a::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88));
}

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

.category-tile span {
  display: block;
  margin-top: 70px;
  font-size: 1.28rem;
  font-weight: 900;
}

.category-tile p,
.category-card-large p {
  margin: 8px 0 0;
  color: #cbd5e1;
}

.category-strip {
  margin-bottom: 36px;
}

.strip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.strip-title a {
  color: var(--blue);
}

.horizontal-scroll {
  display: grid;
  grid-auto-columns: minmax(188px, 208px);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

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

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

.rank-list.large {
  grid-template-columns: 1fr;
}

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

.rank-row:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-2px);
}

.rank-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-index {
  color: var(--cyan);
  font-size: 1.4rem;
  font-weight: 900;
}

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

.rank-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: clamp(44px, 7vw, 86px);
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.2), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.72));
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.page-hero.slim h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
}

.category-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.category-card-large a {
  min-height: 250px;
}

.category-card-large h2 {
  margin: 52px 0 8px;
  font-size: 1.7rem;
}

.mini-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-title-row span {
  padding: 5px 9px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.search-panel {
  width: min(760px, 100%);
  margin-top: 28px;
}

.search-panel input {
  flex: 1;
  width: auto;
  font-size: 1.05rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-pills button {
  padding: 8px 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.empty-state {
  padding: 26px;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 28px 0 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #000;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.62));
  border: 0;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  color: #082f49;
  font-size: 2rem;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border-radius: 999px;
  box-shadow: 0 24px 60px rgba(56, 189, 248, 0.4);
}

.detail-info {
  padding: clamp(28px, 4vw, 46px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(2.1rem, 5vw, 4.3rem);
}

.detail-meta {
  margin-top: 22px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  padding: 46px 0 8px;
}

.detail-content,
.detail-side {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
}

.detail-content p {
  margin: 14px 0 30px;
  color: #dbeafe;
  font-size: 1.05rem;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 18px;
  border-radius: 22px;
}

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

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

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.footer-bottom {
  width: min(1480px, calc(100% - 40px));
  margin: 30px auto 0;
  padding-top: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

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

  .detail-side {
    max-width: 360px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 680px;
  }

  .hero-copy {
    justify-content: end;
    padding-bottom: 110px;
  }

  .hero-arrow {
    display: none;
  }

  .section-heading,
  .strip-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: auto 52px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 3;
  }

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

@media (max-width: 560px) {
  .header-shell,
  .content-section,
  .page-main,
  .detail-main,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 28px, 1480px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-copy {
    width: calc(100% - 28px);
    margin-left: 14px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.6rem;
  }

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

  .card-body {
    padding: 11px;
  }

  .card-body p {
    display: none;
  }

  .tag-row {
    display: none;
  }

  .page-hero {
    padding: 28px;
  }

  .player-card,
  .movie-video {
    min-height: 260px;
  }

  .detail-info,
  .detail-content,
  .detail-side {
    padding: 20px;
  }
}
