:root {
  --bg: #030712;
  --bg-soft: #111827;
  --panel: rgba(31, 41, 55, 0.72);
  --panel-strong: rgba(17, 24, 39, 0.92);
  --border: rgba(156, 163, 175, 0.18);
  --text: #f9fafb;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --yellow: #facc15;
  --orange: #f97316;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.16), transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(250, 204, 21, 0.08), transparent 32%),
    linear-gradient(180deg, #030712 0%, #111827 42%, #030712 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--red-900), var(--red-700), var(--red-900));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

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

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--yellow), var(--red-600));
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.22);
}

.brand-copy strong,
.footer-brand strong {
  display: block;
  line-height: 1.1;
  font-size: 20px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fef3c7, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small,
.footer-brand small {
  display: block;
  margin-top: 3px;
  color: #fecaca;
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  position: relative;
  color: #fee2e2;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fef08a;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 99px;
  background: var(--yellow);
}

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

.header-search {
  display: none;
  padding-bottom: 14px;
}

.search-shell {
  position: relative;
  max-width: 520px;
  margin-left: auto;
}

.search-shell input,
.filter-bar input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: rgba(17, 24, 39, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search-shell input::placeholder,
.filter-bar input::placeholder {
  color: #fca5a5;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: block;
}

.search-panel a {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-panel a:hover {
  background: rgba(239, 68, 68, 0.18);
}

.search-panel strong {
  display: block;
  color: #fff;
}

.search-panel small {
  color: var(--muted-2);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #050816;
}

.hero-slide {
  position: relative;
  display: none;
  min-height: 680px;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: 46px;
  padding: 70px 0 92px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.62s ease both;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98), rgba(3, 7, 18, 0.78) 45%, rgba(3, 7, 18, 0.48)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.72;
  filter: blur(2px) saturate(1.08);
  transform: scale(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 18% 32%, rgba(220, 38, 38, 0.26), transparent 28%),
    radial-gradient(circle at 78% 44%, rgba(250, 204, 21, 0.16), transparent 26%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.05), #030712 100%);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 204, 21, 0.26);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(127, 29, 29, 0.38);
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero h1 span,
.page-hero h1 span {
  color: #fde68a;
}

.hero-desc,
.page-hero p,
.detail-title p {
  margin: 0;
  max-width: 720px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.info-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-meta span,
.info-line span,
.tag-row span,
.detail-tags span,
.filter-buttons button {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #450a0a;
  background: linear-gradient(135deg, var(--yellow), #fb923c);
  box-shadow: 0 14px 36px rgba(250, 204, 21, 0.25);
}

.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-visual {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.hero-poster-wrap {
  position: relative;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-poster-wrap::before {
  content: "";
  position: absolute;
  inset: 28px -22px -22px 28px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.32), rgba(220, 38, 38, 0.22));
  filter: blur(30px);
  z-index: -1;
}

.hero-poster-wrap img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
}

.hero-poster-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
}

.hero-poster-caption strong {
  display: block;
  font-size: 18px;
}

.hero-poster-caption small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

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

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

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.section {
  padding: 70px 0;
}

.section-tight {
  padding-top: 36px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

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

.section-more {
  color: #fef08a;
  font-weight: 800;
}

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

.category-card {
  min-height: 170px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(250, 204, 21, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.62), rgba(17, 24, 39, 0.72));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.movie-card:hover,
.wide-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.32);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.76);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  color: #450a0a;
  background: var(--yellow);
  padding: 7px 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--red-600), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 8px 0 0;
  color: #fca5a5;
  font-size: 12px;
}

.movie-line {
  display: -webkit-box;
  min-height: 58px;
  overflow: hidden;
  margin: 10px 0 12px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

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

.wide-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.wide-poster img {
  width: 110px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.wide-body {
  align-self: center;
}

.wide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.wide-rank {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #450a0a;
  background: var(--yellow);
  font-size: 14px;
}

.wide-body p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(220, 38, 38, 0.28), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(250, 204, 21, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(127, 29, 29, 0.4), rgba(15, 23, 42, 0.4));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #fca5a5;
  font-size: 14px;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 440px) 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #450a0a;
  background: var(--yellow);
}

.detail-shell {
  padding: 46px 0 76px;
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 340px;
  gap: 30px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.video-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  z-index: 4;
}

.video-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.76));
}

.video-cover.is-hidden {
  display: none;
}

.video-play {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #450a0a;
  background: linear-gradient(135deg, var(--yellow), #fb923c);
  font-size: 30px;
  box-shadow: 0 22px 60px rgba(250, 204, 21, 0.38);
}

.detail-side {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  padding: 22px;
  background: rgba(17, 24, 39, 0.78);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-title {
  margin-top: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.detail-info div {
  padding: 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.detail-info strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.content-panel {
  margin-top: 30px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.72);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  padding: 48px 0 24px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.62), #000);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.site-footer p {
  max-width: 430px;
  color: var(--muted-2);
  line-height: 1.75;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 16px;
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 900px) {
  .header-search {
    display: block;
  }
}

@media (max-width: 980px) {
  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(127, 29, 29, 0.98);
    box-shadow: var(--shadow);
  }

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

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

  .nav-link.is-active::after {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding: 52px 0 98px;
  }

  .hero {
    min-height: auto;
  }

  .filter-bar,
  .detail-top,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    max-width: 360px;
  }
}

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

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 17px;
  }

  .section {
    padding: 48px 0;
  }

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

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

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

  .movie-title {
    min-height: 40px;
    font-size: 14px;
  }

  .movie-line {
    display: none;
  }

  .wide-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .wide-poster img {
    width: 86px;
  }

  .wide-head {
    font-size: 16px;
  }

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