* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f1f5f9;
  --line: #e5e7eb;
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --accent: #ea580c;
  --gold: #f59e0b;
  --night: #111827;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.32);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--brand);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-panel input,
.quick-search input {
  width: 230px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.quick-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button,
.quick-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  color: var(--ink);
  cursor: pointer;
}

.mobile-panel {
  padding: 16px 24px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.mobile-search {
  display: flex;
  gap: 10px;
}

.mobile-search input {
  width: 100%;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: var(--night);
}

.hero-slide {
  position: absolute;
  inset: 0;
  padding: 86px 24px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 1.1s ease;
}

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

.hero-content {
  width: min(680px, 100%);
  margin: 0 auto;
  max-width: 1280px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 650px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-row span,
.category-links a {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.tag-row span,
.category-links a {
  color: var(--brand-dark);
  background: #fff1f2;
  border-color: #fecdd3;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 30px;
  color: #fef3c7;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.32);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.primary-button.full {
  width: 100%;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: #fff;
}

.quick-panel {
  max-width: 1280px;
  margin: -54px auto 36px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
  z-index: 4;
}

.quick-card,
.quick-search {
  min-height: 126px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.quick-card strong,
.quick-search label {
  font-size: 20px;
  font-weight: 850;
}

.quick-card span {
  color: var(--muted);
  line-height: 1.7;
}

.link-card:hover {
  color: var(--brand);
  transform: translateY(-2px);
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-search div {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.quick-search input {
  width: 100%;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.content-section.soft-bg,
.soft-bg {
  max-width: none;
  background: #fff;
}

.content-section.soft-bg > .section-head,
.content-section.soft-bg > .movie-grid,
.content-section.soft-bg > .compact-grid,
.content-section.soft-bg > .ranking-list,
.content-section.soft-bg > .related-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.section-head a {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1f2937, #991b1b);
  overflow: hidden;
}

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

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

.poster-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.22);
}

.poster-score {
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  background: rgba(245, 158, 11, 0.95);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(220, 38, 38, 0.95);
}

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

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

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.sitemap-links a:hover {
  color: var(--brand);
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta {
  font-size: 13px;
  font-weight: 700;
}

.movie-line {
  display: -webkit-box;
  min-height: 52px;
  margin-top: 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 14px;
}

.tag-row.large span {
  font-size: 14px;
  padding: 8px 14px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: var(--soft);
  border: 1px solid #e2e8f0;
}

.compact-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-weight: 900;
}

.compact-cover {
  width: 92px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #991b1b);
}

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

.compact-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.compact-card p {
  margin: 0 0 6px;
  color: var(--muted);
  line-height: 1.6;
}

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

.category-tile,
.category-hero-link {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.category-tile span,
.category-hero-link span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong,
.category-hero-link strong {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: #fff7ed;
}

.page-hero {
  min-height: 360px;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.52), transparent 28%),
    linear-gradient(135deg, #111827, #7f1d1d 58%, #ea580c);
}

.page-hero.compact {
  min-height: 300px;
}

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

.page-hero h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.8;
}

.category-overview {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 70px;
  display: grid;
  gap: 30px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: stretch;
}

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

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

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

.movie-card.mini .movie-line,
.movie-card.mini .tag-row {
  display: none;
}

.category-links {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
}

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

.search-panel {
  display: flex;
  max-width: 680px;
  gap: 12px;
  margin-top: 26px;
}

.search-panel input {
  width: 100%;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-layout {
  max-width: 1280px;
  margin: 0 auto 56px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.38);
  font-size: 32px;
  text-indent: 5px;
}

.detail-content {
  margin-top: 28px;
  padding: 34px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-content h2,
.side-card h2,
.sitemap-block h2 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.detail-content p {
  color: #374151;
  line-height: 1.9;
  font-size: 17px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #7f1d1d;
  background: #fef2f2;
  font-weight: 750;
}

.detail-line {
  font-size: 19px;
  font-weight: 700;
}

.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.detail-poster {
  width: 100%;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #1f2937, #991b1b);
  box-shadow: var(--shadow);
}

.side-card {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.side-card h2 {
  margin-top: 0;
}

.side-card dl {
  margin: 0 0 22px;
  display: grid;
  gap: 12px;
}

.side-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.side-card dd {
  margin: -8px 0 0;
  color: var(--ink);
  line-height: 1.6;
}

.detail-related {
  padding-top: 46px;
  padding-bottom: 70px;
}

.sitemap-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 74px;
  display: grid;
  gap: 24px;
}

.sitemap-block {
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sitemap-block h2 {
  margin-top: 0;
}

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

.sitemap-links a {
  color: #374151;
  line-height: 1.5;
}

.site-footer {
  color: #d1d5db;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand p,
.footer-column a,
.footer-bottom p {
  color: #9ca3af;
  line-height: 1.75;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 24px;
  text-align: center;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .quick-panel,
  .movie-grid,
  .movie-grid.wide,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .ranking-list,
  .compact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header-inner {
    height: 64px;
    padding: 0 16px;
  }

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .site-logo-text {
    font-size: 20px;
  }

  .hero {
    height: 580px;
  }

  .hero-slide {
    padding: 72px 18px;
  }

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

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

  .quick-panel,
  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .category-preview-grid,
  .footer-inner,
  .sitemap-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-panel {
    margin-top: 24px;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .detail-layout {
    padding: 0 16px;
  }

  .detail-content {
    padding: 24px;
  }

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

@media (max-width: 560px) {
  .quick-panel,
  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .category-preview-grid,
  .footer-inner,
  .sitemap-links {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: auto 74px 1fr;
    gap: 12px;
  }

  .compact-cover {
    width: 74px;
  }

  .search-panel,
  .quick-search div,
  .mobile-search {
    flex-direction: column;
  }

  .header-search button,
  .mobile-search button,
  .search-panel button,
  .quick-search button {
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .page-hero {
    padding: 62px 18px;
  }
}
