:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --red: #ef4444;
  --red-2: #b91c1c;
  --red-soft: rgba(239, 68, 68, 0.12);
  --gold: #f59e0b;
  --radius: 18px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.28);
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

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

.brand {
  font-size: 24px;
  background: linear-gradient(90deg, #f87171, #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.35);
}

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

.nav-link,
.nav-chip {
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.25s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.nav-chip:hover {
  background: var(--red);
  color: #fff;
}

.nav-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 42px;
  height: 42px;
}

.nav-categories {
  display: flex;
  gap: 10px;
  padding: 0 0 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  overflow-x: auto;
}

.nav-chip {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
  color: #fff;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 44px;
  padding: 86px max(32px, calc((100vw - 1180px) / 2)) 150px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 0.75s ease;
  pointer-events: none;
}

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

.hero-copy {
  max-width: 700px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary,
.detail-line,
.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red-soft);
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: #fee2e2;
  box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -90px 110px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-search-card {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 16px;
  align-items: stretch;
}

.hero-search,
.filter-controls {
  display: grid;
  gap: 10px;
}

.hero-search {
  grid-template-columns: 1fr auto;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-controls input,
.filter-controls select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
}

.hero-search input {
  border: 0;
  background: rgba(255, 255, 255, 0.96);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.hero-dots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-dot {
  min-height: 58px;
  border: 0;
  border-radius: 16px;
  padding: 10px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(14px);
  transition: 0.25s ease;
}

.hero-dot span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.hero-dot.is-active,
.hero-dot:hover {
  background: var(--red);
  color: #fff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.stat-card,
.panel-card,
.rank-panel,
.content-card,
.filter-panel,
.category-card-large,
.cta-panel {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.stat-card {
  padding: 22px;
}

.stat-card span {
  color: var(--red);
  font-weight: 900;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

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

.section-block {
  margin-top: 56px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-title h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.section-title a,
.text-link {
  color: var(--red);
  font-weight: 800;
}

.compact-title h2 {
  font-size: 24px;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

.all-grid,
.ranking-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 26px 0 60px;
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  right: 10px;
  padding: 4px 8px;
  background: rgba(239, 68, 68, 0.92);
}

.rank-badge {
  left: 10px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: rgba(245, 158, 11, 0.94);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.1em;
  font-size: 16px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.panel-card,
.rank-panel {
  padding: 22px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  transition: 0.25s ease;
}

.rank-list a:hover {
  background: var(--red-soft);
}

.rank-list span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

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

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

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 18px;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 6px;
  color: #fee2e2;
  font-size: 13px;
}

.cta-panel {
  margin: 60px auto;
  padding: 38px;
  text-align: center;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
}

.cta-panel h2 {
  margin: 0;
  font-size: 34px;
}

.cta-panel p {
  max-width: 700px;
  margin: 12px auto 24px;
  color: #fee2e2;
}

.page-hero,
.detail-hero {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #991b1b);
  background-size: cover;
  background-position: center;
}

.page-hero {
  padding: 86px 0;
}

.compact-hero {
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 840px;
}

.filter-panel {
  margin-top: -34px;
  padding: 22px;
  position: relative;
  z-index: 3;
}

.filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 16px;
}

.filter-heading h2 {
  margin: 0;
  font-size: 24px;
}

.filter-heading p {
  margin: 0;
  color: var(--muted);
}

.filter-controls {
  grid-template-columns: minmax(260px, 1fr) 180px 160px 160px;
}

.filter-search:focus,
.filter-controls select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.filter-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.category-overview {
  display: grid;
  gap: 22px;
  margin: 44px auto 60px;
}

.category-card-large {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  padding: 24px;
  align-items: center;
}

.category-card-large h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

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

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

.category-samples a {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.category-samples img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  opacity: 0.86;
}

.category-samples span {
  position: absolute;
  inset: auto 8px 8px;
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-hero {
  padding: 56px 0;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  padding: 24px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.40), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  text-align: center;
  transition: 0.25s ease;
}

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

.play-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 18px 48px rgba(239, 68, 68, 0.36);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  margin-top: 34px;
  margin-bottom: 64px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.content-card {
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #334155;
}

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

.meta-card div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.meta-card dt {
  color: var(--muted);
  font-weight: 800;
}

.meta-card dd {
  margin: 0;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
  padding: 44px 0;
}

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

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

.site-footer p {
  margin: 10px 0 0;
  color: #94a3b8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #f87171;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.20);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .featured-grid,
  .small-grid,
  .all-grid,
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .split-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 16px;
    background: #1e293b;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 60px 16px 250px;
  }

  .hero-poster {
    max-width: 210px;
    margin: 0 auto;
  }

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

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

  .stat-grid,
  .footer-grid,
  .category-card-large,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .filter-heading {
    display: block;
  }

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

  .featured-grid,
  .small-grid,
  .all-grid,
  .ranking-grid,
  .category-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .nav-categories {
    padding-bottom: 10px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

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

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

  .hero-dots {
    display: none;
  }

  .stat-grid,
  .featured-grid,
  .small-grid,
  .all-grid,
  .ranking-grid,
  .category-grid,
  .related-grid,
  .category-samples {
    grid-template-columns: 1fr;
  }

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

  .content-card,
  .panel-card,
  .rank-panel,
  .filter-panel,
  .category-card-large,
  .cta-panel {
    padding: 18px;
  }
}
