:root {
  --bg: #080a12;
  --bg-soft: #101421;
  --panel: rgba(17, 22, 36, 0.82);
  --panel-strong: rgba(20, 26, 43, 0.96);
  --text: #f8fafc;
  --muted: #9ba8bc;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #ff3d5a;
  --brand-2: #ff8a2a;
  --brand-3: #7c3aed;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --max: 1280px;
}

* {
  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(255, 61, 90, 0.2), transparent 32rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.16), transparent 34rem),
    linear-gradient(180deg, #080a12 0%, #0b1020 46%, #070912 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 52px);
  background: rgba(8, 10, 18, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(255, 61, 90, 0.38);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 9px 14px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 99px;
}

main {
  width: min(100%, 1720px);
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: clamp(620px, 82vh, 860px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 18, 0.95) 0%, rgba(8, 10, 18, 0.72) 42%, rgba(8, 10, 18, 0.28) 100%),
    linear-gradient(0deg, #080a12 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(720px, calc(100% - 40px));
  min-height: clamp(560px, 74vh, 760px);
  margin-left: clamp(20px, 7vw, 120px);
  padding: 120px 0 160px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #ffd1d9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-content h1 {
  max-width: 740px;
  font-size: clamp(40px, 6.2vw, 88px);
}

.hero-content h2 {
  margin-top: 14px;
  font-size: clamp(32px, 4.8vw, 68px);
}

.hero-content p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  color: #dbe4f3;
  font-size: clamp(16px, 1.6vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 38px rgba(255, 61, 90, 0.34);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero-dots {
  position: absolute;
  left: clamp(20px, 7vw, 120px);
  bottom: 98px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.hero-thumbs {
  position: absolute;
  right: clamp(18px, 5vw, 80px);
  bottom: 54px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 116px));
  gap: 12px;
}

.hero-thumb {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.hero-thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-thumb span {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-section,
.page-hero,
.detail-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 54px 0;
}

.search-section {
  padding-bottom: 10px;
}

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

.section-head h2,
.article-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.text-link {
  color: #ffd1d9;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  font-size: 16px;
}

.search-input:focus {
  border-color: rgba(255, 61, 90, 0.72);
  box-shadow: 0 0 0 4px rgba(255, 61, 90, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  color: #e5eaf5;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 800;
}

.chip.is-active,
.chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 61, 90, 0.95), rgba(255, 138, 42, 0.9));
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 20px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  transform: translateZ(0);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(255, 61, 90, 0.55);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  transform: translateY(-6px);
}

.movie-card.is-hidden {
  display: none;
}

.movie-card figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #111827;
}

.movie-card figure img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.42s ease;
}

.movie-card:hover figure img {
  transform: scale(1.06);
}

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(255, 61, 90, 0.35);
}

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

.movie-card-body strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.34;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  padding: 4px 8px;
  color: #ffdbe1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

.tag-row.large span {
  padding: 7px 11px;
  font-size: 13px;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 12px 0 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.category-card,
.category-overview-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: rgba(255, 61, 90, 0.52);
  transform: translateY(-4px);
}

.category-card {
  grid-template-columns: 92px 1fr;
  align-items: center;
}

.category-card img {
  width: 92px;
  height: 116px;
  object-fit: cover;
  border-radius: 16px;
}

.category-card strong,
.category-overview-card strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.category-card p,
.category-overview-card p,
.page-hero p,
.detail-info p,
.article-section p,
.site-footer p {
  margin: 8px 0 0;
  color: #cbd5e1;
}

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

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

.page-hero {
  margin-top: 34px;
  padding: 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 61, 90, 0.18), rgba(124, 58, 237, 0.16)),
    var(--panel);
  box-shadow: var(--shadow);
}

.slim-hero h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.slim-hero p {
  max-width: 760px;
  font-size: 18px;
}

.detail-hero {
  padding: 34px 0 24px;
}

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

.breadcrumb a {
  color: #ffd1d9;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(24px, 4vw, 54px);
  align-items: end;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(255, 61, 90, 0.2), transparent 28rem),
    var(--panel-strong);
  box-shadow: var(--shadow);
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.detail-info h1 {
  max-width: 880px;
  font-size: clamp(34px, 5vw, 70px);
}

.detail-info p {
  max-width: 860px;
  font-size: clamp(16px, 1.5vw, 20px);
}

.detail-info .btn {
  margin-top: 26px;
}

.player-section {
  padding-top: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(255, 61, 90, 0.08), rgba(0, 0, 0, 0.28));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  color: #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 52px rgba(255, 61, 90, 0.38);
  font-size: 36px;
  transform: translateX(3px);
}

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

.article-section {
  max-width: 980px;
}

.article-section h2 {
  margin-top: 0;
  margin-bottom: 12px;
}

.article-section h2:not(:first-child) {
  margin-top: 36px;
}

.article-section p {
  font-size: 17px;
}

.info-table {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.info-table div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.info-table span {
  color: var(--muted);
  font-weight: 800;
}

.info-table strong,
.info-table a {
  color: #ffffff;
  font-weight: 900;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 30px auto 0;
  padding: 42px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 74px 16px auto 16px;
    display: none;
    max-height: calc(100vh - 92px);
    padding: 18px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(12, 15, 25, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-thumbs {
    display: none;
  }

  .hero-content {
    min-height: 640px;
    margin-left: 20px;
    padding-right: 20px;
  }

  .hero-dots {
    left: 20px;
    bottom: 64px;
  }

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

  .poster-panel {
    max-width: 280px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 13px 16px;
  }

  .site-logo {
    font-size: 19px;
  }

  .site-logo::before {
    width: 32px;
    height: 32px;
  }

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

  .hero-content {
    min-height: 640px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    max-width: 280px;
  }

  .content-section {
    padding: 38px 0;
  }

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

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

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

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

  .movie-card-body p,
  .movie-meta {
    font-size: 12px;
  }

  .tag-row span {
    font-size: 11px;
  }

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

  .category-card img {
    width: 82px;
    height: 106px;
  }

  .page-hero {
    padding: 32px 22px;
  }

  .info-table div {
    grid-template-columns: 1fr;
  }

  .player-cover span {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
