:root {
  --red: #dc2626;
  --red-deep: #991b1b;
  --orange: #f97316;
  --amber: #f59e0b;
  --blue: #2563eb;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --card: #ffffff;
  --bg: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  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;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
  min-height: 100vh;
}

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

img {
  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: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

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

.desktop-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--red);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: #334155;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-nav a {
  padding: 12px 0;
  color: #334155;
  font-weight: 650;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img,
.sub-hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 35% 20%, rgba(248, 113, 113, 0.55), rgba(15, 23, 42, 0.9));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fecaca;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-copy p,
.sub-hero p {
  margin: 22px 0 0;
  max-width: 680px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 15px 35px rgba(220, 38, 38, 0.35);
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

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

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

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

.main-stack {
  display: grid;
  gap: 42px;
  padding: 48px 0;
}

.content-section,
.detail-card,
.side-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.content-section {
  padding: clamp(22px, 4vw, 34px);
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.text-link {
  min-height: 40px;
  padding: 0 16px;
  color: var(--red);
  background: #fee2e2;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, #fca5a5, #0f172a 80%);
  box-shadow: var(--soft-shadow);
  transform: translateZ(0);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.poster-link img.is-empty {
  opacity: 0;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), transparent);
  opacity: 0.9;
}

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

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.score-pill {
  right: 10px;
  top: 10px;
  min-width: 42px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 13px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-card h3 {
  margin: 0;
  min-height: 2.7em;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

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

.movie-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  color: #94a3b8;
  font-size: 12px;
}

.meta-line span + span::before {
  content: "·";
  margin-right: 8px;
}

.tag-line {
  margin-top: 10px;
}

.tag-line span {
  color: var(--red);
  background: #fee2e2;
}

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-list .movie-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.wide-list .poster-link {
  aspect-ratio: 16 / 9;
}

.wide-list .movie-card h3 {
  min-height: auto;
  font-size: 22px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #991b1b, #ea580c);
  box-shadow: var(--soft-shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #7f1d1d, #be123c);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #1e293b, #dc2626);
}

.category-glow {
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-thumbs {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 180px;
}

.category-thumbs img {
  position: absolute;
  width: 44%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.35);
}

.category-thumbs img:nth-child(1) {
  left: 0;
  transform: rotate(-8deg);
}

.category-thumbs img:nth-child(2) {
  left: 28%;
  transform: translateY(-8px);
}

.category-thumbs img:nth-child(3) {
  left: 56%;
  transform: rotate(8deg);
}

.category-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-info h3 {
  margin: 0;
  font-size: 26px;
}

.category-info p {
  margin: 12px 0 16px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.category-info span {
  width: max-content;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.sub-hero {
  position: relative;
  overflow: hidden;
  padding: 98px 0;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.sub-hero .container {
  position: relative;
  z-index: 2;
}

.sub-hero-bg,
.sub-hero-shade {
  position: absolute;
  inset: 0;
}

.sub-hero-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.48));
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-weight: 800;
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 13px;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #f8fafc;
}

.empty-state.is-visible {
  display: block;
}

.player-stage {
  background: #020617;
  padding: 28px 0 34px;
}

.player-breadcrumb {
  color: rgba(255, 255, 255, 0.66);
}

.video-frame {
  position: relative;
  overflow: hidden;
  max-width: 1120px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.35);
  transition: transform 0.2s ease;
}

.play-cover:hover {
  background: rgba(0, 0, 0, 0.36);
}

.play-cover:hover span {
  transform: scale(1.08);
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 38px 0 58px;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.detail-card,
.side-card {
  padding: clamp(22px, 4vw, 34px);
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-head h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
}

.detail-score {
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  font-size: 24px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 15px 30px rgba(220, 38, 38, 0.22);
}

.one-line {
  margin: 24px 0 16px;
  color: #334155;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags span {
  color: var(--red);
  background: #fee2e2;
}

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

.detail-card p {
  color: #475569;
  line-height: 1.9;
  font-size: 17px;
}

.related-section {
  padding: clamp(20px, 3vw, 28px);
}

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

.side-card {
  position: sticky;
  top: 104px;
}

.side-card h2 {
  margin-top: 0;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 28px 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.side-list span {
  color: var(--red);
  font-weight: 900;
}

.side-list img {
  width: 54px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}

.side-list strong {
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #450a0a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 46px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fecaca;
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .side-card {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .header-inner {
    height: 66px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 72px;
  }

  .hero-copy p,
  .sub-hero p {
    font-size: 16px;
  }

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

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

  .wide-list .movie-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    height: 620px;
  }

  .hero-actions {
    display: grid;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .content-section,
  .detail-card,
  .side-card {
    border-radius: 18px;
  }

  .section-title {
    display: block;
  }

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

  .movie-card p {
    display: none;
  }

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

  .category-thumbs {
    min-height: 150px;
  }

  .detail-head {
    display: block;
  }

  .detail-score {
    margin-top: 18px;
  }
}
