* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #d97706;
  --brand-dark: #92400e;
  --brand-soft: #fffbeb;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1f2937;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 20px rgba(217, 119, 6, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.nav-links button,
.mobile-nav a {
  border: 0;
  font: inherit;
  color: #374151;
  background: transparent;
  border-radius: 999px;
  padding: 9px 13px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links button:hover,
.mobile-nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

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

.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  color: var(--brand);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.search-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 22px 20px;
}

.search-box {
  position: relative;
}

.search-input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  background: #ffffff;
  color: #111827;
  outline: none;
  padding: 13px 15px;
  font-size: 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.search-suggestions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.search-suggestions a {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-suggestions a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 8px 16px 16px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-position: center;
  background-size: cover;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18));
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 82px 22px 110px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.36);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

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

.hero-meta span,
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(217, 119, 6, 0.36);
}

.button.secondary {
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

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

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

.hero-dot.is-active {
  background: #fbbf24;
}

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 22px 0;
}

.section.compact {
  padding-top: 36px;
}

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

.section-kicker {
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-desc,
.page-title p,
.detail-intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

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

.movie-card,
.category-card,
.rank-card,
.info-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111827;
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  padding: 42px 14px 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.76));
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

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

.category-card {
  padding: 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card h2 {
  margin: 0;
  font-size: 25px;
}

.category-card p {
  color: var(--muted);
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px 18px 12px 12px;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  width: 96px;
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0;
  font-size: 19px;
}

.rank-card p {
  margin: 5px 0 0;
  color: var(--muted);
}

.page-hero {
  background: linear-gradient(135deg, #fff7ed, #ffffff 48%, #fef3c7);
  border-bottom: 1px solid var(--line);
}

.page-title {
  max-width: 1240px;
  margin: 0 auto;
  padding: 62px 22px 54px;
}

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

.breadcrumb a {
  color: var(--brand);
  font-weight: 700;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.32));
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), var(--bg));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 22px 74px;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  color: #ffffff;
}

.detail-intro {
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 22px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-card {
  border-radius: 24px;
  overflow: hidden;
  background: #050505;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.movie-play-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  font-size: 30px;
}

.movie-play-button span:last-child {
  font-weight: 800;
}

.player-shell.is-playing .movie-play-button {
  display: none;
}

.content-panel {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.content-panel h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.content-panel p {
  margin: 0;
  color: #374151;
}

.content-panel p + p {
  margin-top: 14px;
}

.sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.info-panel {
  padding: 20px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 14px;
  font-size: 21px;
}

.info-list {
  display: grid;
  gap: 10px;
  color: #374151;
}

.info-list strong {
  color: #111827;
}

.related-mini {
  display: grid;
  gap: 12px;
}

.related-mini a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.related-mini img {
  width: 72px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.related-mini strong {
  display: block;
  line-height: 1.35;
}

.related-mini span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-inner p,
.footer-inner a {
  color: #d1d5db;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.copyright {
  border-top: 1px solid #1f2937;
  padding: 18px 22px;
  text-align: center;
  color: #9ca3af;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  text-align: center;
}

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

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

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

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

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

  .menu-toggle {
    display: inline-block;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

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

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

  .detail-wrap {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .rank-card {
    grid-template-columns: 48px 78px 1fr;
  }

  .rank-card .button {
    grid-column: 1 / -1;
  }

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

  .search-suggestions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .logo {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-content {
    padding: 64px 16px 100px;
  }

  .section,
  .page-title,
  .detail-main,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .section-head {
    display: block;
  }
}
