:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --gray-950: #09090b;
  --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: 0 10px 30px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 18px 45px rgba(127, 29, 29, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-950);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  box-shadow: var(--shadow-soft);
}

.brand-text {
  font-size: 20px;
  letter-spacing: 0.04em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 5px 6px 5px 16px;
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gray-800);
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 9px 0;
  color: var(--gray-700);
  font-weight: 600;
}

.mobile-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  padding-top: 8px;
}

.hero-section {
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.55), transparent 32%), linear-gradient(125deg, var(--red-900), var(--red-700) 52%, var(--gray-950));
}

.hero-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.hero-heading {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red-100);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.hero-heading p,
.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  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: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  box-shadow: var(--shadow-soft);
}

.btn.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--gray-900);
  box-shadow: var(--shadow-soft);
}

.hero-large {
  grid-column: span 3;
  grid-row: span 2;
  min-height: 456px;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.hero-card:hover img {
  transform: scale(1.08);
  opacity: 0.92;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08) 62%);
}

.hero-label,
.card-badge,
.score-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.hero-label {
  top: 14px;
  left: 14px;
  background: rgba(220, 38, 38, 0.92);
}

.hero-card-text {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}

.hero-card-text h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-card-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.white-section {
  background: var(--white);
}

.soft-section {
  background: var(--gray-50);
}

.gradient-section {
  background: linear-gradient(180deg, var(--gray-50), var(--white));
}

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

.section-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

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

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

.category-tile {
  min-height: 128px;
  border-radius: 18px;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview:hover,
.movie-card:hover,
.feature-row:hover,
.ranking-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(17, 24, 39, 0.18);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-900);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-badge {
  top: 12px;
  right: 12px;
  background: rgba(220, 38, 38, 0.92);
}

.score-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.tag-row em {
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-style: normal;
  font-size: 12px;
  padding: 5px 9px;
}

.rail {
  display: flex;
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.rail-card {
  width: 300px;
  flex: 0 0 300px;
  scroll-snap-align: start;
}

.feature-list {
  display: grid;
  gap: 18px;
}

.feature-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-row img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.feature-row div {
  padding: 24px 24px 24px 0;
}

.feature-row span {
  color: var(--red-700);
  font-weight: 800;
  font-size: 13px;
}

.feature-row h3 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.feature-row p {
  margin: 0;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-panel {
  display: grid;
  gap: 12px;
}

.ranking-panel.wide {
  max-width: 980px;
  margin: 0 auto;
}

.ranking-item {
  display: grid;
  grid-template-columns: 48px 96px 1fr auto;
  align-items: center;
  gap: 16px;
  border-radius: 16px;
  padding: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-dot {
  width: 10px;
  height: 10px;
  margin: auto;
}

.ranking-item img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-item h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-item p {
  margin: 0 0 4px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-item strong {
  color: var(--red-700);
  font-size: 22px;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(125deg, var(--red-900), var(--red-700), var(--gray-950));
}

.page-hero.compact {
  padding: 56px 24px;
}

.page-hero.compact > div {
  max-width: 1280px;
  margin: 0 auto;
}

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

.category-overview {
  display: block;
  border-radius: 20px;
  padding: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  height: 110px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-900);
}

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

.category-overview h2 {
  margin: 0 0 8px;
}

.category-overview p {
  margin: 0;
  color: var(--gray-600);
}

.filter-bar,
.search-box-large {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.filter-bar label {
  display: grid;
  gap: 7px;
  color: var(--gray-700);
  font-weight: 700;
}

.filter-bar input,
.filter-bar select,
.search-box-large input,
.search-box-large select {
  min-height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
}

.filter-bar input,
.search-box-large input {
  min-width: 320px;
}

.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 85% 10%, rgba(239, 68, 68, 0.55), transparent 34%), linear-gradient(125deg, var(--gray-950), var(--red-900));
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: var(--gray-900);
}

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

.detail-poster span {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-600);
  font-size: 20px;
  font-weight: 900;
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags span {
  color: var(--red-100);
  background: rgba(255, 255, 255, 0.13);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  aspect-ratio: 16 / 9;
}

.site-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--white);
  background: radial-gradient(circle at 50% 45%, rgba(220, 38, 38, 0.65), rgba(0, 0, 0, 0.78));
  border: 0;
  cursor: pointer;
  text-align: center;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--red-700);
  background: var(--white);
  font-size: 32px;
  box-shadow: var(--shadow-soft);
}

.play-title {
  font-size: 22px;
  font-weight: 900;
}

.article-section {
  max-width: none;
}

.detail-article {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article h2 + p {
  margin-top: 0;
}

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

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

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

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px 20px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: var(--gray-500);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1080px) {
  .main-nav,
  .header-search {
    display: none;
  }

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

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

  .hero-large {
    grid-column: span 2;
  }

  .feature-row,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-row div {
    padding: 0 22px 22px;
  }

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

@media (max-width: 680px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .hero-shell,
  .section,
  .detail-shell,
  .page-hero.compact {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-grid,
  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero-large {
    grid-column: span 1;
    min-height: 320px;
  }

  .hero-card {
    min-height: 260px;
  }

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

  .filter-bar,
  .search-box-large {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar input,
  .search-box-large input {
    min-width: 0;
    width: 100%;
  }

  .ranking-item {
    grid-template-columns: 38px 72px 1fr;
  }

  .ranking-item strong {
    grid-column: 3;
    justify-self: start;
  }

  .ranking-item img {
    width: 72px;
    height: 56px;
  }

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

  .detail-article {
    padding: 24px;
  }
}
