:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --red: #dc2626;
  --orange: #f97316;
  --yellow: #facc15;
  --dark: #0f172a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.26);
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.03em;
}

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

.main-nav a {
  padding: 10px 15px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: background 0.22s ease, color 0.22s ease;
}

.main-nav a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff1f2;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--red);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide {
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 56px;
  padding: 72px max(32px, calc((100vw - 1180px) / 2));
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 900;
}

.eyebrow.red {
  color: var(--red);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 20px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.3);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.section {
  padding: 58px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-copy h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

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

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

.wide-grid,
.search-grid,
.category-page-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.movie-score,
.movie-kind {
  position: absolute;
  top: 12px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.movie-score {
  left: 12px;
  color: #111827;
  background: var(--yellow);
}

.movie-kind {
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 15px 15px 18px;
}

.movie-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

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

.movie-line {
  min-height: 48px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.tag-row span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #9f1239;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.overview-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.category-card img,
.overview-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img,
.overview-card:hover img {
  opacity: 0.62;
  transform: scale(1.06);
}

.category-card span,
.category-card p,
.overview-card div {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 6px 0 0;
  color: #e2e8f0;
  font-size: 14px;
}

.page-hero {
  padding: 82px 0;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.44), transparent 30%), linear-gradient(135deg, #111827, #0f172a 58%, #7f1d1d);
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e2e8f0;
  font-size: 18px;
}

.small-hero {
  padding: 70px 0;
}

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

.overview-card {
  min-height: 260px;
}

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

.overview-card p {
  margin: 0 0 14px;
  color: #e2e8f0;
}

.overview-card span {
  display: inline-flex;
  color: #fff;
  font-weight: 900;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 82px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.ranking-rank {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 18px;
  font-weight: 900;
}

.ranking-cover img {
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-copy h3 {
  margin: 0 0 3px;
  font-size: 19px;
}

.ranking-copy p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.ranking-meta {
  font-weight: 800;
}

.ranking-score {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.search-panel {
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.inline-panel {
  display: grid;
  gap: 14px;
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--soft);
  border-radius: 16px;
  outline: none;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 700;
}

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

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pills button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
  font-weight: 900;
}

.filter-pills button.active,
.filter-pills button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.detail-hero {
  padding: 74px 0;
  color: #fff;
  background-position: center;
  background-size: cover;
}

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

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.48);
}

.breadcrumb {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
}

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

.detail-copy h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
}

.detail-line {
  max-width: 820px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 19px;
}

.large-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: contain;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-action {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.38);
  cursor: pointer;
}

.play-triangle {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #fff;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  font-size: 28px;
}

.content-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 16px;
}

.site-footer {
  margin-top: 52px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.brand-footer {
  color: #fff;
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .wide-grid,
  .search-grid,
  .category-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 34px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    border-radius: 12px;
  }

  .hero {
    height: 680px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 58px 20px 86px;
  }

  .hero-poster {
    display: none;
  }

  .hero-summary {
    font-size: 17px;
  }

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

  .movie-grid,
  .wide-grid,
  .search-grid,
  .category-page-grid,
  .category-grid,
  .overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(260px, 78vw);
  }

  .ranking-item {
    grid-template-columns: 44px 74px minmax(0, 1fr);
  }

  .ranking-score {
    grid-column: 3;
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
