:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --red-50: #fef2f2;
  --blue-600: #2563eb;
  --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 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.22);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.narrow-container {
  width: min(100% - 32px, 960px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
}

.logo-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.26);
}

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

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

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

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  width: 260px;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 10px 13px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.filter-bar button {
  border: 0;
  border-radius: 12px;
  padding: 10px 15px;
  color: var(--white);
  background: var(--red-600);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-bar button:hover {
  background: var(--red-700);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gray-800);
  border-radius: 999px;
}

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

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

.mobile-panel nav {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 16px 0 20px;
  display: grid;
  gap: 10px;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}

.mobile-cats a {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  width: 100%;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 18%, rgba(248, 113, 113, 0.32), transparent 32%),
    linear-gradient(125deg, var(--red-950), var(--red-900) 48%, var(--red-700));
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 84px 0 92px;
}

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

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

.hero-heading h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-heading h1 {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
}

.hero-heading p:not(.eyebrow) {
  margin: 20px auto 0;
  max-width: 680px;
  color: #fee2e2;
  font-size: 1.18rem;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  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(--red-700));
  box-shadow: 0 16px 34px rgba(127, 29, 29, 0.35);
}

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

.ghost-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(12px);
}

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

.hero-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
}

.hero-card img {
  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-main {
  grid-column: span 3;
  grid-row: span 2;
}

.hero-card-mask,
.category-card-mask,
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0));
}

.hero-card-info,
.category-card-text {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  color: var(--white);
}

.hero-card-info strong {
  font-size: 1.12rem;
  line-height: 1.25;
}

.hero-main .hero-card-info strong {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero-card-info em,
.category-card-text em {
  color: #fecaca;
  font-style: normal;
  font-size: 0.9rem;
}

.content-section {
  padding: 64px 0;
}

.soft-bg {
  background: var(--white);
}

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

.section-title h2,
.rank-panel h2,
.detail-article h2,
.side-card h2,
.player-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-title a,
.rank-panel-head a {
  color: var(--red-600);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--gray-900);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.category-card-text strong {
  font-size: 1.1rem;
}

.category-card-text em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

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

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.rank-mark {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-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(--red-800));
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(127, 29, 29, 0.28);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--gray-900);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.42;
  transition: color 0.2s ease;
}

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

.movie-meta {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 0.86rem;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 45px;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--gray-600);
  font-size: 0.92rem;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.side-card,
.detail-article,
.player-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px minmax(0, 1fr) 20px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--gray-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: var(--red-50);
  transform: translateX(3px);
}

.rank-number {
  display: inline-flex;
  justify-content: center;
  color: var(--red-600);
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-content {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.rank-content strong {
  overflow: hidden;
  color: var(--gray-900);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content em {
  overflow: hidden;
  color: var(--gray-500);
  font-size: 0.86rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-arrow {
  color: var(--gray-400);
  font-size: 1.5rem;
}

.full-rank-list {
  gap: 12px;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 18% 18%, rgba(248, 113, 113, 0.28), transparent 34%),
    linear-gradient(135deg, var(--red-950), var(--red-800));
}

.small-hero .container {
  padding: 64px 0;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #fee2e2;
  font-size: 1.08rem;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 190px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--gray-600);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.filter-item.is-hidden {
  display: none;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: var(--white);
  background: var(--gray-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: blur(2px) saturate(1.12);
  transform: scale(1.03);
}

.detail-hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.68) 52%, rgba(3, 7, 18, 0.28)),
    linear-gradient(to top, rgba(3, 7, 18, 1), rgba(3, 7, 18, 0.08));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  padding: 46px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: #fecaca;
  font-weight: 700;
}

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

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

.detail-poster {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.chip-row span,
.tag-links a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.chip-row span {
  padding: 8px 12px;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 28px;
  color: #f3f4f6;
  font-size: 1.12rem;
}

.player-section {
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.36));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
  font-size: 2.1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-button:hover {
  transform: scale(1.07);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.player-copy {
  padding: 22px 24px 26px;
}

.player-copy p {
  margin: 10px 0 0;
  color: var(--gray-600);
}

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

.detail-article,
.side-card {
  padding: 28px;
}

.detail-article h2:not(:first-child) {
  margin-top: 26px;
}

.detail-article p {
  margin: 14px 0 0;
  color: var(--gray-700);
  font-size: 1.03rem;
}

.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tag-links a {
  padding: 8px 12px;
  color: var(--red-700);
  background: var(--red-50);
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--gray-500);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.prev-next {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.prev-next a {
  padding: 12px;
  border-radius: 14px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-weight: 700;
}

.prev-next a:hover {
  color: var(--red-700);
  background: var(--red-50);
}

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

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  color: var(--white);
}

.footer-brand p {
  max-width: 420px;
  margin: 16px 0 0;
  color: var(--gray-300);
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: var(--gray-500);
}

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

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

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

  .mobile-toggle {
    display: block;
  }

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

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

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

  .two-column-layout,
  .detail-text-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

@media (max-width: 560px) {
  .hero-inner {
    padding: 58px 0 66px;
  }

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

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

  .content-section {
    padding: 46px 0;
  }

  .rank-row {
    grid-template-columns: 30px 48px minmax(0, 1fr) 12px;
  }

  .rank-row img {
    width: 48px;
    height: 64px;
  }

  .detail-info h1 {
    font-size: 2.2rem;
  }

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

  .play-button {
    width: 70px;
    height: 70px;
    font-size: 1.7rem;
  }

  .detail-article,
  .side-card {
    padding: 22px;
  }
}
