:root {
  color-scheme: dark;
  --site-red: #dc2626;
  --site-red-strong: #b91c1c;
  --site-orange: #f97316;
  --site-blue: #60a5fa;
  --site-yellow: #facc15;
  --site-bg: #030712;
  --site-bg-soft: #111827;
  --site-card: #1f2937;
  --site-card-strong: #273449;
  --site-text: #f9fafb;
  --site-muted: #9ca3af;
  --site-line: rgba(255, 255, 255, 0.08);
  --site-shadow: 0 22px 45px rgba(0, 0, 0, 0.36);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.16), transparent 30rem), linear-gradient(180deg, #111827 0%, #030712 55%, #111827 100%);
  color: var(--site-text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img.image-hidden {
  opacity: 0;
}

.site-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.94), rgba(0, 0, 0, 0.98) 46%, rgba(17, 24, 39, 0.96));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(31, 41, 55, 0.98), rgba(17, 24, 39, 0.98));
  border-bottom: 1px solid rgba(75, 85, 99, 0.75);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.page-container {
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
}

.header-inner {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-red), var(--site-orange));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.logo-text {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ef4444, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav a,
.mobile-menu a,
.footer a {
  color: #d1d5db;
  transition: color 180ms ease, transform 180ms ease, background 180ms ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.footer a:hover {
  color: #ffffff;
}

.desktop-nav a:hover {
  transform: translateY(-1px) scale(1.04);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-search,
.search-panel form {
  position: relative;
}

.header-search input,
.search-panel input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.85);
  background: rgba(55, 65, 81, 0.96);
  color: #ffffff;
  border-radius: 999px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-search input {
  width: 16rem;
  padding: 0.56rem 1rem 0.56rem 2.4rem;
}

.header-search input:focus,
.search-panel input:focus,
.filter-select:focus {
  border-color: var(--site-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.26);
  background: rgba(31, 41, 55, 0.98);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.menu-button {
  display: none;
  color: #ffffff;
  font-size: 1.35rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
}

.menu-button:hover {
  color: #ef4444;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(75, 85, 99, 0.75);
  background: rgba(17, 24, 39, 0.98);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  width: min(100% - 2rem, 1280px);
  margin-inline: auto;
  padding: 1rem 0 1.15rem;
  display: grid;
  gap: 1rem;
}

.mobile-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.mobile-links a {
  padding: 0.7rem 0.6rem;
  border-radius: 0.75rem;
  text-align: center;
  background: rgba(31, 41, 55, 0.88);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 34rem;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.78) 18%, rgba(0, 0, 0, 0.45) 58%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: absolute;
  left: max(1rem, calc((100% - 1280px) / 2 + 1rem));
  right: max(1rem, calc((100% - 1280px) / 2 + 1rem));
  bottom: 4.5rem;
  z-index: 2;
  max-width: 48rem;
}

.hero-badge,
.card-badge,
.detail-badge,
.rank-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-badge {
  margin-bottom: 1rem;
  padding: 0.45rem 1rem;
  background: var(--site-red);
  color: #ffffff;
  font-size: 0.9rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.hero-copy {
  max-width: 42rem;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 1.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: #d1d5db;
}

.hero-meta {
  margin-bottom: 1.5rem;
}

.btn-primary,
.btn-secondary,
.page-btn,
.play-button,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary,
.play-button,
.search-button {
  background: var(--site-red);
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.3);
}

.btn-primary {
  padding: 0.86rem 1.75rem;
}

.btn-primary:hover,
.play-button:hover,
.search-button:hover {
  background: var(--site-red-strong);
  transform: translateY(-1px) scale(1.03);
}

.btn-secondary {
  padding: 0.78rem 1.4rem;
  background: rgba(31, 41, 55, 0.94);
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.btn-secondary:hover {
  color: #ffffff;
  border-color: rgba(96, 165, 250, 0.55);
}

.hero-dots {
  position: absolute;
  right: max(1rem, calc((100% - 1280px) / 2 + 1rem));
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 2.1rem;
  background: var(--site-red);
}

.page-main {
  padding: 3rem 0 4rem;
}

.section-stack {
  display: grid;
  gap: 4rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-kicker {
  color: var(--site-red);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.section-title {
  color: #ffffff;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.1;
  font-weight: 900;
}

.section-desc {
  color: var(--site-muted);
  margin-top: 0.55rem;
  max-width: 46rem;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.96), rgba(17, 24, 39, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.75);
  box-shadow: var(--site-shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.2), rgba(17, 24, 39, 0.95));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease, opacity 180ms ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.09);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent 58%);
  opacity: 0.78;
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.25rem 0.55rem;
  color: #ffffff;
  font-size: 0.72rem;
  background: var(--site-red);
}

.card-duration {
  position: absolute;
  z-index: 2;
  right: 0.65rem;
  bottom: 0.65rem;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
}

.play-dot {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
}

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

.card-body {
  padding: 1rem;
  display: grid;
  gap: 0.62rem;
}

.card-title {
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 180ms ease;
}

.movie-card:hover .card-title {
  color: #ef4444;
}

.card-copy {
  min-height: 2.65rem;
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.48;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #9ca3af;
  font-size: 0.82rem;
  gap: 0.55rem;
}

.scroller {
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.scroller-row {
  display: flex;
  gap: 1rem;
}

.scroller-row .movie-card {
  flex: 0 0 18rem;
}

.feature-band {
  padding: 2rem;
  border-radius: 1.5rem;
  background: linear-gradient(90deg, rgba(30, 58, 138, 0.22), rgba(88, 28, 135, 0.2));
  border: 1px solid rgba(96, 165, 250, 0.08);
}

.content-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(20rem, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: 0.9rem;
  background: rgba(31, 41, 55, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rank-card:hover {
  transform: translateX(3px);
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(39, 52, 73, 0.95);
}

.rank-num {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--site-red), var(--site-orange));
  color: #ffffff;
  font-weight: 900;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: #9ca3af;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.rank-label {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.18);
  border: 1px solid rgba(220, 38, 38, 0.28);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.6rem;
  min-height: 17rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.34), transparent 28rem), linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(3, 7, 18, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--site-shadow);
  margin-bottom: 2rem;
}

.page-hero h1 {
  max-width: 56rem;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 52rem;
  color: #d1d5db;
  margin-top: 1rem;
  font-size: 1.05rem;
}

.category-cloud,
.tag-row,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.category-chip,
.tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(31, 41, 55, 0.9);
  color: #d1d5db;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.category-chip {
  padding: 0.65rem 1rem;
  font-weight: 700;
}

.tag-chip {
  padding: 0.38rem 0.75rem;
  font-size: 0.86rem;
}

.category-chip:hover,
.tag-chip:hover {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(239, 68, 68, 0.75);
  transform: translateY(-1px);
}

.pagination {
  margin-top: 2rem;
  align-items: center;
  justify-content: center;
}

.page-btn {
  min-width: 2.4rem;
  min-height: 2.4rem;
  padding: 0.55rem 0.85rem;
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(31, 41, 55, 0.92);
}

.page-btn:hover,
.page-btn.is-active {
  color: #ffffff;
  border-color: var(--site-red);
  background: var(--site-red);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #000000;
  box-shadow: var(--site-shadow);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.28));
  transition: opacity 220ms ease, visibility 220ms ease;
}

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

.play-button {
  padding: 0.95rem 1.6rem;
  font-size: 1.02rem;
}

.detail-panel,
.info-card,
.search-panel,
.category-panel {
  border-radius: 1.25rem;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.detail-panel {
  padding: 1.3rem;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 1.15rem 0 0.9rem;
}

.detail-badge {
  padding: 0.42rem 0.9rem;
  background: var(--site-red);
  color: #ffffff;
}

.detail-meta {
  color: #d1d5db;
  margin-bottom: 1rem;
}

.detail-copy {
  color: #d1d5db;
  line-height: 1.8;
}

.detail-section {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.info-card {
  padding: 1.4rem;
}

.info-card h2,
.info-card h3 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.info-card p {
  color: #d1d5db;
  line-height: 1.85;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25), rgba(17, 24, 39, 0.92));
}

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

.search-panel {
  padding: 1.3rem;
  margin-bottom: 2rem;
}

.search-panel form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.search-panel input {
  padding: 0.85rem 1.15rem;
}

.search-button {
  padding: 0.8rem 1.35rem;
}

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

.filter-select {
  padding: 0.7rem 1rem;
  border-radius: 0.85rem;
}

.footer {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(0, 0, 0, 0.98));
  border-top: 1px solid rgba(31, 41, 55, 0.95);
  color: #9ca3af;
}

.footer-inner {
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-title {
  color: #ffffff;
  font-weight: 900;
  margin-bottom: 0.8rem;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: #6b7280;
  font-size: 0.9rem;
}

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

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

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

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

  .hero-slider {
    min-height: 31rem;
  }

  .hero-content {
    bottom: 4rem;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

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

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

  .feature-band {
    padding: 1.2rem;
  }

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

  .filter-row,
  .search-panel form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .page-container {
    width: min(100% - 1rem, 1280px);
  }

  .logo-text {
    font-size: 1.1rem;
  }

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

  .hero-slider {
    height: 74vh;
    min-height: 30rem;
  }

  .hero-meta {
    gap: 0.5rem;
    font-size: 0.88rem;
  }

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

  .scroller-row .movie-card {
    flex-basis: 15.5rem;
  }

  .rank-card {
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }

  .rank-label {
    grid-column: 2;
    justify-self: start;
  }

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