:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-400: #f87171;
  --orange-500: #f97316;
  --green-600: #16a34a;
  --blue-600: #2563eb;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  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,
video {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-800), var(--slate-700), var(--slate-800));
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.24);
}

.header-inner,
.category-strip-inner,
.page-container,
.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-text {
  font-size: 25px;
  color: transparent;
  background: linear-gradient(90deg, var(--red-400), #fecaca);
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--orange-500));
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: #e5e7eb;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: var(--red-500);
}

.category-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.category-strip-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 0 12px;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 6px 15px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.category-strip a:hover {
  background: rgba(239, 68, 68, 0.9);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--white);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

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

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-900);
}

.hero-track {
  min-height: 540px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.52fr);
  align-items: center;
  gap: 48px;
  padding: 72px max(32px, calc((100vw - 1240px) / 2)) 86px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.84), rgba(15, 23, 42, 0.5)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fecaca;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  font-weight: 900;
}

.hero-text {
  max-width: 700px;
  margin: 22px 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tags a,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  backdrop-filter: blur(6px);
  font-size: 14px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--orange-500));
  box-shadow: 0 18px 35px rgba(239, 68, 68, 0.35);
}

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
}

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

.hero-poster {
  justify-self: end;
  width: min(330px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 99px;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--red-400);
}

.page-container {
  padding: 56px 0;
}

.page-container section + section {
  margin-top: 58px;
}

.feature-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 58px;
}

.feature-panel {
  min-height: 128px;
  padding: 28px;
  border-radius: 22px;
  color: var(--white);
  box-shadow: var(--shadow);
}

.feature-panel strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
}

.feature-panel span {
  color: rgba(255, 255, 255, 0.82);
}

.panel-red {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
}

.panel-green {
  background: linear-gradient(135deg, #22c55e, var(--green-600));
}

.panel-blue {
  background: linear-gradient(135deg, #3b82f6, var(--blue-600));
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 900;
}

.section-heading span {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red-400), transparent);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.card-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  background: var(--red-500);
}

.play-chip {
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(6px);
}

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

.movie-card h3 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
}

.movie-card-compact .movie-card-body {
  min-height: 82px;
}

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

.category-card {
  min-height: 148px;
  padding: 24px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), #7f1d1d);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.rank-list {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #fff7ed;
}

.rank-number {
  color: var(--red-600);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 64px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--slate-800);
}

.rank-info strong {
  display: block;
  color: var(--slate-900);
  font-size: 17px;
}

.rank-info em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-hot {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-500);
  font-size: 12px;
  font-weight: 800;
}

.sub-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: radial-gradient(circle at 10% 20%, rgba(248, 113, 113, 0.44), transparent 28%), linear-gradient(135deg, var(--slate-900), #7f1d1d 55%, var(--slate-900));
}

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

.sub-hero p:not(.eyebrow) {
  max-width: 720px;
  color: #e5e7eb;
  font-size: 18px;
}

.filter-bar {
  margin-bottom: 30px;
}

.sticky-filter {
  position: sticky;
  top: 112px;
  z-index: 20;
}

.filter-bar input {
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  color: var(--slate-900);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
}

.filter-bar input:focus {
  border-color: var(--red-400);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 20px;
  color: var(--muted);
  background: var(--white);
  text-align: center;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 70px max(32px, calc((100vw - 1240px) / 2));
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.45), transparent 24%), linear-gradient(135deg, var(--slate-900), #7f1d1d 58%, var(--slate-900));
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--slate-800);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #fecaca;
  font-size: 14px;
}

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

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

.detail-meta {
  margin-bottom: 14px;
}

.detail-info .primary-button {
  margin-top: 26px;
}

.detail-container {
  padding-top: 48px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.24);
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(239, 68, 68, 0.28), rgba(0, 0, 0, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-500), var(--orange-500));
  box-shadow: 0 16px 38px rgba(239, 68, 68, 0.42);
  font-size: 34px;
  padding-left: 5px;
}

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

.detail-copy {
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-copy p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
  text-align: justify;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800), var(--slate-900));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  margin-bottom: 16px;
  color: var(--white);
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  padding: 0;
}

.site-footer li {
  list-style: none;
  margin: 8px 0;
}

.site-footer a:hover {
  color: var(--red-400);
}

.keyword-cloud {
  line-height: 1.9;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    padding: 54px 24px 92px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .sticky-filter {
    top: 118px;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 21px;
  }

  .category-strip-inner {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero,
  .hero-track {
    min-height: 560px;
  }

  .hero h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .page-container {
    width: min(100% - 24px, 1240px);
    padding: 36px 0;
  }

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

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

  .rank-row {
    grid-template-columns: 34px 54px minmax(0, 1fr);
  }

  .rank-hot {
    display: none;
  }

  .detail-hero {
    padding: 40px 18px;
  }

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

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-heading span {
    display: none;
  }
}
