:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-400: #facc15;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--red-600), var(--red-800));
  box-shadow: 0 8px 24px rgba(153, 27, 27, 0.22);
}

.nav-inner {
  width: min(1180px, 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: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #7c2d12;
  background: var(--yellow-400);
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.28);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--yellow-400);
  transform: translateY(-1px);
}

.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.24);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 2px;
}

.hero-slider {
  position: relative;
  min-height: 570px;
  overflow: hidden;
  color: var(--white);
  background: var(--red-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.12);
  transform: scale(1.04);
}

.hero-backdrop::after,
.detail-bg::after,
.category-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(250, 204, 21, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(127, 29, 29, 0.94), rgba(153, 27, 27, 0.78) 46%, rgba(2, 6, 23, 0.76));
}

.hero-content {
  position: relative;
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 54px;
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  color: #78350f;
  background: var(--yellow-400);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.card-meta,
.tag-cloud,
.genre-inline,
.chip-cloud,
.hero-genre-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-meta span,
.tag-cloud span,
.genre-inline a,
.hero-genre-links a,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.hero-genre-links a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 18px;
}

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

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

.btn.primary {
  color: #431407;
  background: var(--yellow-400);
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.28);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(2deg);
}

.hero-poster img,
.movie-card img,
.rank-poster img,
.detail-poster img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c2d12;
  background: var(--yellow-400);
  border-radius: 50%;
  font-weight: 900;
}

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

.hero-controls button {
  width: 38px;
  height: 38px;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  font-size: 24px;
  font-weight: 900;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.42) !important;
}

.hero-dot.is-active {
  width: 28px !important;
  background: var(--yellow-400) !important;
}

.stats-band {
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

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

.stat-card {
  min-height: 118px;
  padding: 24px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.stat-card strong {
  display: block;
  color: var(--red-700);
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.stat-card span {
  display: block;
  margin-top: 10px;
  color: var(--gray-500);
  font-weight: 700;
}

.section-block {
  padding: 64px 0;
}

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

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

.section-head p {
  margin: 10px 0 0;
  color: var(--gray-500);
  font-size: 17px;
}

.section-more {
  color: var(--red-700);
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transform: translateZ(0);
}

.category-tile img {
  position: absolute;
  inset: 0;
  transition: transform 0.35s ease;
}

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
}

.category-tile div {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: var(--white);
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  font-size: 24px;
  font-weight: 900;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
  font-weight: 700;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-800);
}

.poster-link img {
  transition: transform 0.35s ease;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c2d12;
  background: var(--yellow-400);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  font-weight: 900;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 8px;
  color: #7c2d12;
  background: var(--yellow-400);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

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

.movie-card:hover .play-dot {
  transform: translate(-50%, -50%) scale(1);
}

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

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

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 900;
}

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

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

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

.movie-card.compact p {
  -webkit-line-clamp: 2;
  font-size: 13px;
}

.card-meta span {
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 12px;
}

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

.dark-section .section-head h2,
.dark-section .movie-card h3 {
  color: var(--white);
}

.dark-section .section-head p {
  color: rgba(255, 255, 255, 0.68);
}

.dark-section .movie-card {
  background: var(--slate-800);
}

.dark-section .movie-card p {
  color: rgba(255, 255, 255, 0.66);
}

.chip-cloud {
  gap: 12px;
}

.chip,
.genre-inline a,
.tag-cloud span {
  color: var(--red-800);
  background: #fee2e2;
}

.chip:hover,
.genre-inline a:hover {
  color: #431407;
  background: var(--yellow-400);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 350px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-900), var(--red-700) 55%, var(--slate-900));
}

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

.category-hero > img,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.1);
  transform: scale(1.04);
}

.category-hero .container,
.page-hero .container {
  position: relative;
  z-index: 2;
  padding: 64px 0;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 20;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
}

.filter-panel input {
  flex: 1 1 280px;
}

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

.result-count {
  margin-bottom: 18px;
  color: var(--gray-500);
  font-weight: 800;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 82px 52px minmax(0, 1fr) 86px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.rank-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--slate-800);
}

.rank-index strong {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #7c2d12;
  background: var(--yellow-400);
  border-radius: 50%;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info h3 a:hover {
  color: var(--red-700);
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--gray-500);
}

.score-box {
  text-align: center;
}

.score-box span {
  display: block;
  color: var(--red-700);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.score-box em {
  color: var(--gray-500);
  font-style: normal;
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--soft-shadow);
  font-weight: 800;
}

.pagination a.is-current,
.pagination a:hover {
  color: #431407;
  background: var(--yellow-400);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--red-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: 520px;
  padding: 64px 0;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
  font-size: clamp(40px, 7vw, 72px);
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #7c2d12;
  background: rgba(0, 0, 0, 0.38);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow-400);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(250, 204, 21, 0.26);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  padding: 56px 0 20px;
}

.detail-main,
.detail-side {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.detail-main {
  padding: 30px;
}

.detail-side {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--gray-900);
  font-size: 24px;
  font-weight: 900;
}

.detail-main h2:not(:first-child) {
  margin-top: 34px;
}

.detail-main p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

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

.info-list div {
  padding: 14px;
  background: var(--gray-100);
  border-radius: 14px;
}

.info-list dt {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 4px 0 0;
  color: var(--gray-900);
  font-weight: 800;
}

.tag-cloud,
.genre-inline {
  margin-top: 18px;
}

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

.side-list .movie-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  box-shadow: none;
  border: 1px solid #eef2f7;
}

.side-list .poster-link {
  height: 124px;
}

.side-list .movie-card-body {
  padding: 10px 10px 10px 0;
}

.side-list .movie-card p,
.side-list .card-meta {
  display: none;
}

.site-footer {
  margin-top: 72px;
  padding: 54px 0;
  color: rgba(255, 255, 255, 0.72);
  background: var(--slate-950);
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
}

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

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

.is-hidden {
  display: none !important;
}

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

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

  .hero-content,
  .detail-hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 300px;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: var(--red-800);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

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

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 6px 0;
  }

  .hero-content {
    min-height: 620px;
    padding: 54px 0 96px;
  }

  .hero-poster {
    display: none;
  }

  .stats-grid,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .footer-grid,
  .info-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .rank-index,
  .score-box {
    display: none;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-slider,
  .hero-content {
    min-height: 580px;
  }

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

  .stats-grid,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .footer-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .side-list .movie-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .detail-main {
    padding: 22px;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel input,
  .filter-panel select,
  .filter-panel .btn {
    width: 100%;
  }
}
