:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5edf7;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
    radial-gradient(circle at 78% 12%, rgba(59, 130, 246, 0.15), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #08111f 52%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 36px rgba(34, 211, 238, 0.32);
}

.logo-text {
  font-size: 20px;
  background: linear-gradient(90deg, #e0faff, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
}

.hero {
  padding: 28px 0 24px;
}

.hero-shell {
  position: relative;
  width: min(1240px, calc(100% - 28px));
  min-height: 620px;
  margin: 0 auto;
  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, 1fr) 360px;
  gap: 42px;
  align-items: center;
  padding: 76px min(7vw, 86px) 118px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.95)),
    radial-gradient(circle at 78% 20%, rgba(34, 211, 238, 0.24), transparent 22rem);
}

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

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-badges span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #bff7ff;
  font-size: 13px;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 700px;
  margin: 0;
  color: #d8e3ef;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.26);
}

.btn-secondary {
  border-color: rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
}

.btn-full {
  width: 100%;
}

.hero-poster {
  display: block;
  min-height: 460px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(59, 130, 246, 0.22));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: min(7vw, 86px);
  bottom: 42px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  right: min(7vw, 86px);
  bottom: 28px;
  z-index: 5;
  width: min(480px, calc(100% - 40px));
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

.hero-search label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.hero-search div,
.search-panel {
  display: flex;
  gap: 10px;
}

.hero-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
}

.hero-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.64);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.hero-search button,
.search-panel button {
  min-width: 90px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-weight: 900;
  cursor: pointer;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 10px 0 26px;
}

.stats-strip a {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.18);
}

.stats-strip strong {
  display: block;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
}

.stats-strip span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section {
  padding: 34px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.panel-head h2,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-more {
  color: #bff7ff;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.category-card,
.category-overview-card,
.movie-card,
.ranking-panel,
.text-panel,
.player-section,
.page-hero {
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.2);
  backdrop-filter: blur(18px);
}

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
}

.category-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.72;
  background-size: cover;
  background-position: center;
  transition: transform 0.35s ease;
}

.category-card:hover .category-image {
  transform: scale(1.08);
}

.category-card strong,
.category-card em,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card strong {
  display: block;
  font-size: 24px;
}

.category-card em {
  display: inline-block;
  margin: 12px 0;
  color: #bff7ff;
  font-style: normal;
  font-weight: 800;
}

.category-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.96);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.38), transparent 40%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.58));
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 12px 12px 12px;
  height: 40px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  filter: blur(18px);
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  min-width: 46px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: #a7f3d0;
  text-align: center;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta a {
  color: var(--cyan);
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.4;
}

.movie-card p {
  display: -webkit-box;
  min-height: 43px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius);
}

.panel-head span {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-weight: 900;
}

.panel-head p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #a7f3d0;
  text-align: right;
  font-weight: 900;
}

.page-main {
  padding-top: 28px;
  padding-bottom: 60px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 38px;
  border-radius: 28px;
}

.compact-hero {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.18), transparent 26rem),
    rgba(15, 23, 42, 0.78);
}

.page-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.breadcrumb a {
  color: #bff7ff;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.filter-bar select {
  width: 180px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border-radius: 26px;
}

.category-cover {
  min-height: 240px;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.mini-title-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mini-title-list span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  color: #bff7ff;
  font-size: 12px;
}

.table-section {
  padding-top: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.ranking-table th {
  color: #bff7ff;
  font-size: 13px;
}

.ranking-table td {
  color: #dce8f6;
}

.ranking-table tr:hover td {
  background: rgba(34, 211, 238, 0.06);
}

.rank-col {
  color: var(--cyan) !important;
  font-weight: 900;
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.7);
}

.detail-one-line {
  margin: 18px 0 24px;
  color: #d8e3ef;
  font-size: 18px;
  line-height: 1.8;
}

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

.meta-grid div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.24);
}

.meta-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd {
  margin: 6px 0 0;
  color: #ffffff;
  font-weight: 800;
}

.player-section {
  padding: 18px;
  border-radius: 28px;
  margin-bottom: 28px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 0;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.18), transparent 18rem),
    rgba(2, 6, 23, 0.42);
  color: #ffffff;
  cursor: pointer;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #00111a;
  font-size: 30px;
  box-shadow: 0 18px 56px rgba(34, 211, 238, 0.32);
}

.play-overlay strong {
  align-self: start;
  font-size: 18px;
}

.player-note {
  margin: 12px 4px 0;
  color: var(--muted);
}

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

.text-panel {
  padding: 24px;
  border-radius: 24px;
}

.text-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
}

.text-panel p {
  margin: 0;
  color: #d0d9e7;
  line-height: 1.9;
}

.search-panel {
  max-width: 760px;
  margin-top: 22px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 30px;
  padding: 42px 0 28px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

@media (max-width: 1100px) {
  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

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

  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.94);
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-shell {
    min-height: 760px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 38px 24px 170px;
  }

  .hero-poster {
    min-height: 260px;
  }

  .hero-poster img {
    min-height: 260px;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    bottom: 68px;
    width: auto;
  }

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

  .stats-strip,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .all-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-hero,
  .meta-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .detail-hero {
    align-items: start;
  }
}

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

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

  .hero-search div,
  .search-panel,
  .filter-bar {
    flex-direction: column;
  }

  .stats-strip,
  .category-grid,
  .movie-grid,
  .featured-grid,
  .all-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-hero,
  .meta-grid,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-info {
    padding: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
