:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-400: #facc15;
  --yellow-300: #fde047;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.22);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 45%, #fff7f7 100%);
  color: var(--gray-900);
  line-height: 1.6;
}

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

img,
video {
  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: 80;
  background: linear-gradient(90deg, var(--red-600), var(--red-700));
  color: var(--white);
  box-shadow: var(--shadow);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--yellow-400);
  color: var(--red-800);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 15px;
}

.main-nav,
.nav-pills {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-weight: 650;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--yellow-300);
}

.nav-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--yellow-300);
}

.hero {
  min-height: 500px;
  position: relative;
  color: var(--white);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 20%, rgba(250, 204, 21, 0.32), transparent 32%),
    radial-gradient(circle at 16% 80%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, var(--red-900), var(--red-700) 48%, var(--red-900));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.26);
}

.hero-slider {
  position: relative;
  z-index: 2;
  min-height: 500px;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  gap: 40px;
  align-items: center;
  padding: 70px 0;
}

.hero-slide.active {
  display: grid;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--yellow-300);
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: var(--yellow-300);
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  max-width: 720px;
}

.hero-actions,
.hero-tags,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 19px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--yellow-400);
  color: var(--gray-950);
}

.btn-light {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-red {
  background: var(--red-600);
  color: var(--white);
}

.hero-media {
  position: relative;
}

.hero-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-xl);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotate(2deg);
}

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

.hero-card-caption {
  position: absolute;
  left: -24px;
  right: 24px;
  bottom: 22px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-card-caption strong {
  display: block;
  font-size: 18px;
}

.hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 9px;
  padding-bottom: 32px;
}

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

.hero-dot.active {
  background: var(--yellow-400);
}

.page-hero {
  background: linear-gradient(135deg, var(--red-900), var(--red-700));
  color: var(--white);
  padding: 58px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  margin: 0;
  max-width: 800px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: linear-gradient(135deg, var(--gray-50), #fff1f1);
}

.section.dark {
  background: var(--slate-800);
  color: var(--white);
}

.section-heading {
  text-align: center;
  margin: 0 auto 36px;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  color: var(--red-600);
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.section.dark .eyebrow {
  color: var(--yellow-300);
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 0;
  color: var(--gray-600);
  font-size: 18px;
}

.section.dark .section-heading p {
  color: var(--gray-300);
}

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

.stat-card,
.category-card,
.info-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover,
.category-card:hover,
.info-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-icon,
.category-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: var(--red-600);
  font-size: 25px;
  margin-bottom: 16px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.stat-card span,
.category-card p,
.info-card p {
  color: var(--gray-600);
}

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

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

.movie-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.hidden-by-filter {
  display: none;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
}

.movie-card:hover .poster::after {
  background: rgba(0, 0, 0, 0.34);
}

.poster-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 40px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

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

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

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

.movie-card p {
  margin: 0 0 10px;
  color: var(--gray-600);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  margin-bottom: 6px;
}

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

.tag-row span,
.detail-tag,
.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--red-700);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.15);
  color: var(--yellow-300);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr));
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--gray-600);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.rank-number {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  color: var(--white);
  font-weight: 900;
  font-size: 20px;
}

.rank-cover img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-body h3 a:hover {
  color: var(--red-600);
}

.rank-body p {
  margin: 0;
  color: var(--gray-600);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
}

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

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

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

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.play-overlay.hide {
  display: none;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow-400);
  color: var(--red-800);
  font-size: 34px;
  box-shadow: var(--shadow-xl);
}

.play-overlay strong {
  font-size: 18px;
  letter-spacing: 0.05em;
}

.detail-card,
.side-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--gray-700);
}

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

.detail-meta div {
  padding: 14px;
  border-radius: 14px;
  background: var(--gray-50);
}

.detail-meta span {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-meta strong {
  color: var(--gray-900);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

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

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

.related-list a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: var(--gray-50);
  transition: background 0.2s ease;
}

.related-list a:hover {
  background: #fee2e2;
}

.related-list img {
  width: 56px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 9px;
}

.related-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.related-list span {
  color: var(--gray-500);
  font-size: 12px;
}

.category-card h2,
.info-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card .card-actions {
  margin-top: 16px;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 0 24px;
  background: var(--gray-900);
  color: var(--gray-300);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer p {
  margin: 0;
}

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

.footer-links a:hover {
  color: var(--yellow-400);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--gray-400);
  font-size: 14px;
}

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

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

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

  .side-card {
    order: -1;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 44px 0;
  }

  .hero-media {
    max-width: 330px;
  }

  .stats-grid,
  .category-grid,
  .ranking-list,
  .footer-grid,
  .detail-meta,
  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel .search-box {
    grid-column: 1 / -1;
  }

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

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

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: auto;
  }

  .stats-grid,
  .category-grid,
  .movie-grid,
  .movie-grid.wide,
  .ranking-list,
  .footer-grid,
  .detail-meta,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 76px 1fr;
  }

  .rank-cover img {
    width: 76px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
