:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-strong: rgba(30, 41, 59, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --primary: #ef4444;
  --primary-dark: #b91c1c;
  --primary-soft: rgba(239, 68, 68, 0.16);
  --gold: #f59e0b;
  --blue: #38bdf8;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  --radius: 24px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  color: white;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.36);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-size: 14px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: white;
  background: rgba(239, 68, 68, 0.18);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  margin: 28px 0 26px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.62fr;
  gap: 36px;
  align-items: center;
  padding: 68px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

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

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

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-line,
.page-hero p,
.detail-one-line {
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 22px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.home-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.home-search-form button {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.28);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.home-search-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(360px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.90);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 68px;
  bottom: 36px;
  display: flex;
  gap: 8px;
  z-index: 4;
}

.hero-dots button {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: white;
}

.quick-search-panel,
.content-section,
.category-overview-block,
.page-hero,
.detail-hero,
.player-section,
.detail-grid {
  margin: 26px 0;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.home-search-form,
.toolbar label {
  display: flex;
  gap: 12px;
  align-items: center;
}

.home-search-form input,
.toolbar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  outline: 0;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 18px;
}

.home-search-form input:focus,
.toolbar input:focus {
  border-color: rgba(239, 68, 68, 0.78);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

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

.section-heading h2,
.ranking-panel h2,
.detail-article h2,
.detail-info-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p,
.ranking-panel p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading a {
  color: #fecaca;
  font-weight: 800;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.52);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

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

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

.play-mark,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.84);
  border-radius: 50%;
  color: white;
  background: rgba(239, 68, 68, 0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  background: linear-gradient(135deg, var(--gold), var(--primary));
  font-size: 12px;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
}

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

.movie-card h3 a:hover {
  color: #fca5a5;
}

.movie-card p {
  min-height: 4.8em;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.movie-card.is-compact p {
  min-height: 4.2em;
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.56);
}

.category-tile span,
.category-tile em {
  color: #fecaca;
  font-style: normal;
  font-weight: 800;
}

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

.ranking-panel,
.ranking-table-panel,
.detail-info-card,
.detail-article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.ranking-panel,
.detail-info-card {
  padding: 22px;
}

.ranking-mini-list,
.ranking-row-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.ranking-mini-item,
.ranking-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.35);
}

.ranking-mini-item:hover,
.ranking-row:hover {
  background: rgba(239, 68, 68, 0.12);
}

.ranking-mini-item span,
.ranking-number {
  color: #fca5a5;
  font-weight: 900;
}

.ranking-mini-item em,
.ranking-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-row {
  grid-template-columns: 52px 1fr 1.2fr 58px;
}

.ranking-row b {
  color: #fbbf24;
  text-align: right;
}

.page-hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.44)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.24), transparent 20rem);
  box-shadow: var(--shadow);
}

.hero-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-stat-row span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.84);
}

.toolbar label {
  flex: 1;
}

.toolbar label span {
  color: #fca5a5;
  font-weight: 800;
  white-space: nowrap;
}

.sticky-toolbar {
  position: sticky;
  top: 82px;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.category-overview-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fca5a5;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.28)),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.18), transparent 24rem);
  box-shadow: var(--shadow);
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

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

.detail-cover span {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-weight: 900;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.player-box {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.52), rgba(15, 23, 42, 0.86)),
    radial-gradient(circle, rgba(239, 68, 68, 0.28), transparent 18rem);
}

.player-start span {
  width: 88px;
  height: 88px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.38);
  font-size: 34px;
}

.player-start strong {
  font-size: 28px;
}

.player-start em {
  color: #cbd5e1;
  font-style: normal;
}

.player-start.is-hidden {
  display: none;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  color: #fecaca;
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}

.detail-article {
  padding: 28px;
}

.detail-article p {
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.9;
}

.detail-info-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px 14px;
  margin: 18px 0 0;
}

.detail-info-card dt {
  color: #fca5a5;
  font-weight: 800;
}

.detail-info-card dd {
  margin: 0;
  color: #e2e8f0;
}

.site-footer {
  margin-top: 70px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.58);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.site-footer h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

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

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(239, 68, 68, 0.86);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.back-to-top.is-visible {
  display: block;
}

[hidden] {
  display: none !important;
}

.full-button {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .featured-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  main,
  .header-inner,
  .footer-grid {
    width: min(100% - 24px, 760px);
  }

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

  .site-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.98);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .hero-slide,
  .quick-search-panel,
  .split-layout,
  .detail-hero,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    padding: 34px;
  }

  .hero-poster {
    justify-self: start;
    width: min(250px, 76%);
  }

  .hero-dots {
    left: 34px;
  }

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

  .detail-hero {
    padding: 22px;
  }

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

@media (max-width: 620px) {
  main,
  .header-inner,
  .footer-grid {
    width: calc(100% - 18px);
  }

  .brand {
    font-size: 15px;
  }

  .hero-carousel {
    min-height: 660px;
    border-radius: 22px;
  }

  .hero-slide,
  .page-hero {
    padding: 22px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .home-search-form,
  .toolbar,
  .toolbar label,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .large-grid,
  .mini-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .ranking-row em {
    grid-column: 2 / -1;
  }

  .player-box,
  .player-box video {
    min-height: 310px;
  }
}
