:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.86);
  --card-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --gold: #f59e0b;
  --gold-soft: #fbbf24;
  --red: #ef4444;
  --blue: #38bdf8;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.22), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(239, 68, 68, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(22px);
}

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316 52%, #ef4444);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: var(--muted-strong);
  font-size: 14px;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-action {
  padding: 10px 16px;
  border-radius: 999px;
  color: #111827;
  font-weight: 700;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

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

.main-space {
  padding: 30px 0 68px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 40px;
  align-items: center;
  padding: 68px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.34) 100%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 18% 24%, rgba(251, 191, 36, 0.28), transparent 21rem),
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.68) 100%);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  font-size: 13px;
  background: rgba(245, 158, 11, 0.12);
}

.hero-title {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 900;
}

.hero-desc {
  max-width: 700px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-meta,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 13px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(30, 41, 59, 0.92);
}

.btn-primary {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

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

.hero-poster-info {
  position: absolute;
  inset: auto 18px 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(16px);
}

.hero-controls {
  position: absolute;
  left: 68px;
  right: 68px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.hero-dot.active {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  background: rgba(15, 23, 42, 0.78);
}

.section {
  margin-top: 56px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(30, 41, 59, 0.92);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.07);
}

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-weight: 900;
  opacity: 0;
  background: rgba(2, 6, 23, 0.44);
  transition: opacity 0.22s ease;
}

.poster-mask span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.card-body {
  padding: 14px;
}

.card-title {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
}

.card-summary {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 20px;
}

.feature-main {
  min-height: 430px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--feature-image) center / cover no-repeat, #111827;
  box-shadow: var(--shadow);
}

.feature-main-inner {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08) 0%, rgba(2, 6, 23, 0.92) 74%);
}

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

.side-card,
.category-tile,
.rank-row,
.info-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}

.side-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.side-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.38);
}

.side-card img {
  width: 132px;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  padding: 26px;
  min-height: 180px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 18rem),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.4);
}

.category-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-desc {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.search-box {
  flex: 1 1 260px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
}

.filter-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  cursor: pointer;
  background: rgba(15, 23, 42, 0.82);
}

.filter-button.active,
.filter-button:hover {
  color: #111827;
  border-color: transparent;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.rank-row img {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.page-hero {
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72)),
    var(--cover-image) center / cover no-repeat;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-core {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #111827;
  font-size: 32px;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.detail-body,
.aside-card {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
}

.detail-body h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-body h2,
.aside-card h2 {
  margin: 28px 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.detail-body p {
  color: var(--muted-strong);
  font-size: 16px;
}

.aside-card {
  margin-top: 0;
}

.poster-large {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #111827;
}

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

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

.footer {
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hidden-card {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: var(--card);
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 48px;
  }

  .hero-poster {
    display: none;
  }

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero {
    min-height: 560px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px 88px;
  }

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

  .section-head {
    display: block;
  }

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

  .rank-row {
    grid-template-columns: 44px 72px minmax(0, 1fr);
  }

  .rank-row .btn {
    grid-column: 1 / -1;
  }

  .page-hero {
    padding: 34px 24px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .side-card {
    grid-template-columns: 106px 1fr;
  }

  .side-card img {
    width: 106px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .detail-body,
  .aside-card {
    padding: 20px;
  }
}
