:root {
  --site-bg: #f8fafc;
  --site-ink: #0f172a;
  --site-muted: #64748b;
  --site-primary: #0284c7;
  --site-primary-dark: #0369a1;
  --site-accent: #f59e0b;
  --site-card: #ffffff;
  --site-line: #e2e8f0;
  --site-dark: #020617;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--site-ink);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
  box-shadow: 0 15px 30px rgba(2, 132, 199, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.68rem 0.95rem;
  border-radius: 0.8rem;
  color: #334155;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--site-primary-dark);
  background: #f0f9ff;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.filter-input {
  width: 17rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.95rem;
  padding: 0.78rem 1rem;
  outline: none;
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-input:focus {
  border-color: var(--site-primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 0.75rem;
  padding: 0.72rem 0.85rem;
  font-size: 1.2rem;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  padding: 1rem;
}

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

.mobile-panel a {
  display: block;
  padding: 0.8rem 0.6rem;
  border-radius: 0.7rem;
  font-weight: 650;
}

.mobile-panel a:hover {
  background: #f1f5f9;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.75s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.1));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 80rem;
  min-height: 72vh;
  margin: 0 auto;
  padding: 8rem 1rem 6rem;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  max-width: 48rem;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: #fbbf24;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2.75rem);
  letter-spacing: -0.03em;
}

.hero-copy p {
  max-width: 42rem;
  margin: 0 0 1.35rem;
  color: #e2e8f0;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.tag-row span,
.meta-pill {
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  border-radius: 0.9rem;
  padding: 0.72rem 1.25rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--site-primary);
  color: #fff;
  box-shadow: 0 16px 32px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  background: var(--site-primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: #0f172a;
}

.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.btn-light {
  background: #f8fafc;
  color: #0f172a;
}

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

.hero-dots button {
  width: 2rem;
  height: 0.32rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 3.3rem;
  background: #fff;
}

.page-section,
.page-hero,
.detail-shell {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.page-hero {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2,
.page-hero h1,
.content-block h2 {
  margin: 0;
  letter-spacing: -0.035em;
  color: #0f172a;
}

.section-head h2,
.content-block h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 4rem);
}

.section-head p,
.page-hero p {
  max-width: 48rem;
  margin: 0.65rem 0 0;
  color: var(--site-muted);
  line-height: 1.8;
}

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

.movie-card,
.category-card,
.rank-card,
.content-block,
.player-card {
  background: var(--site-card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.movie-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}

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

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

.movie-badge,
.movie-year {
  position: absolute;
  top: 0.75rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-badge {
  left: 0.75rem;
  background: rgba(2, 132, 199, 0.88);
}

.movie-year {
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.72);
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta {
  color: var(--site-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.movie-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0 0 0.9rem;
  color: #64748b;
  line-height: 1.7;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
  backdrop-filter: none;
}

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

.category-card {
  padding: 1.25rem;
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.category-mini-posters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.category-mini-posters img {
  height: 4.2rem;
  width: 100%;
  object-fit: cover;
  border-radius: 0.7rem;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 4.5rem 8rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
}

.rank-number {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--site-accent);
  text-align: center;
}

.rank-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.95rem;
  background: #0f172a;
}

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

.rank-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.rank-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.filter-input {
  width: min(100%, 28rem);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(2, 132, 199, 0.16), transparent 36%), linear-gradient(135deg, #020617, #0f172a);
  color: #fff;
}

.detail-hero-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: grid;
  grid-template-columns: minmax(16rem, 27rem) 1fr;
  gap: 2.25rem;
  align-items: center;
}

.detail-cover {
  aspect-ratio: 4 / 3;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  background: #0f172a;
}

.detail-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-copy p {
  color: #cbd5e1;
  font-size: 1.12rem;
  line-height: 1.85;
  margin: 0 0 1.25rem;
}

.detail-copy .meta-pill {
  background: rgba(255, 255, 255, 0.13);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.5rem;
}

.main-column {
  min-width: 0;
}

.sidebar-column {
  min-width: 0;
}

.player-card {
  margin-bottom: 1.5rem;
}

.player-card h2,
.content-block h2 {
  padding: 1.25rem 1.25rem 0;
}

.player-frame {
  position: relative;
  margin: 1.25rem;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-icon {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  position: relative;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 2.05rem;
  top: 1.55rem;
  width: 0;
  height: 0;
  border-top: 1.05rem solid transparent;
  border-bottom: 1.05rem solid transparent;
  border-left: 1.55rem solid var(--site-primary);
}

.content-block {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.content-block p {
  margin: 0;
  padding: 0.9rem 1.25rem 0;
  color: #475569;
  line-height: 1.9;
  font-size: 1.02rem;
}

.side-stack {
  display: grid;
  gap: 1rem;
}

.side-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.side-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.8rem;
  background: #0f172a;
}

.side-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.breadcrumb {
  font-size: 0.92rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

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

.search-results {
  min-height: 18rem;
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: #64748b;
}

.site-footer {
  margin-top: 2rem;
  background: #020617;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner strong {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

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

  .detail-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-column .side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-links,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

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

  .rank-card {
    grid-template-columns: 3.5rem 6rem 1fr;
  }

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

@media (max-width: 560px) {
  .hero-content {
    padding-top: 6rem;
    padding-bottom: 5rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-light {
    width: 100%;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .sidebar-column .side-stack {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 3rem 5.5rem 1fr;
  }

  .page-section,
  .page-hero,
  .detail-shell {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}
