:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(51, 65, 85, 0.68);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --red-dark: #dc2626;
  --glow: rgba(239, 68, 68, 0.35);
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(14, 165, 233, 0.12), transparent 28rem),
    linear-gradient(135deg, #020617 0%, #0f172a 54%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
  background: #0f172a;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.92);
  border-bottom: 1px solid rgba(30, 41, 59, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.page-shell,
.hero-content,
.hero-dots-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--red), #fb7185);
  color: #ffffff;
  box-shadow: 0 0 26px var(--glow);
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.03em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.desktop-nav {
  flex: 1;
  justify-content: center;
}

.nav-link,
.mobile-link,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active,
.footer-links a:hover {
  color: #ffffff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search,
.mobile-search,
.hero-search,
.page-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.page-filter input,
.search-panel input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(51, 65, 85, 0.86);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input,
.mobile-search input {
  height: 42px;
  padding: 0 18px;
}

.header-search input {
  width: 250px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.page-filter button,
.search-panel button,
.primary-button,
.secondary-button,
.player-button {
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.page-filter button,
.search-panel button {
  height: 42px;
  padding: 0 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.page-filter input:focus,
.search-panel input:focus {
  border-color: rgba(239, 68, 68, 0.82);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
  background: rgba(15, 23, 42, 0.95);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.page-filter button:hover,
.search-panel button:hover,
.primary-button:hover,
.player-button:hover {
  transform: translateY(-1px);
  background: var(--red-dark);
  box-shadow: 0 14px 35px var(--glow);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(30, 41, 59, 0.72);
  background: rgba(15, 23, 42, 0.98);
  padding: 16px;
}

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

.mobile-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.45);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s 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(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 45%, rgba(2, 6, 23, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  padding: 110px 0 72px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow,
.meta-pill,
.detail-meta span,
.tag-list span,
.card-tags span,
.hero-tags span,
.category-chip,
.corner-label,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-style: normal;
}

.eyebrow {
  padding: 8px 14px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 10px 30px var(--glow);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin-top: 18px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(42px, 8vw, 88px);
}

.hero p {
  max-width: 680px;
  margin-top: 22px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.primary-button,
.secondary-button,
.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.secondary-button {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.secondary-button:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.9);
}

.hero-search {
  width: min(620px, 100%);
  margin-top: 28px;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(16px);
}

.hero-search input {
  height: 48px;
  padding: 0 20px;
  background: transparent;
  border-color: transparent;
}

.hero-search button {
  height: 48px;
  padding: 0 26px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span {
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.62);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page-shell {
  padding: 54px 0 72px;
}

.page-hero {
  padding: 46px;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.16), transparent 45%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 0;
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 760px;
  margin-top: 14px;
  color: var(--soft);
  line-height: 1.8;
  font-size: 17px;
}

.section {
  margin-top: 64px;
}

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

.section-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-title p {
  color: var(--muted);
}

.text-link {
  color: #fca5a5;
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
  color: #ffffff;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36), 0 0 32px rgba(239, 68, 68, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.rank-item:hover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 58%);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.corner-label,
.rank-badge {
  position: absolute;
  top: 12px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.corner-label {
  left: 12px;
  background: rgba(2, 6, 23, 0.78);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.rank-badge {
  right: 12px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.card-body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  line-height: 1.35;
}

.card-body small {
  color: var(--muted);
}

.card-body em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  font-style: normal;
}

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

.movie-card.compact .card-body strong {
  font-size: 16px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: 22px;
  border: 1px solid rgba(51, 65, 85, 0.68);
  background: rgba(15, 23, 42, 0.74);
  color: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-covers {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  opacity: 0.58;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.36));
}

.category-info {
  position: absolute;
  inset: auto 18px 18px 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-info strong {
  font-size: 22px;
  font-weight: 900;
}

.category-info em {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
  font-style: normal;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(239, 68, 68, 0.68);
  background: rgba(30, 41, 59, 0.78);
}

.rank-num {
  font-size: 24px;
  font-weight: 900;
  color: #fca5a5;
  text-align: center;
}

.rank-item img {
  width: 112px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.35s ease;
}

.rank-item strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  margin-bottom: 6px;
  font-size: 17px;
}

.rank-item small {
  color: var(--muted);
}

.panel {
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.panel-pad {
  padding: 28px;
}

.page-filter,
.search-panel {
  margin-top: 24px;
  padding: 12px;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.page-filter input,
.search-panel input {
  height: 50px;
  padding: 0 20px;
}

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

.empty-state {
  display: none;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

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

.breadcrumb a {
  color: #fca5a5;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: 34px;
  border: 1px solid rgba(51, 65, 85, 0.68);
  border-radius: 30px;
  background:
    radial-gradient(circle at 15% 10%, rgba(239, 68, 68, 0.22), transparent 26rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-title h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.detail-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span,
.tag-list span,
.meta-pill,
.category-chip {
  min-height: 32px;
  padding: 0 12px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
}

.detail-title p {
  margin-top: 22px;
  color: var(--soft);
  line-height: 1.85;
  font-size: 17px;
}

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

.player-section {
  margin-top: 42px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  display: block;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: none;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.26));
  color: #ffffff;
  cursor: pointer;
}

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

.player-button {
  gap: 10px;
  min-height: 58px;
  padding: 0 30px;
  font-size: 18px;
  box-shadow: 0 18px 44px var(--glow);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 34px;
}

.article-block {
  padding: 30px;
  border: 1px solid rgba(51, 65, 85, 0.62);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.article-block + .article-block {
  margin-top: 22px;
}

.article-block h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 900;
}

.article-block p {
  color: var(--soft);
  line-height: 1.9;
  font-size: 16px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.result-grid {
  margin-top: 28px;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.78);
  background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  padding: 44px 0;
}

.footer-brand {
  display: inline-block;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 800;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 12px 18px;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

  .page-hero {
    padding: 30px;
  }

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

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

  .detail-hero {
    padding: 22px;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-content,
  .hero-dots-inner {
    width: min(100% - 24px, 1280px);
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    padding-bottom: 64px;
  }

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

  .hero-search,
  .page-filter,
  .search-panel {
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 34px 92px minmax(0, 1fr);
  }

  .rank-item img {
    width: 92px;
  }

  .article-block,
  .panel-pad {
    padding: 22px;
  }
}
