:root {
  color-scheme: dark;
  --bg: #06111f;
  --panel: rgba(8, 23, 40, 0.78);
  --panel-strong: #0b1729;
  --text: #f8fafc;
  --muted: #b9c8d9;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --gold: #facc15;
  --rose: #fb7185;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 22px 50px rgba(2, 8, 23, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.2), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.28), transparent 38rem),
    linear-gradient(180deg, #06111f 0%, #081827 44%, #07111f 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.94), rgba(59, 130, 246, 0.94), rgba(20, 184, 166, 0.94));
  box-shadow: 0 12px 36px rgba(2, 8, 23, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #082f49;
  background: linear-gradient(135deg, #fff, #cffafe);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.18);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.88;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  max-width: 28vw;
}

.header-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  backdrop-filter: blur(12px);
}

.header-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #075985;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 22px;
}

.hero-wrap {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(250, 204, 21, 0.16), transparent 22rem),
    linear-gradient(120deg, rgba(8, 47, 73, 0.9), rgba(30, 64, 175, 0.72), rgba(20, 184, 166, 0.72));
  z-index: -2;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black 0%, transparent 78%);
}

.hero-stage {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 46px;
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 84px 0 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 46px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -120px -60px;
  background-image: linear-gradient(90deg, rgba(6, 17, 31, 0.82), rgba(6, 17, 31, 0.34)), var(--hero-img);
  background-position: center;
  background-size: cover;
  filter: blur(26px) saturate(1.08);
  opacity: 0.26;
  z-index: -1;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 780px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.primary-btn {
  color: #0f172a;
  background: linear-gradient(135deg, #fef08a, #facc15);
  box-shadow: 0 16px 30px rgba(250, 204, 21, 0.24);
}

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

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(2, 8, 23, 0.24);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.25);
  padding: 6px 10px;
  font-size: 13px;
}

.hero-poster,
.detail-poster,
.poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.28), rgba(59, 130, 246, 0.2)),
    var(--poster);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-poster {
  aspect-ratio: 3 / 4.2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.active {
  width: 32px;
  background: #facc15;
}

.hero-category-links {
  width: min(1180px, calc(100% - 32px));
  margin: -16px auto 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-category-links a {
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e0f2fe;
  font-weight: 800;
}

.section-block,
.split-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-title h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-title a {
  color: #67e8f9;
  font-weight: 900;
  white-space: nowrap;
}

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

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

.movie-card {
  background: rgba(8, 23, 40, 0.72);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 35px rgba(2, 8, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 22px 48px rgba(14, 165, 233, 0.18);
}

.poster {
  display: block;
  aspect-ratio: 2 / 2.85;
  border-radius: 0;
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 9px;
  color: #082f49;
  background: #fef08a;
  font-weight: 900;
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 900;
}

.card-body p {
  min-height: 54px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
  color: #bae6fd;
  font-size: 12px;
}

.meta-row span {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.08);
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
}

.rank-panel,
.category-panel,
.content-card,
.side-card,
.player-card,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(8, 23, 40, 0.76);
  box-shadow: var(--shadow);
}

.rank-panel,
.category-panel {
  padding: 28px;
}

.compact-title {
  margin-bottom: 20px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.rank-list span {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #082f49;
  background: linear-gradient(135deg, #67e8f9, #fef08a);
  font-weight: 900;
}

.rank-list strong,
.rank-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.category-card,
.category-overview-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.2), transparent 12rem),
    rgba(255, 255, 255, 0.07);
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, 0.46);
}

.category-card span,
.category-card h2,
.category-card-head h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.category-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  padding: 52px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 15%, rgba(250, 204, 21, 0.14), transparent 20rem),
    linear-gradient(135deg, rgba(8, 145, 178, 0.74), rgba(30, 64, 175, 0.7));
  box-shadow: var(--shadow);
}

.page-hero.slim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px;
  gap: 12px;
  min-width: min(100%, 520px);
}

.filter-bar select {
  appearance: none;
}

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

.category-overview-card {
  padding: 24px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-samples a {
  color: #dffafe;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.rank-table th,
.rank-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: #dbeafe;
  text-align: left;
}

.rank-table th {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.rank-table a {
  color: #67e8f9;
  font-weight: 900;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  position: relative;
  padding: 34px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 17, 31, 0.92), rgba(6, 17, 31, 0.58)),
    var(--detail-img);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 2 / 2.85;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: #bae6fd;
  font-weight: 800;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.content-card,
.side-card {
  padding: 24px;
}

.player-card h2,
.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
}

.player {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #082f49;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 18rem),
    rgba(2, 6, 23, 0.38);
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef08a, #22d3ee);
  box-shadow: 0 18px 44px rgba(2, 8, 23, 0.4);
  font-size: 32px;
  padding-left: 5px;
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.content-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
  font-size: 16px;
}

.side-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-card dt {
  color: #67e8f9;
  font-weight: 900;
}

.side-card dd {
  margin: -8px 0 0;
  color: #dbeafe;
}

.search-status {
  margin-bottom: 20px;
  color: #dbeafe;
  font-weight: 800;
}

.is-filter-hidden {
  display: none !important;
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #67e8f9;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #dbeafe;
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    height: auto;
    min-height: 70px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav,
  .header-search {
    display: none;
    width: 100%;
    max-width: none;
  }

  .site-header.menu-open .main-nav,
  .site-header.menu-open .header-search {
    display: flex;
  }

  .main-nav {
    flex-wrap: wrap;
    order: 3;
  }

  .header-search {
    order: 4;
  }

  .hero-stage {
    min-height: 760px;
    padding-top: 48px;
  }

  .hero-slide {
    inset: 48px 0 40px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-poster {
    width: min(280px, 76vw);
    margin: 0 auto;
  }

  .split-section,
  .detail-layout,
  .detail-hero,
  .page-hero.slim,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero.slim {
    display: grid;
  }

  .detail-hero {
    padding: 22px;
  }

  .detail-poster {
    width: min(280px, 100%);
  }

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

@media (max-width: 640px) {
  .brand-text strong {
    font-size: 18px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .section-block,
  .split-section {
    padding: 36px 0;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-grid.small {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .movie-card {
    border-radius: 18px;
  }

  .card-body {
    padding: 12px;
  }

  .card-title {
    font-size: 15px;
    min-height: 40px;
  }

  .card-body p,
  .meta-row,
  .tag-row {
    display: none;
  }

  .page-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-table {
    font-size: 13px;
  }

  .rank-table th,
  .rank-table td {
    padding: 10px 8px;
  }
}
