:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 18px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--red-900), var(--red-700));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-icon,
.footer-logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--white);
  color: var(--red-800);
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-copy small {
  display: block;
  margin-top: 2px;
  color: #fee2e2;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.main-nav a {
  color: #fff7f7;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.header-search input,
.large-search input,
.filter-fields input,
.filter-fields select {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
}

.header-search input:focus,
.large-search input:focus,
.filter-fields input:focus,
.filter-fields select:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.header-search button,
.large-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--red-600);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  margin-left: auto;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 11px;
}

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--gray-950), var(--gray-800));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.45), rgba(17, 24, 39, 0.1));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1280px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--white);
  background: var(--red-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  color: var(--white);
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.meta-pills,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.meta-pills span,
.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(220, 38, 38, 0.86);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.panel-link {
  color: var(--white);
  background: var(--red-600);
  box-shadow: var(--shadow-md);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  display: flex;
  gap: 8px;
  z-index: 6;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: var(--white);
}

.hero-category-links {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(900px, calc(100% - 120px));
}

.hero-category-links a {
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 700;
}

main,
.page-main,
.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

main {
  padding-bottom: 56px;
}

.search-band,
.section-block,
.filter-panel,
.detail-layout,
.player-section,
.breadcrumbs {
  margin-top: 34px;
}

.search-band,
.filter-panel,
.rank-panel,
.detail-info,
.detail-poster,
.category-card,
.movie-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
}

.search-band h2,
.section-title-row h2,
.rank-panel h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  line-height: 1.18;
}

.large-search {
  display: flex;
  gap: 10px;
}

.large-search input {
  flex: 1;
  min-width: 0;
}

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

.section-title-row a {
  color: var(--red-700);
  font-weight: 800;
}

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

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

.category-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 112px;
  background: var(--gray-200);
  overflow: hidden;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-title {
  padding: 14px 14px 4px;
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 900;
}

.category-intro {
  padding: 0 14px 16px;
  color: var(--gray-600);
  font-size: 13px;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.play-mark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(220, 38, 38, 0.9);
  box-shadow: var(--shadow-md);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, #f97316, var(--red-600));
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px;
}

.movie-card-body strong {
  color: var(--gray-900);
  font-size: 16px;
  line-height: 1.35;
}

.meta-line,
.summary-line,
.rank-row em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.summary-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin: 18px 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--red-600);
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 74px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.page-hero {
  margin-top: 34px;
  border-radius: 28px;
  padding: 56px;
  color: var(--gray-900);
  background: linear-gradient(135deg, #ffffff, #fff7ed, #fee2e2);
  box-shadow: var(--shadow-sm);
}

.red-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-800), var(--red-600));
}

.red-hero .section-kicker {
  background: rgba(255, 255, 255, 0.2);
}

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  font-size: 18px;
}

.filter-panel {
  padding: 22px;
}

.filter-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
}

.wide-fields {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.filter-fields label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-fields input,
.filter-fields select {
  width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-600);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--red-700);
  font-weight: 800;
}

.player-section {
  overflow: hidden;
  border-radius: 24px;
  background: var(--gray-950);
  box-shadow: var(--shadow-xl);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  z-index: 3;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-600);
  font-size: 34px;
  box-shadow: var(--shadow-xl);
}

.player-start strong {
  font-size: 22px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.player-start.is-hidden {
  display: none;
}

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

.detail-poster {
  overflow: hidden;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.detail-info h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-info p {
  color: var(--gray-700);
  font-size: 16px;
}

.lead-text {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #fff1f2;
  color: var(--gray-900) !important;
  font-weight: 700;
}

.meta-pills {
  margin-top: 16px;
}

.tag-list {
  margin-top: 22px;
}

.tag-list span {
  background: var(--gray-100);
  color: var(--red-700);
}

.site-footer {
  margin-top: 72px;
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
}

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

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

.footer-brand p {
  margin: 8px 0 0;
  max-width: 520px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 16px;
  text-align: center;
  color: #cbd5e1;
}

[data-filter-card].is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 60px;
  }

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

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 60px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--red-800);
    box-shadow: var(--shadow-md);
  }

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

  .main-nav a {
    padding: 12px 4px;
  }

  .hero-slider {
    height: 620px;
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 88px;
  }

  .hero-category-links {
    width: calc(100% - 32px);
  }

  .hero-arrow {
    top: auto;
    bottom: 90px;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

  .search-band,
  .filter-fields,
  .wide-fields,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
  }

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

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

  .page-hero {
    padding: 34px 24px;
  }

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 520px) {
  main,
  .page-main,
  .detail-main,
  .header-inner,
  .footer-inner {
    width: min(100% - 22px, 1280px);
  }

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

  .brand-copy small {
    font-size: 11px;
  }

  .hero-slider {
    height: 660px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

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

  .hero-category-links {
    bottom: 18px;
  }

  .player-start span {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .detail-info {
    padding: 22px;
  }
}
