
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.86);
  --card-solid: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --accent: #38bdf8;
  --accent-deep: #2563eb;
  --pink: #f472b6;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.32);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.22s ease;
}

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

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

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

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

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
}

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

.hero-slider {
  position: relative;
  height: min(760px, 76vh);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
}

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

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

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 45%, rgba(2, 6, 23, 0.55) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1240px) / 2));
  bottom: 86px;
  width: min(680px, calc(100% - 48px));
}

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

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

.hero-content p,
.page-hero p,
.detail-one-line {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.ghost-btn,
.section-more {
  border: 1px solid var(--line);
  color: white;
  background: rgba(15, 23, 42, 0.54);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100% - 1240px) / 2));
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.content-section,
.category-preview {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.intro-section {
  padding-top: 72px;
}

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

.intro-grid > div,
.rank-mini,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.intro-grid > div:first-child,
.text-panel {
  padding: 34px;
}

.intro-grid h2,
.section-head h2,
.text-panel h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.intro-grid p,
.section-head p,
.text-panel p {
  color: var(--muted);
  line-height: 1.85;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.quick-links a {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.32);
}

.quick-links a:hover {
  color: white;
  border-color: rgba(56, 189, 248, 0.48);
}

.rank-mini {
  padding: 18px;
}

.rank-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
}

.rank-mini-head span {
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.rank-mini-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
}

.rank-mini-item:hover {
  background: rgba(56, 189, 248, 0.1);
  color: white;
}

.rank-mini-item span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
  font-weight: 800;
}

.rank-mini-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-mini-item em {
  color: var(--muted-2);
  font-style: normal;
}

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

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-solid);
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.45s ease;
}

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

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.category-name,
.category-card small {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-name {
  bottom: 62px;
  font-size: 22px;
  font-weight: 900;
}

.category-card small {
  bottom: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(56, 189, 248, 0.7);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.5);
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: block;
  min-height: 48px;
  color: white;
  font-weight: 900;
  line-height: 1.45;
}

.movie-card-body p {
  min-height: 66px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

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

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

.compact .movie-title {
  min-height: 44px;
}

.page-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  min-height: 360px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.3), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.76));
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 300px;
  padding: 42px;
}

.category-hero {
  grid-template-columns: 0.42fr 0.58fr;
  gap: 28px;
  padding: 24px;
}

.category-hero > img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 24px;
}

.detail-hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-inner {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 44px;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

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

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

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

.detail-info {
  padding-bottom: 12px;
}

.large-tags span {
  font-size: 14px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
  font-size: 28px;
}

.text-panel p {
  font-size: 16px;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-row a {
  display: grid;
  grid-template-columns: 54px 58px minmax(160px, 1fr) 80px minmax(180px, 0.7fr) 90px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
}

.rank-row a:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: white;
}

.rank-row img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.13);
  font-weight: 900;
}

.rank-row strong {
  color: white;
}

.rank-row em {
  font-style: normal;
}

.rank-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row b {
  justify-self: end;
  color: var(--accent);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: white;
  font-size: 20px;
}

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

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

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

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

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

  .intro-grid,
  .detail-content,
  .category-hero {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .rank-row a {
    grid-template-columns: 44px 52px minmax(140px, 1fr) 70px;
  }

  .rank-row small,
  .rank-row b {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

  .hero-slider {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    bottom: 82px;
  }

  .hero-actions,
  .section-head,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .content-section,
  .category-preview {
    padding: 38px 0;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .detail-inner {
    padding-bottom: 44px;
  }

  .slim-hero {
    padding: 28px;
  }

  .rank-row a {
    grid-template-columns: 38px 48px minmax(0, 1fr);
  }

  .rank-row em {
    display: none;
  }
}
