:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #111827;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-dark: #94a3b8;
  --red: #dc2626;
  --orange: #ea580c;
  --gold: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 6%, rgba(220, 38, 38, 0.18), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(234, 88, 12, 0.12), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #111827 45%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1200px, 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.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.34);
  font-size: 17px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(234, 88, 12, 0.9));
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: linear-gradient(100deg, #7f1d1d 0%, #7c2d12 48%, #111827 100%);
}

.hero-backgrounds,
.hero-backgrounds img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-backgrounds img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 4s ease;
}

.hero-backgrounds img.is-active {
  opacity: 0.42;
  transform: scale(1.12);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.74) 45%, rgba(2, 6, 23, 0.3)),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0) 28%);
}

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

.hero-slide {
  display: none;
  max-width: 820px;
}

.hero-slide.is-active {
  display: block;
  animation: fadeInUp 0.64s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fecaca;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 16px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 760px;
  color: #f1f5f9;
  font-size: clamp(18px, 2.3vw, 26px);
  margin: 0 0 24px;
}

.hero-meta,
.meta-pills,
.breadcrumb,
.card-meta,
.hero-actions,
.category-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.meta-pills span,
.category-chips a,
.card-tags span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero-actions {
  margin: 30px 0;
}

.btn,
.btn-ghost,
.hero-search button,
.filter-panel button,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn,
.hero-search button,
.filter-panel button,
.search-box button {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.28);
}

.btn:hover,
.btn-ghost:hover,
.hero-search button:hover,
.filter-panel button:hover,
.search-box button:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.56);
}

.hero-search {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 24px 0 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-search input,
.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  outline: none;
  padding: 0 18px;
}

.hero-search input {
  border-color: transparent;
  background: transparent;
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.48), rgba(15, 23, 42, 0.72));
}

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

.section-head h2,
.content-card h2,
.category-card h2,
.site-footer h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.content-card p,
.category-card p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: grid;
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card a:hover {
  transform: translateY(-8px);
  border-color: rgba(248, 113, 113, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

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

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

.movie-card a:hover img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 54%);
}

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

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

.card-line {
  min-height: 42px;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  justify-content: space-between;
  color: #fecaca;
  font-size: 12px;
  font-weight: 800;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-tags span {
  padding: 4px 7px;
  color: #fed7aa;
  font-size: 11px;
  border-color: rgba(251, 146, 60, 0.18);
  background: rgba(124, 45, 18, 0.3);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: grid;
  align-content: end;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.92), rgba(30, 41, 59, 0.9));
  box-shadow: var(--shadow);
  padding: 24px;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.category-card > *:not(img) {
  position: relative;
  z-index: 1;
}

.category-card h2 {
  font-size: 25px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  padding: 12px;
}

.rank-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.rank-number {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff;
  font-weight: 900;
}

.rank-main img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-main strong,
.rank-main em {
  display: block;
}

.rank-main strong {
  color: #fff;
  font-size: 17px;
}

.rank-main em {
  color: var(--muted-dark);
  font-style: normal;
  font-size: 13px;
}

.rank-side {
  flex: 0 0 auto;
  color: #fed7aa;
  font-weight: 800;
  font-size: 13px;
}

.page-hero {
  padding: 72px 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(220, 38, 38, 0.22), transparent 34%),
    linear-gradient(135deg, #7f1d1d, #111827 62%);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.breadcrumb {
  color: #fecaca;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

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

.filter-panel,
.search-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
  margin-bottom: 28px;
}

.search-box {
  grid-template-columns: 1fr auto;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  padding: 28px;
}

.content-card p + p {
  margin-top: 14px;
}

.detail-hero {
  padding: 42px 0 72px;
  background:
    radial-gradient(circle at 18% 10%, rgba(220, 38, 38, 0.2), transparent 32%),
    linear-gradient(135deg, #111827, #020617 74%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-info {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-frame video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-frame video {
  z-index: 1;
  object-fit: contain;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: #000;
}

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

.player-cover img {
  object-fit: cover;
  opacity: 0.46;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.big-play {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--red);
  font-size: 32px;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.detail-info {
  padding: 28px;
}

.detail-title {
  font-size: clamp(31px, 4.5vw, 52px);
}

.detail-lead {
  color: #f1f5f9;
  font-size: 18px;
  margin: 0 0 18px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  margin-top: 22px;
}

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

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  color: var(--muted);
}

.info-list strong {
  color: #fff;
}

.result-empty {
  display: none;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}

.result-empty.show {
  display: block;
}

.site-footer {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 54px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-brand {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-links,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.footer-links a {
  color: var(--muted);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 10px;
  font-weight: 700;
  font-size: 13px;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(220, 38, 38, 0.76);
}

.footer-bottom {
  margin-top: 36px;
  padding: 20px 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: #94a3b8;
}

[data-filter-card].is-hidden {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .detail-layout,
  .article-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    border-radius: 12px;
  }

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

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

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

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

  .section-head {
    display: grid;
    align-items: start;
  }

  .filter-panel,
  .search-box,
  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .rank-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-shell {
    width: min(100% - 24px, 1200px);
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-subtitle {
    display: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-title {
    font-size: 34px;
  }

  .hero-content {
    padding: 50px 0 90px;
  }

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

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

  .section {
    padding: 50px 0;
  }

  .detail-info,
  .content-card {
    padding: 20px;
  }

  .big-play {
    width: 72px;
    height: 72px;
  }
}
