:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #06b6d4;
  --cyan-bright: #22d3ee;
  --blue: #2563eb;
  --gold: #fbbf24;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --max: 1280px;
}

* {
  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", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.20), transparent 30%),
    radial-gradient(circle at 86% 10%, rgba(37, 99, 235, 0.18), transparent 36%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.20);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner,
.mobile-panel,
main,
.footer-grid,
.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.28);
  transition: transform 0.24s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.08) rotate(-2deg);
}

.logo-copy strong,
.footer-logo {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-copy small {
  display: block;
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

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

.main-nav a,
.mobile-panel a {
  color: var(--muted-strong);
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
  padding: 10px 12px;
  font-size: 14px;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: white;
  background: rgba(51, 65, 85, 0.82);
  transform: translateY(-1px);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-item input,
.filter-item select {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.90);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input {
  width: 250px;
  padding: 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-item input:focus,
.filter-item select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
  background: rgba(2, 6, 23, 0.96);
}

.top-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-reset,
.play-trigger,
.hero-control,
.hero-dots button {
  border: 0;
}

.top-search button,
.mobile-search button,
.primary-btn,
.play-trigger {
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 32px rgba(6, 182, 212, 0.20);
}

.top-search button,
.mobile-search button {
  padding: 10px 16px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

.mobile-panel {
  padding: 0 0 18px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-search input {
  width: 100%;
  padding: 12px 14px;
}

main {
  padding-bottom: 56px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.38)),
    radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.22), transparent 30%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.08) contrast(1.08);
}

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

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--cyan-bright);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-label::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.poster-badge,
.rank-index,
.tag-row span,
.breadcrumb a,
.breadcrumb span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.hero-meta span {
  padding: 7px 12px;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.secondary-btn {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.74);
}

.primary-btn:hover,
.secondary-btn:hover,
.play-trigger:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: center;
  width: min(360px, 100%);
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.82));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

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

.hero-controls {
  position: absolute;
  inset-inline: 24px;
  bottom: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-control,
.hero-dots {
  pointer-events: auto;
}

.hero-control {
  width: 42px;
  height: 42px;
  color: white;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

.hero-dots button {
  width: 26px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 42px;
  background: var(--cyan-bright);
}

.section {
  margin-top: 54px;
}

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

.section-head h2,
.category-hero h1,
.detail-title h1,
.search-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.category-hero p,
.search-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--cyan-bright);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.20);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 20px 48px rgba(6, 182, 212, 0.15);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.10));
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, #fde68a, var(--gold));
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: white;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--cyan-bright);
}

.card-meta {
  margin: 8px 0 0;
  font-size: 13px;
}

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

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

.tag-row span {
  padding: 3px 8px;
  color: var(--cyan-bright);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.26), transparent 35%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.76));
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted-strong);
}

.category-card span {
  display: inline-block;
  margin-top: 20px;
  color: var(--cyan-bright);
  font-weight: 800;
}

.category-hero,
.search-hero,
.detail-hero {
  margin-top: 28px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 0%, rgba(6, 182, 212, 0.18), transparent 30%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.breadcrumb a,
.breadcrumb span {
  padding: 6px 10px;
  color: var(--muted-strong);
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.8fr auto;
  gap: 14px;
  margin: 28px 0 10px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.34);
}

.filter-item {
  display: grid;
  gap: 6px;
}

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

.filter-item input,
.filter-item select {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
}

.filter-reset {
  align-self: end;
  min-height: 44px;
  padding: 0 18px;
  color: var(--text);
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.82);
}

.quick-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tags button {
  color: var(--muted-strong);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  padding: 7px 11px;
}

.quick-tags button.is-active,
.quick-tags button:hover {
  color: #001018;
  border-color: transparent;
  background: var(--cyan-bright);
}

.filter-status {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--muted);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--cyan-bright);
  font-weight: 900;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0;
  font-size: 20px;
}

.rank-info p {
  margin: 6px 0 0;
  color: var(--muted);
}

.rank-score {
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.32);
}

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

.detail-title h1 {
  margin-top: 4px;
}

.detail-title .one-line {
  margin: 16px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.player-section {
  margin-top: 42px;
}

.stream-player {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.30);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.82)),
    rgba(2, 6, 23, 0.36);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.player-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.play-trigger {
  width: 82px;
  height: 82px;
  color: white;
  font-size: 28px;
  border-radius: 50%;
}

.player-panel strong {
  font-size: 22px;
}

.player-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted-strong);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  margin-top: 42px;
}

.article-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.article-panel {
  padding: 30px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
}

.article-panel p {
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 17px;
}

.side-panel {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 96px;
}

.side-link {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.side-link:last-child {
  border-bottom: 0;
}

.side-link strong {
  color: var(--text);
}

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

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr;
  gap: 30px;
  padding: 36px 0;
}

.footer-grid p {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: var(--muted-strong);
}

.footer-grid a:hover {
  color: var(--cyan-bright);
}

.footer-bottom {
  padding: 18px 0 26px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 1180px) {
  .top-search {
    display: none;
  }

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

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

@media (max-width: 920px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero-slide,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 26px;
    padding: 44px 24px 82px;
  }

  .hero-poster {
    width: min(260px, 72vw);
  }

  .side-panel {
    position: static;
  }

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

  .filter-item.wide,
  .filter-reset {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .header-inner,
  .mobile-panel,
  main,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

  .logo-copy small {
    display: none;
  }

  .logo-copy strong {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: auto;
    border-radius: 22px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

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

  .card-body {
    padding: 12px;
  }

  .category-list,
  .filter-panel,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-item {
    align-items: start;
  }

  .rank-cover img {
    width: 132px;
  }

  .category-hero,
  .search-hero,
  .detail-hero,
  .article-panel {
    padding: 22px;
    border-radius: 22px;
  }
}
