:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(34, 211, 238, 0.22);
  --border-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --warning: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 38rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 100;
  background: rgba(2, 6, 23, 0.84);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand.compact {
  justify-content: flex-start;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-text {
  font-size: 1.35rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text);
  transition: transform 200ms ease, opacity 200ms ease;
}

.mobile-menu-button.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-button.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 20px;
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: 650px;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 42%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(640px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 58ch;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: 1.1rem;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-button,
.outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button {
  color: #001018;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  box-shadow: 0 16px 38px rgba(34, 211, 238, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.outline-link:hover {
  transform: translateY(-2px);
}

.ghost-button,
.outline-link {
  border: 1px solid var(--border-strong);
  color: var(--accent);
  background: rgba(15, 23, 42, 0.72);
}

.text-button {
  color: #e2e8f0;
}

.text-button:hover {
  color: var(--accent);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

.hero-strip {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: -76px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-thumb img {
  width: 64px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-thumb span {
  min-width: 0;
  overflow: hidden;
  color: #e2e8f0;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.content-section {
  margin-top: 68px;
}

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

.section-heading h2,
.panel-head h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.18;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--bg-card-strong);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  color: #001018;
  background: var(--accent);
  font-size: 0.8rem;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  color: #020617;
  background: var(--warning);
}

.movie-card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-meta span {
  min-width: 0;
}

.movie-card h2,
.ranking-info h2 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-info h2 a:hover {
  color: var(--accent);
}

.movie-card p,
.ranking-info p {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.card-foot span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-foot a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h2 {
  font-size: 1rem;
}

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

.ranking-panel,
.detail-panel,
.detail-content,
.detail-side,
.filter-panel,
.category-card,
.page-hero,
.player-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.panel-head {
  margin-bottom: 18px;
}

.mini-ranking {
  display: grid;
  gap: 12px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.mini-ranking .ranking-row {
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 0 0 12px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.mini-ranking .ranking-thumb,
.mini-ranking .outline-link,
.mini-ranking .ranking-info p,
.mini-ranking .card-meta {
  display: none;
}

.ranking-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #020617;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  font-weight: 900;
}

.ranking-thumb img {
  width: 74px;
  height: 94px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-info h2 {
  margin-top: 0;
}

.full-button {
  width: 100%;
  margin-top: 18px;
}

.page-main {
  padding-top: 42px;
}

.page-hero {
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 32rem),
    rgba(15, 23, 42, 0.72);
}

.page-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.12;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.compact-actions {
  margin-top: 24px;
}

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

.category-card {
  overflow: hidden;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  min-height: 190px;
  background: #0f172a;
}

.category-cover img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.category-card-body {
  padding: 22px;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.category-card h2 a:hover {
  color: var(--accent);
}

.category-card p {
  min-height: 3.2em;
  margin: 0 0 18px;
  color: var(--muted);
}

.filter-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  padding: 20px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel label span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

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

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--accent);
  font-weight: 800;
}

.player-section {
  margin-bottom: 28px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 200ms ease;
}

.player-shell.is-loaded .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.player-play-icon {
  display: grid;
  place-items: center;
  width: clamp(68px, 10vw, 96px);
  height: clamp(68px, 10vw, 96px);
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  text-indent: 0.12em;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.32);
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 5;
  display: none;
  width: min(520px, calc(100% - 40px));
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 14px;
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.82);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

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

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

.detail-title-block h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.detail-title-block p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  color: var(--muted-2);
  font-size: 0.8rem;
}

.detail-meta-grid span {
  margin-top: 6px;
  color: var(--text);
  font-weight: 800;
}

.detail-panel {
  margin-top: 22px;
  padding: 22px;
}

.detail-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-panel p {
  margin: 0;
  color: #cbd5e1;
  text-align: justify;
  white-space: pre-wrap;
}

.detail-poster {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

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

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

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
}

.footer-block h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
}

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

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(34, 211, 238, 0.12);
  color: var(--muted-2);
  text-align: center;
  font-size: 0.88rem;
}

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

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

  .mobile-menu-button {
    display: block;
  }

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

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

  .ranking-panel {
    position: static;
  }

  .hero-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .filter-selects,
  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .header-inner {
    min-height: 64px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .hero-stage {
    height: 590px;
  }

  .hero-content {
    top: auto;
    bottom: 118px;
    transform: none;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    bottom: 84px;
  }

  .hero-strip {
    display: none;
  }

  .section-heading {
    display: grid;
  }

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

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

  .movie-card p,
  .card-foot span {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 46px 62px minmax(0, 1fr);
  }

  .ranking-row .outline-link {
    display: none;
  }

  .ranking-thumb img {
    width: 62px;
    height: 82px;
  }

  .filter-selects,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-content,
  .detail-side,
  .filter-panel {
    padding: 18px;
  }

  .category-cover,
  .category-cover img {
    min-height: 140px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .text-button {
    width: 100%;
  }

  .card-meta {
    gap: 6px;
  }
}
