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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30rem),
    var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.24);
}

.brand-title {
  display: block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex: 1;
}

.site-nav a {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 15px;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-mini {
  position: relative;
  width: 260px;
}

.search-mini input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--text);
  outline: none;
  padding: 12px 46px 12px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.search-mini input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
  background: rgba(2, 6, 23, 0.68);
}

.search-mini button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 38px;
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72)),
    radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.18), transparent 26rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero-shell {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  padding: 70px 0 56px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 420ms ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), #60a5fa, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 720px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  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: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster-card {
  position: relative;
  min-height: 482px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.hero-poster-card img {
  width: 100%;
  height: 482px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92));
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.1) 52%, transparent);
}

.hero-card-meta {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-card-title {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.36);
}

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

.section {
  padding: 54px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.26);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.4);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
}

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

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.poster .badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 12px;
  background: rgba(51, 65, 85, 0.64);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  font-size: 12px;
}

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

.category-card,
.rank-card,
.info-panel,
.filter-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.22);
}

.category-card {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -54px;
  top: -54px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 65%);
}

.category-card strong {
  font-size: 22px;
}

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

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

.rank-card {
  display: grid;
  grid-template-columns: 54px 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-poster {
  width: 82px;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.86);
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-hero {
  padding: 58px 0 32px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.62));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 16px;
  margin-bottom: 24px;
}

.filter-select {
  padding-right: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

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

.player-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #020617;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.74) 60%);
}

.play-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.42);
}

.detail-title {
  margin: 26px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.detail-lead {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

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

.info-panel {
  padding: 22px;
}

.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.info-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.92;
}

.side-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.26);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.86);
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.related-link {
  display: block;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 180ms ease, border-color 180ms ease;
}

.related-link:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.44);
}

.related-link strong {
  display: block;
  margin-bottom: 6px;
}

.related-link span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 46px;
  padding: 36px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.5);
}

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

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

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

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-slide,
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .hero-poster-card {
    max-width: 520px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .site-nav {
    order: 5;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 0 4px;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 13px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }
  .search-mini {
    display: none;
  }
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }
  .hero-shell {
    min-height: auto;
    padding: 42px 0;
  }
  .hero-poster-card,
  .hero-poster-card img {
    min-height: 0;
    height: auto;
  }
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-head,
  .footer-inner {
    display: block;
  }
  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }
  .brand-subtitle {
    display: none;
  }
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }
  .rank-card {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }
  .hero-actions {
    display: grid;
  }
  .btn {
    width: 100%;
  }
}
