:root {
  color-scheme: light;
  --page: #f8fafc;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.82);
  --text: #111827;
  --muted: #6b7280;
  --subtle: #9ca3af;
  --line: rgba(209, 213, 219, 0.72);
  --dark: #111827;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 26px 70px rgba(15, 23, 42, 0.2);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f3f4f6 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.18);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.header-search {
  flex: 1;
  max-width: 440px;
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  background: rgba(249, 250, 251, 0.86);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.local-filter {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 11px 14px 11px 18px;
  font-size: 14px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  background: var(--dark);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 14px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: #f3f4f6;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: var(--text);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #374151;
  background: #f9fafb;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.mobile-search input {
  padding: 9px 12px;
}

.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 32%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(31, 41, 55, 0.78) 48%, rgba(31, 41, 55, 0.38) 100%);
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 14px;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 22px 0 16px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span {
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.hero-actions,
.filter-bar,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: var(--dark);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(255, 255, 255, 0.22);
}

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

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

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

.hero-dot.active {
  width: 28px;
  background: #ffffff;
}

.section-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.section-band {
  background: linear-gradient(180deg, #f9fafb, #ffffff);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading.center {
  flex-direction: column;
  text-align: center;
  justify-content: center;
}

.section-heading.inline-heading {
  align-items: flex-start;
}

.section-heading p,
.ranking-head p,
.page-hero p {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.ranking-head h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-more,
.text-link,
.ranking-more {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.section-more:hover,
.text-link:hover,
.ranking-more:hover {
  color: var(--rose);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.chip-grid a {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.chip-grid a:hover {
  color: var(--text);
  border-color: #9ca3af;
  transform: translateY(-2px);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(156, 163, 175, 0.72);
  box-shadow: var(--shadow);
}

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

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

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

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.type-badge {
  left: 12px;
  top: 12px;
}

.year-badge {
  right: 12px;
  bottom: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: linear-gradient(135deg, #f43f5e, #111827);
}

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

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

.movie-card h3 a:hover {
  color: var(--rose);
}

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

.movie-brief {
  min-height: 42px;
  margin: 0 0 12px;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  color: #4b5563;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 12px;
}

.movie-card.compact .movie-card-body {
  padding: 13px;
}

.movie-card.compact h3 {
  font-size: 16px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.ranking-panel,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 16px;
  background: #f9fafb;
}

.ranking-list a:hover {
  background: #f3f4f6;
}

.ranking-list span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: #111827;
  font-weight: 800;
}

.ranking-list strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.category-card span,
.category-card small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-card span {
  bottom: 62px;
  font-size: 24px;
  font-weight: 800;
}

.category-card small {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  background:
    radial-gradient(circle at 82% 28%, rgba(244, 63, 94, 0.16), transparent 25%),
    linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero span {
  display: block;
  max-width: 720px;
  margin-top: 15px;
  color: #4b5563;
  line-height: 1.8;
}

.category-overview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  overflow: hidden;
  background: #f3f4f6;
}

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

.category-overview-body {
  padding: 20px;
}

.category-overview-body h2 {
  margin: 0 0 9px;
  font-size: 22px;
}

.category-overview-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.6;
}

.filter-bar {
  margin-bottom: 24px;
}

.local-filter,
.search-page-form input {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-status {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.detail-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 0;
}

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

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

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-strong);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.52));
  cursor: pointer;
}

.video-start.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.video-start span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 30px;
  text-indent: 4px;
}

.detail-content {
  margin-top: 26px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 18px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
}

.detail-one-line {
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 26px;
}

.detail-content section {
  margin-top: 26px;
}

.detail-content h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.detail-content p {
  margin: 0 0 14px;
  color: #374151;
  line-height: 1.9;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #e5e7eb;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-list a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f9fafb;
}

.side-list a:hover {
  background: #f3f4f6;
}

.side-list img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.side-list strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-list em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

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

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-brand p {
  max-width: 620px;
  margin: 0;
  color: #4b5563;
  line-height: 1.8;
}

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

.footer-links h2 {
  width: 100%;
  margin: 0 0 4px;
  font-size: 16px;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #4b5563;
  background: #ffffff;
}

.footer-bottom {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

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

  .two-column-section,
  .watch-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .header-inner {
    height: 64px;
    gap: 12px;
  }

  .header-search,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero {
    height: 560px;
  }

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

  .hero h1,
  .hero h2 {
    font-size: 34px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions,
  .filter-bar,
  .section-heading,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .section-shell {
    padding: 46px 0;
  }

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

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

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 540px;
  }

  .hero-meta {
    display: none;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .poster-link {
    height: 100%;
    min-height: 190px;
  }

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

  .movie-brief {
    -webkit-line-clamp: 3;
  }

  .detail-content {
    padding: 22px;
  }
}
