:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-dark: #0f172a;
  --color-red: #dc2626;
  --color-red-dark: #b91c1c;
  --color-red-soft: #fee2e2;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--color-red);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.logo-text {
  display: grid;
  line-height: 1.2;
}

.logo-text strong {
  font-size: 20px;
}

.logo-text small {
  color: var(--color-muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-size: 15px;
  white-space: nowrap;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.text-link:hover {
  color: var(--color-red);
}

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-nav input,
.search-large input,
.filter-panel input {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-text);
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.nav-search input {
  width: 210px;
  padding: 10px 16px;
}

.nav-search button,
.mobile-nav button,
.search-large button {
  border: 0;
  color: #ffffff;
  background: var(--color-red);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.nav-search input:focus,
.mobile-nav input:focus,
.search-large input:focus,
.filter-panel input:focus {
  border-color: var(--color-red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--color-border);
  background: #ffffff;
}

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

.mobile-nav a {
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 12px;
}

.mobile-nav form {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.mobile-nav input {
  width: 100%;
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: var(--color-dark);
}

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

.hero-slide {
  display: flex;
  align-items: flex-end;
  min-height: 650px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: end;
  gap: 46px;
  padding: 120px 0 72px;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.88);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 22px);
}

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

.hero-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

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

.button-primary {
  color: #ffffff;
  background: var(--color-red);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.button-primary:hover {
  background: var(--color-red-dark);
}

.button-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.hero-poster {
  overflow: hidden;
  width: 260px;
  aspect-ratio: 2 / 3;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--color-red);
}

.section {
  padding: 58px 0;
}

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

.section-heading h1,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-heading p,
.page-hero p {
  margin: 10px 0 0;
  color: var(--color-muted);
}

.section-eyebrow {
  color: var(--color-red);
  background: var(--color-red-soft);
}

.text-link {
  color: var(--color-red);
  font-weight: 800;
  white-space: nowrap;
}

.hot-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.rank-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #fff7f7;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--color-red);
  border-radius: 14px;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-score {
  color: var(--color-muted);
  font-size: 13px;
}

.hot-feature,
.content-card,
.filter-panel,
.category-overview-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hot-feature {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  padding: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.42), transparent 34%),
    linear-gradient(135deg, #111827, #7f1d1d);
}

.hot-feature span {
  color: #fecaca;
  font-weight: 800;
}

.hot-feature h3 {
  margin: 12px 0;
  font-size: 34px;
}

.hot-feature p {
  color: #f3f4f6;
}

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

.category-card {
  overflow: hidden;
  position: relative;
  min-height: 260px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.category-count {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 10px;
  color: var(--color-red);
  background: var(--color-red-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.category-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.category-images img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

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

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 34px;
  opacity: 0;
  transition: opacity 0.2s;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

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

.movie-card-body h3 {
  min-height: 52px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card .movie-meta span {
  background: #f3f4f6;
  color: #4b5563;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  padding: 4px 8px;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 999px;
  font-size: 12px;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  padding: 74px 0;
}

.page-hero-dark {
  background: linear-gradient(135deg, #111827, #374151);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--color-muted);
}

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

.breadcrumb-light {
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb-light a:hover {
  color: #ffffff;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 22px;
}

.filter-panel h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.filter-panel p {
  margin: 0;
  color: var(--color-muted);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  min-width: min(380px, 100%);
  color: var(--color-muted);
  font-size: 14px;
}

.filter-panel input {
  width: 100%;
  padding: 12px 16px;
}

.category-overview {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 26px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-head span {
  color: var(--color-red);
  font-weight: 800;
}

.category-overview-head h2 {
  margin: 4px 0;
  font-size: 30px;
}

.category-overview-head p {
  margin: 0;
  color: var(--color-muted);
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

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

.ranking-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  color: #ffffff;
  background: var(--color-red);
  border-radius: 999px;
  font-weight: 900;
}

.ranking-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ranking-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--color-red);
}

.ranking-body h2 {
  margin: 10px 0;
}

.ranking-body h2 a:hover {
  color: var(--color-red);
}

.ranking-body p {
  color: var(--color-muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-bg {
  background-position: center;
  background-size: cover;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-mask {
  background:
    radial-gradient(circle at top left, rgba(220, 38, 38, 0.36), transparent 38%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.64));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 62px 0;
}

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

.detail-poster {
  width: 300px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.detail-copy p {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 19px;
}

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

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

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

.video-overlay-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-red);
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.36);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.video-shell.is-playing .video-overlay-button {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

.content-card h1,
.content-card h2 {
  margin: 0 0 14px;
}

.content-card p {
  margin: 0;
  color: #374151;
}

.info-table {
  grid-column: 1 / -1;
}

.info-table dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 18px;
  margin: 0;
}

.info-table dt {
  color: var(--color-muted);
}

.info-table dd {
  margin: 0;
  font-weight: 700;
}

.info-table a {
  color: var(--color-red);
}

.search-large {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.search-large input {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: 18px;
}

.search-large button {
  border-radius: var(--radius-md);
  padding: 0 28px;
  font-weight: 800;
}

.search-status {
  margin-bottom: 24px;
  color: var(--color-muted);
}

.narrow-page {
  max-width: 850px;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 54px 0;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

.footer-logo span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--color-red);
  border-radius: 12px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer p,
.site-footer ul {
  margin: 0;
}

.site-footer ul {
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: #ffffff;
}

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

.is-hidden-by-filter {
  display: none !important;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

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

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

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-bottom: 90px;
  }

  .hero-poster {
    display: none;
  }

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

  .section-heading,
  .filter-panel,
  .category-overview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-card {
    grid-template-columns: 120px 1fr;
  }

  .detail-poster {
    width: min(260px, 100%);
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 22px, var(--container));
  }

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

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

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .rank-row {
    grid-template-columns: 48px 1fr;
  }

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

  .ranking-card {
    grid-template-columns: 1fr;
  }

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

  .search-large button {
    min-height: 50px;
  }

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