:root {
  --red-950: #450a0a;
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--red-700), var(--red-800));
  box-shadow: 0 12px 26px rgba(127, 29, 29, 0.3);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--red-900);
  background: var(--yellow-400);
  border-radius: 12px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

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

.nav-link,
.mobile-link {
  color: var(--white);
  font-weight: 700;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--yellow-300);
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

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

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

.mobile-link {
  padding: 10px 12px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--red-950);
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.04);
  transform: scale(1.02);
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(250, 204, 21, 0.26), transparent 28%), rgba(0, 0, 0, 0.22);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 340px;
  align-items: center;
  gap: 52px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: var(--yellow-300);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2.2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.primary-btn {
  color: var(--slate-900);
  background: var(--yellow-400);
  box-shadow: 0 14px 30px rgba(250, 204, 21, 0.32);
}

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

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

.hero-poster,
.detail-cover {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  cursor: pointer;
  border: 0;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

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

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

.hero-dot.active {
  width: 28px;
  background: var(--yellow-400);
}

.stats-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stats-strip a {
  padding: 22px;
  color: var(--gray-800);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.stats-strip a:hover {
  transform: translateY(-3px);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  font-size: 22px;
}

.stats-strip span {
  margin-top: 4px;
  color: var(--gray-500);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.content-section.tinted {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fef2f2 48%, #f8fafc);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 18px;
}

.section-more {
  color: var(--red-700);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.play-badge {
  position: absolute;
  inset: auto 12px 12px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--slate-900);
  background: var(--yellow-400);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}

.card-body {
  padding: 13px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-meta {
  margin-bottom: 7px;
  color: var(--gray-500);
  font-size: 12px;
}

.movie-card h3 {
  margin: 0;
  color: var(--gray-800);
  font-size: 16px;
  line-height: 1.35;
}

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

.movie-card p {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  padding: 3px 7px;
  color: var(--red-700);
  background: #fee2e2;
  font-size: 12px;
}

.compact .card-body {
  padding: 11px;
}

.compact p {
  display: none;
}

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

.category-tile {
  min-height: 178px;
  padding: 24px;
  color: var(--gray-800);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  color: var(--yellow-400);
  background: var(--red-700);
  border-radius: 16px;
}

.category-tile strong,
.category-tile small {
  display: block;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile small {
  margin-top: 8px;
  color: var(--gray-500);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-900), var(--red-700), var(--slate-900));
}

.page-hero {
  padding: 74px max(16px, calc((100% - 1180px) / 2));
}

.small-hero,
.category-hero,
.rank-hero,
.search-hero,
.archive-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.category-cover {
  overflow: hidden;
  border-radius: 16px;
}

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

.category-overview-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-overview-card p {
  margin: 8px 0 14px;
  color: var(--gray-500);
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  padding: 5px 9px;
  color: var(--red-700);
  background: #fee2e2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.large-filter {
  grid-template-columns: 1fr 220px 220px;
}

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

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--gray-800);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--red-600);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 86px 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.rank-poster {
  overflow: hidden;
  border-radius: 14px;
}

.rank-poster img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.rank-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--slate-900);
  background: var(--yellow-400);
  border-radius: 16px;
  font-size: 24px;
  font-weight: 900;
}

.rank-info h3 {
  margin: 0;
  font-size: 22px;
}

.rank-info p {
  margin: 8px 0;
  color: var(--gray-500);
}

.rank-meta span,
.rank-meta strong,
.detail-meta span {
  padding: 4px 9px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 13px;
}

.rank-meta strong {
  color: var(--red-700);
  background: #fee2e2;
}

.archive-section {
  display: grid;
  gap: 24px;
}

.archive-year {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.archive-year h2 {
  margin: 0 0 16px;
  color: var(--red-700);
  font-size: 32px;
}

.archive-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.archive-link {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.archive-link span,
.archive-link small {
  display: block;
}

.archive-link span {
  font-weight: 800;
}

.archive-link small {
  margin-top: 3px;
  color: var(--gray-500);
}

.detail-hero {
  min-height: 560px;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: center;
  gap: 44px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

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

.detail-meta {
  margin-top: 18px;
}

.detail-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  background: #000;
  object-fit: contain;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--slate-900);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.36));
  cursor: pointer;
}

.play-trigger span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  background: var(--yellow-400);
  border-radius: 999px;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.player-shell.is-playing .play-trigger {
  display: none;
}

.story-card,
.side-card {
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.story-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.side-card dl,
.side-card dd {
  margin: 0;
}

.side-card dl {
  display: grid;
  gap: 12px;
}

.side-card dl div {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.side-card dt {
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 800;
}

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

.rank-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--slate-900);
  background: var(--yellow-400);
  border-radius: 14px;
  font-weight: 900;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: var(--slate-950);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

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

.site-footer p {
  max-width: 440px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

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

  .hero-poster,
  .detail-cover {
    display: none;
  }

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

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

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

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

  .hero-content,
  .detail-inner {
    gap: 0;
  }

  .stats-strip,
  .overview-grid,
  .footer-inner,
  .footer-bottom,
  .filter-bar,
  .large-filter {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
  }

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

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

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

  .category-overview-card,
  .rank-item {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .rank-index {
    position: absolute;
    margin-left: 46px;
    margin-top: -46px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .rank-info {
    grid-column: 2;
  }

  .archive-links {
    grid-template-columns: 1fr;
  }

  .player-shell,
  .movie-video {
    min-height: 260px;
  }
}
