:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-soft: #0b1020;
  --panel: rgba(17, 24, 39, 0.74);
  --panel-solid: #111827;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f9fafb;
  --muted: #a8b3c7;
  --muted-2: #7b879c;
  --primary: #ef4444;
  --primary-2: #f97316;
  --accent: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 8%, rgba(239, 68, 68, 0.26), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(56, 189, 248, 0.18), transparent 34rem),
    linear-gradient(180deg, #111827 0%, #05070d 36%, #0b1020 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.36);
}

.brand-text {
  font-size: 22px;
}

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

.main-nav a {
  padding: 10px 16px;
  color: var(--muted);
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: currentColor;
}

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

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 16%, rgba(239, 68, 68, 0.5), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.96));
}

.hero-bg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transform: scale(1.04);
}

.hero-bg-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 7, 13, 0.94) 0%, rgba(5, 7, 13, 0.68) 45%, rgba(5, 7, 13, 0.92) 100%),
    linear-gradient(0deg, #05070d 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: center;
  padding: 72px 0 94px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.15);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-meta span,
.badge,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

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

.hero-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.hero-card .poster-wrap {
  height: 420px;
  border-radius: 0;
}

.hero-card-info {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(18px);
}

.hero-card-info strong {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
}

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

.hero-dot {
  width: 42px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.page-hero {
  padding: 74px 0 38px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 18px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

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

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

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

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

.section-more {
  flex: 0 0 auto;
  color: #fecaca;
  font-weight: 900;
}

.search-panel {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.search-panel label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #ffffff;
  outline: none;
  background: rgba(3, 7, 18, 0.72);
}

.search-panel input:focus {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

.category-card {
  min-height: 178px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.25), transparent 12rem);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.38);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.category-card span {
  color: #fecaca;
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover,
.movie-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(255, 255, 255, 0.09);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 30% 10%, rgba(248, 113, 113, 0.55), transparent 42%),
    linear-gradient(145deg, #1f2937, #020617 72%);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms ease, opacity 180ms ease;
}

.poster-wrap.is-missing img {
  display: none;
}

.poster-wrap.is-missing::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  content: attr(data-cover-title);
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.movie-card-body {
  display: grid;
  gap: 9px;
  padding: 15px;
}

.movie-card-body strong {
  overflow: hidden;
  font-size: 17px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-body em {
  color: var(--muted-2);
  font-size: 12px;
  font-style: normal;
}

.movie-card-body small {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 88px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-num {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.98), rgba(249, 115, 22, 0.98));
}

.rank-item .poster-wrap {
  width: 88px;
  border-radius: 18px;
}

.rank-copy strong {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fecaca;
}

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

.player-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(239, 68, 68, 0.32), transparent 14rem),
    rgba(0, 0, 0, 0.18);
}

.player-start span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.42);
  font-size: 30px;
  transform: translateX(3px);
}

.player-panel.is-playing .player-start {
  display: none;
}

.detail-panel,
.side-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.055);
}

.detail-panel h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.86;
}

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

.detail-copy h2,
.side-panel h2 {
  margin: 26px 0 12px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.side-poster {
  overflow: hidden;
  border-radius: 26px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.related-item .poster-wrap {
  border-radius: 14px;
}

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

.related-item small {
  color: var(--muted-2);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.72);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  padding: 36px 0;
}

.footer-inner p {
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
  justify-content: end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.empty-result {
  display: none;
  margin: 24px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.has-empty-result .empty-result {
  display: block;
}

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

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

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

  .hero-card {
    max-width: 520px;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 64px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 7, 13, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-slider {
    min-height: 760px;
  }

  .hero-content {
    gap: 24px;
    padding: 42px 0 82px;
  }

  .hero-copy h1,
  .page-hero h1 {
    letter-spacing: -0.05em;
  }

  .hero-card,
  .hero-card .poster-wrap {
    min-height: 360px;
    height: 360px;
  }

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

  .section-heading,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }

  .rank-num {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 18px;
  }

  .rank-item .poster-wrap {
    width: 72px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }
}
