:root {
  --page-bg: #f5f6f8;
  --card-bg: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --accent: #111827;
  --accent-soft: rgba(17, 24, 39, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f6f7f9 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-logo span,
.footer-logo {
  background: linear-gradient(135deg, #111827, #4b5563);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--accent-soft);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.hero-carousel {
  position: relative;
  height: min(76vh, 680px);
  min-height: 540px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 36%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(90deg, rgba(15,23,42,0.94), rgba(15,23,42,0.70) 44%, rgba(15,23,42,0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
}

.hero-kicker,
.section-kicker {
  margin-bottom: 14px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-carousel .hero-kicker {
  color: rgba(255, 255, 255, 0.82);
}

.hero-content h1 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.hero-summary {
  max-width: 660px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.8;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  backdrop-filter: blur(10px);
}

.movie-tags span {
  background: #f3f4f6;
  color: #4b5563;
}

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

.primary-button,
.ghost-button,
.section-more,
.search-form button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: #fff;
  color: #111827;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.20);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(12px);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button {
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-controls button.is-active {
  width: 58px;
  background: #fff;
}

.page-hero,
.search-panel,
.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.compact-hero {
  margin-top: 34px;
  padding: clamp(34px, 8vw, 86px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(17, 24, 39, 0.18), transparent 34%),
    linear-gradient(135deg, #111827, #374151);
  color: #fff;
  box-shadow: var(--shadow);
}

.compact-hero .hero-kicker,
.compact-hero p {
  color: rgba(255, 255, 255, 0.78);
}

.compact-hero h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.compact-hero p:last-child {
  max-width: 720px;
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.8;
}

.search-panel {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.compact-hero + .search-panel {
  margin-top: 24px;
}

.search-copy p {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.search-copy h2 {
  margin-top: 6px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.04em;
}

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

.search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

.search-form button,
.filter-panel button {
  border: 0;
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
}

.search-results {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.search-results.is-open {
  display: grid;
}

.search-result-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.search-result-item img {
  height: 58px;
  border-radius: 12px;
}

.search-result-item h3 {
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.section-more {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-poster img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-title {
  display: block;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-desc {
  margin: 10px 0 14px;
  min-height: 44px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile,
.category-card {
  display: block;
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile span,
.category-card h2 {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.category-tile p,
.category-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-card {
  padding: 16px;
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-poster-stack img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #e5e7eb;
}

.ranking-list,
.ranking-page-list {
  display: grid;
  gap: 12px;
}

.rank-row,
.ranking-card {
  display: grid;
  grid-template-columns: 54px 90px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover,
.ranking-card:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-index,
.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-weight: 900;
}

.rank-row img,
.ranking-card img {
  width: 90px;
  height: 68px;
  border-radius: 14px;
}

.rank-title,
.ranking-card h2 {
  font-size: 17px;
  font-weight: 850;
}

.rank-meta,
.ranking-card p {
  color: var(--muted);
  font-size: 13px;
}

.ranking-card {
  grid-template-columns: 58px 150px 1fr;
  align-items: start;
}

.ranking-card img {
  width: 150px;
  height: 96px;
}

.ranking-card p {
  margin-top: 6px;
  line-height: 1.6;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr) auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.empty-state {
  display: none;
  margin-top: 20px;
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #374151;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18), transparent 32%),
    linear-gradient(135deg, #111827, #374151);
  color: #fff;
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.detail-info .hero-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.detail-info h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.9;
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 72px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  background: #050505;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.62));
  transition: opacity 0.25s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.detail-text {
  padding-top: 68px;
}

.article-body {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.article-body p {
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.article-body p + p {
  margin-top: 18px;
}

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

.site-footer {
  margin-top: 86px;
  padding: 48px 0 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  color: #4b5563;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  color: #9ca3af;
  font-size: 13px;
}

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

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

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

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

  .menu-toggle {
    display: flex;
  }

  .hero-carousel {
    height: 620px;
    min-height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(15,23,42,0.34), rgba(15,23,42,0.94));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 96px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .search-form,
  .section-heading,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .category-grid,
  .category-card-grid,
  .search-results,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row,
  .ranking-card {
    grid-template-columns: 42px 82px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .ranking-card img,
  .rank-row img {
    width: 82px;
    height: 62px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .detail-cover {
    max-width: 280px;
  }

  .article-body {
    padding: 22px;
  }
}
