:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-400: #facc15;
  --yellow-500: #eab308;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f9fafb;
  --slate: #1f2937;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--red-600), var(--red-800));
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.28);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--red-900);
  background: var(--yellow-400);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #ffffff;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--yellow-400);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  padding: 10px 4px;
  font-weight: 650;
}

.mobile-nav.open {
  display: block;
}

.hero-carousel {
  position: relative;
  min-height: 540px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red-950), var(--red-700));
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 48px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(1px) saturate(1.1);
}

.hero-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(250, 204, 21, 0.22), transparent 28%),
    radial-gradient(circle at 80% 38%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(90deg, rgba(69, 10, 10, 0.98), rgba(127, 29, 29, 0.78) 56%, rgba(69, 10, 10, 0.9));
  z-index: 1;
}

.hero-content,
.hero-poster-card {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

.hero-content p {
  max-width: 760px;
  margin: 0 0 26px;
  color: #f3f4f6;
  font-size: clamp(18px, 2vw, 24px);
}

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

.btn-primary,
.btn-ghost,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: #111827;
  background: var(--yellow-400);
  box-shadow: 0 16px 30px rgba(250, 204, 21, 0.24);
}

.btn-primary:hover {
  background: var(--yellow-500);
  transform: translateY(-2px) scale(1.02);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-dark {
  color: #ffffff;
  background: var(--slate);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
}

.hero-poster-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--red-800), var(--red-950));
}

.hero-poster-info {
  padding: 14px 4px 2px;
}

.hero-poster-info strong {
  display: block;
  font-size: 18px;
}

.hero-poster-info span {
  color: #fef3c7;
}

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

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

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

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.full-main {
  width: 100%;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

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

.section-link {
  color: var(--red-700);
  font-weight: 800;
}

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

.stat-card,
.category-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.stat-card:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(220, 38, 38, 0.18);
}

.stat-card strong,
.category-card strong {
  display: block;
  color: var(--red-700);
  font-size: 28px;
  line-height: 1;
}

.stat-card span,
.category-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #111827);
}

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

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

.year-badge,
.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.year-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.58);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--red-900);
  background: var(--yellow-400);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

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

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

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 750;
}

.banner-panel,
.page-hero {
  margin: 34px 0 0;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  color: #ffffff;
  background:
    radial-gradient(circle at 8% 20%, rgba(250, 204, 21, 0.24), transparent 28%),
    linear-gradient(135deg, var(--red-950), var(--red-700));
  box-shadow: var(--shadow);
}

.page-hero h1,
.banner-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p,
.banner-panel p {
  max-width: 860px;
  margin: 0;
  color: #f3f4f6;
  font-size: 18px;
}

.filter-wrap {
  margin-bottom: 0;
}

.filter-panel {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  align-items: end;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  border-radius: 14px;
  padding: 16px;
  color: var(--muted);
  background: #ffffff;
}

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), var(--red-900));
  font-size: 20px;
  font-weight: 900;
}

.rank-item img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-800), var(--slate));
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rank-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red-700);
  font-weight: 750;
}

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

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.detail-card {
  overflow: hidden;
}

.player-section {
  background: #0f172a;
}

.player-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
}

.player-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
}

.player-overlay.is-hidden {
  display: none;
}

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: var(--red-900);
  background: var(--yellow-400);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 900;
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

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

.info-box {
  border-radius: 16px;
  padding: 13px;
  background: #fef2f2;
}

.info-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.info-box strong {
  display: block;
  margin-top: 4px;
  color: var(--red-800);
}

.article-block {
  margin-top: 24px;
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: #374151;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--red-800), var(--slate));
}

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

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

.side-list a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-list a:hover {
  background: #fee2e2;
  transform: translateX(3px);
}

.side-list img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

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

.side-list span {
  color: var(--muted);
  font-size: 13px;
}

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

.site-footer {
  margin-top: 60px;
  color: #e5e7eb;
  background: #111827;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  margin: 6px 0 0;
  color: #9ca3af;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 86px;
  }

  .hero-poster-card {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .nav-inner {
    height: 62px;
  }

  .brand {
    font-size: 18px;
  }

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

  .hero-content h1 {
    font-size: 38px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 50px 72px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .rank-item img {
    width: 72px;
  }

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

@media (max-width: 520px) {
  main,
  .nav-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1200px);
  }

  .hero-slide {
    width: min(100% - 22px, 1200px);
  }

  .stats-grid,
  .category-grid,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-body p {
    min-height: 0;
  }

  .detail-body {
    padding: 20px;
  }

  .play-ring {
    width: 66px;
    height: 66px;
    font-size: 24px;
  }
}
