:root {
  --brand: #dc2626;
  --brand-dark: #b91c1c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --dark: #0f172a;
  --card-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f3f4f6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img,
video {
  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.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.90);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.30);
}

.logo-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  width: min(320px, 34vw);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 11px 12px;
  color: #111827;
  background: transparent;
}

.header-search button {
  border: 0;
  color: #fff;
  background: var(--brand);
  padding: 11px 16px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 14px 0 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #374151;
  font-weight: 650;
}

.mobile-panel .header-search {
  width: 100%;
  margin-top: 10px;
}

.hero {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.04);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(220, 38, 38, 0.20), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.26));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  padding: 84px 0 72px;
}

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

.hero-title {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

.pill.light {
  border-color: #fee2e2;
  color: #991b1b;
  background: #fef2f2;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

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

.btn-soft {
  color: #991b1b;
  background: #fef2f2;
}

.hero-poster-wrap {
  position: relative;
}

.hero-poster {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.hero-card-note {
  position: absolute;
  left: -26px;
  bottom: 34px;
  max-width: 260px;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.hero-card-note strong {
  display: block;
  margin-bottom: 6px;
}

.hero-card-note span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

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

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

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

.section {
  padding: 50px 0;
}

.section.compact {
  padding: 34px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

.rank-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

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

.poster-box {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  opacity: 0;
}

.poster-box.no-image .poster-fallback {
  opacity: 1;
}

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.0);
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-overlay {
  background: rgba(0, 0, 0, 0.38);
  opacity: 1;
}

.play-symbol {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.badge.dark {
  left: auto;
  right: 10px;
  background: rgba(0, 0, 0, 0.66);
}

.movie-title {
  margin: 12px 0 4px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #dc2626, #7f1d1d);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.category-card:nth-child(4n+2) {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.20), transparent 26%),
    linear-gradient(135deg, #111827, #4b5563);
}

.category-card:nth-child(4n+3) {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.20), transparent 26%),
    linear-gradient(135deg, #991b1b, #312e81);
}

.category-card:nth-child(4n+4) {
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.20), transparent 26%),
    linear-gradient(135deg, #1f2937, #7c2d12);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font-weight: 800;
}

.rank-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--card-shadow);
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #fef2f2;
}

.rank-num {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #111827;
  border-radius: 10px;
  font-weight: 900;
}

.rank-item:nth-child(-n+3) .rank-num {
  background: var(--brand);
}

.rank-title {
  min-width: 0;
}

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

.rank-title span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 72% 20%, rgba(239, 68, 68, 0.30), transparent 30%),
    linear-gradient(135deg, #111827, #1f2937 48%, #7f1d1d);
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin: 24px 0;
}

.breadcrumb a {
  color: #991b1b;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px 150px;
  gap: 12px;
  margin-bottom: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  padding: 12px 14px;
}

.detail-hero {
  color: #fff;
  background: #111827;
  padding: 40px 0 62px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  font-size: 22px;
  font-weight: 900;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.detail-title {
  margin: 28px 0 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-desc {
  margin: 18px 0 0;
  color: #d1d5db;
  font-size: 17px;
  line-height: 1.82;
}

.detail-side {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  padding: 22px;
}

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

.info-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--card-shadow);
  padding: 28px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.info-panel p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  display: inline-flex;
  color: #991b1b;
  background: #fef2f2;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.footer {
  margin-top: 64px;
  color: #fff;
  background: #111827;
}

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

.footer h3,
.footer h4 {
  margin: 0 0 14px;
}

.footer p,
.footer a {
  color: #9ca3af;
  line-height: 1.8;
  font-size: 14px;
}

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

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

.search-empty {
  border-radius: 24px;
  color: #6b7280;
  background: #fff;
  box-shadow: var(--card-shadow);
  padding: 54px 20px;
  text-align: center;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-poster-wrap,
  .detail-side {
    max-width: 360px;
  }
}

@media (max-width: 860px) {
  .nav,
  .site-header > .container > .header-inner > .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-content {
    padding: 64px 0 84px;
  }

  .hero-poster-wrap {
    display: none;
  }

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

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

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

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

  .header-inner {
    min-height: 64px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .logo-title {
    font-size: 17px;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section-head {
    display: block;
  }

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

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

  .page-hero {
    padding: 52px 0;
  }

  .info-panel,
  .rank-card {
    padding: 20px;
    border-radius: 18px;
  }
}
