* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 28px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
  background: linear-gradient(180deg, #fff7f7 0%, #ffffff 18%, #fafafa 100%);
  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: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink-900);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), #fb923c);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
}

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

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

.nav-link {
  font-weight: 650;
  color: var(--ink-700);
  transition: color 180ms ease;
}

.nav-link:hover {
  color: var(--red-600);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--soft);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-700);
  font-weight: 650;
}

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

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

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 28%, rgba(220, 38, 38, 0.48), transparent 32%),
    linear-gradient(180deg, transparent 58%, rgba(17, 24, 39, 0.86) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red-600);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 760px;
  margin: 20px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.rank-meta strong {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 650;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 750;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.26);
}

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

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section,
.sub-hero,
.detail-hero,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding-bottom: 24px;
}

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

.inline-head {
  align-items: center;
}

.section-head h2,
.sub-hero h1,
.detail-info h1,
.story-card h2,
.info-card h2 {
  margin: 10px 0 0;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-kicker {
  color: var(--red-700);
  background: var(--red-100);
}

.section-more {
  color: var(--red-700);
  background: var(--red-50);
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
}

.search-label input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink-900);
  background: #ffffff;
  outline: none;
}

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

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.filter-empty {
  margin: 14px 0 0;
  color: var(--red-700);
  font-weight: 700;
}

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

.category-chip,
.year-grid a,
.category-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-chip {
  min-height: 132px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-chip:hover,
.movie-card:hover,
.rank-item:hover,
.year-grid a:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

.category-chip span,
.category-card strong,
.year-grid span {
  color: var(--ink-500);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.poster-link img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(248, 113, 113, 0.5), transparent 35%),
    linear-gradient(135deg, #111827, #7f1d1d);
}

.poster-link img {
  position: relative;
  z-index: 1;
  transition: transform 360ms ease;
}

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

.poster-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 13px;
  font-weight: 750;
}

.card-body {
  padding: 14px;
}

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.card-meta span,
.rank-meta span,
.rank-meta strong {
  color: var(--ink-500);
  background: var(--soft);
  padding: 4px 8px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.24;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.category-card-links a:hover {
  color: var(--red-700);
}

.movie-card p,
.rank-info p,
.sub-hero p,
.detail-one-line,
.story-card p,
.site-footer p {
  color: var(--ink-500);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.card-tags,
.detail-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.detail-tags span,
.mini-tags span {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--red-700);
  background: var(--red-50);
  font-size: 12px;
  font-weight: 700;
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.rank-panel,
.story-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  padding: 18px;
  position: sticky;
  top: 88px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.full-rank-list .rank-item {
  grid-template-columns: 110px 1fr;
}

.rank-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.rank-cover span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red-600);
  font-size: 13px;
  font-weight: 850;
}

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

.rank-info p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.sub-hero {
  margin-top: 34px;
  padding: 64px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(248, 113, 113, 0.45), transparent 32%),
    linear-gradient(135deg, #111827 0%, #7f1d1d 60%, #dc2626 100%);
  box-shadow: var(--shadow);
}

.sub-hero h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 60px);
}

.sub-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.category-card {
  padding: 18px;
}

.category-card-main {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.category-card-main span {
  font-size: 22px;
  font-weight: 850;
}

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

.category-card-links a {
  color: var(--ink-700);
  font-size: 14px;
}

.year-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  color: var(--ink-500);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 28px;
  padding: 32px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 25% 20%, rgba(248, 113, 113, 0.42), transparent 32%),
    linear-gradient(135deg, #111827, #7f1d1d 72%, #b91c1c);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 68px);
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.detail-info .primary-button {
  width: fit-content;
  margin-top: 24px;
}

.player-section {
  padding-bottom: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.6));
  cursor: pointer;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red-600);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.32);
  font-size: 34px;
}

.player-start strong {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

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

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

.story-card,
.info-card {
  padding: 22px;
}

.story-card p {
  margin: 14px 0 0;
  white-space: pre-line;
}

.info-card dl {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.info-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
}

.info-card dt {
  color: var(--ink-500);
  font-weight: 750;
}

.info-card dd {
  margin: 0;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ink-700);
  background: var(--soft);
  font-weight: 650;
}

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

[hidden] {
  display: none !important;
}

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

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

  .section-split,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-button {
    display: inline-block;
  }

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

  .hero-arrow {
    display: none;
  }

  .hero-content {
    justify-content: end;
    padding-bottom: 86px;
  }

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

  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .sub-hero {
    padding: 42px 24px;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .movie-grid-small,
  .category-grid,
  .category-overview-grid,
  .year-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .full-rank-list .rank-item {
    grid-template-columns: 82px 1fr;
  }

  .section,
  .sub-hero,
  .detail-hero,
  .breadcrumb {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 38px 0;
  }

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

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