:root {
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --amber: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 14px;
  color: var(--red-700);
  background: var(--amber);
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #ffffff;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--amber);
  opacity: 1;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  margin: 6px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero-carousel {
  position: relative;
  margin: 30px auto 42px;
  overflow: hidden;
  border-radius: 32px;
  min-height: 540px;
  color: #ffffff;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: 540px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 42px;
  padding: 72px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.98) 0%, rgba(127, 29, 29, 0.86) 50%, rgba(17, 24, 39, 0.72) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 16px 0 16px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-row,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span,
.detail-meta span,
.rank-meta span {
  color: #374151;
  background: #f3f4f6;
}

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

.primary-btn,
.ghost-btn,
.small-play,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #7f1d1d;
  background: var(--amber);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.small-play:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-poster {
  width: 320px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: linear-gradient(135deg, #991b1b, #111827);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster img,
.poster-frame img,
.detail-cover img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.image-missing {
  opacity: 0;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
  margin: 42px 0;
}

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

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

.section-more {
  color: var(--red-700);
  background: #fee2e2;
}

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

.all-movie-grid {
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

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

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

.poster-link {
  display: block;
}

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

.poster-frame::after,
.detail-cover::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.poster-frame img {
  transition: transform 0.28s ease, opacity 0.2s ease;
}

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

.type-badge,
.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(185, 28, 28, 0.92);
}

.type-badge {
  left: 10px;
  top: 10px;
}

.year-badge {
  right: 10px;
  top: 10px;
  background: rgba(17, 24, 39, 0.78);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  background: var(--amber);
  color: #7f1d1d;
}

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

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

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  min-height: 42px;
  margin-top: 8px;
}

.movie-card .tag-row {
  margin-top: 12px;
}

.compact-card .movie-line {
  display: none;
}

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

.category-tile {
  min-height: 160px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 26px;
  color: #ffffff;
  background-image: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(17, 24, 39, 0.78)), var(--tile-image);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-tile.wide {
  background-image: linear-gradient(135deg, #991b1b, #111827);
}

.category-tile span {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.category-tile strong {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.listing-hero,
.ranking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 30px;
  align-items: center;
  margin: 30px 0 32px;
  padding: 42px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.26), transparent 34%), linear-gradient(135deg, #991b1b, #111827);
  box-shadow: var(--shadow);
}

.ranking-hero {
  display: block;
  max-width: 900px;
}

.listing-hero h1,
.ranking-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
}

.listing-hero p,
.ranking-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.83);
}

.filter-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.filter-panel.slim {
  max-width: 440px;
  margin-bottom: 24px;
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.filter-panel span {
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.rank-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #7f1d1d;
  background: #fee2e2;
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  position: relative;
  width: 94px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #7f1d1d, #111827);
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
}

.small-play {
  color: #ffffff;
  background: var(--red-600);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.26), transparent 40%), linear-gradient(135deg, #991b1b, #111827);
  box-shadow: var(--shadow);
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #7f1d1d, #111827);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.detail-intro h1 {
  margin: 12px 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-intro .tag-row,
.detail-intro .detail-meta {
  margin: 16px 0;
}

.detail-intro .tag-row span,
.detail-intro .detail-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
}

.watch-section {
  margin: 36px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #7f1d1d;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: var(--amber);
  font-size: 42px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

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

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin: 36px 0;
}

.detail-content article {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.site-footer {
  margin-top: 64px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 14px 22px;
  max-width: 420px;
}

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

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

@media (max-width: 980px) {
  .hero-slide,
  .listing-hero,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 44px;
  }

  .hero-poster {
    width: min(280px, 72vw);
  }

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

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

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

  .rank-item .small-play {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 18px;
    background: var(--red-700);
  }

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

  .site-nav a {
    padding: 12px 0;
  }

  main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1200px);
  }

  .hero-carousel,
  .hero-stage {
    min-height: 620px;
  }

  .hero-slide {
    padding: 30px 22px 76px;
    gap: 24px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .listing-hero,
  .ranking-hero,
  .detail-hero {
    padding: 26px;
    border-radius: 24px;
  }

  .movie-grid,
  .all-movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-links {
    justify-content: flex-start;
  }

  .detail-cover {
    max-width: 260px;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-content p {
    display: none;
  }

  .rank-item .small-play {
    grid-column: 2;
  }
}
