:root {
  --bg: #020617;
  --bg-soft: #07132c;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.18);
  --blue: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.18);
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  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(37, 99, 235, 0.22), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0b1736 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 0 34px rgba(251, 191, 36, 0.34);
}

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

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

.desktop-nav a,
.mobile-nav a,
.quick-links a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 14px;
  border-radius: 999px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.quick-links a:hover,
.footer-links a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.04);
}

.hero-shade,
.detail-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.84) 48%, rgba(2, 6, 23, 0.76) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%, #020617 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

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

.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(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
}

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

.btn-primary,
.btn-ghost,
.home-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
}

.btn-primary,
.home-search button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 36px rgba(249, 115, 22, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
}

.hero-poster {
  position: relative;
  z-index: 2;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.18), rgba(251, 191, 36, 0.18));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

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

.home-search-band,
.content-block,
.filter-panel,
.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 12;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.58);
  outline: none;
  padding: 0 16px;
}

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

.quick-links a {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.content-block,
.filter-panel,
.player-section {
  padding: 72px 0 0;
}

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

.section-head h2 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 760px;
  color: var(--subtle);
  line-height: 1.8;
}

.section-link,
.text-link {
  color: var(--amber);
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.7), rgba(15, 23, 42, 0.86));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
  padding: 24px;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.88));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  display: block;
  margin-top: 72px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-card:hover img,
.movie-card:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.poster-link,
.rank-poster,
.detail-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(251, 191, 36, 0.12));
}

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-title,
.rank-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 44px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  margin: 8px 0;
  color: var(--amber);
  font-size: 13px;
}

.movie-card p,
.rank-content p {
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-row span {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
}

.highlight-block {
  position: relative;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 86px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: var(--panel);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 1000;
}

.rank-poster {
  border-radius: 16px;
}

.rank-poster img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px max(16px, calc((100% - 1240px) / 2)) 76px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 64, 175, 0.62));
}

.small-hero h1,
.category-hero h1 {
  max-width: 920px;
}

.hero-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-inline-links a,
.feature-link-grid a {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

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

.feature-link-grid a {
  min-height: 92px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 18px;
  font-weight: 900;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(160px, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: var(--panel);
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 54px;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.detail-cover {
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  margin-bottom: 12px;
}

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

.big-tags span {
  font-size: 13px;
  padding: 6px 12px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
}

.player-mask.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.32);
}

.player-mask strong {
  font-size: 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.text-panel,
.side-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: var(--panel);
}

.text-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel h2:not(:first-child) {
  margin-top: 30px;
}

.text-panel p {
  color: var(--muted);
  line-height: 2;
  font-size: 16px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-panel dt {
  color: var(--subtle);
}

.side-panel dd {
  margin: 0;
  color: #ffffff;
}

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

.site-footer {
  margin-top: 88px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
}

.footer-inner p {
  max-width: 640px;
  color: var(--subtle);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 520px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--subtle);
}

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

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

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

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

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

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-slider {
    height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
  }

  .hero-poster {
    width: 180px;
    justify-self: start;
  }

  .home-search-band,
  .home-search,
  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

  .home-search {
    display: grid;
  }

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

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

  .rank-item {
    grid-template-columns: 46px 70px minmax(0, 1fr);
  }

  .rank-item .text-link {
    grid-column: 3;
    justify-self: start;
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

  .rank-poster img {
    width: 70px;
  }

  .detail-wrap,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: 220px;
  }

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

@media (max-width: 520px) {
  .nav-inner {
    height: 62px;
  }

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

  .hero-slider {
    height: 760px;
  }

  .hero-control {
    display: none;
  }

  .category-grid,
  .large-category-grid,
  .feature-link-grid,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding-top: 72px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-info h1 {
    letter-spacing: -0.045em;
  }
}
