:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.92);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --shadow: 0 28px 80px rgba(8, 47, 73, 0.34);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 36rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

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

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.brand-name,
.footer-brand span:last-child {
  font-size: 1.2rem;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
}

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

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

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

main {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  isolation: isolate;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-bg.image-fallback,
.poster-frame img.image-fallback,
.category-covers img.image-fallback {
  opacity: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 45%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - 32px));
  min-height: 72vh;
  margin: 0 auto;
  padding: 120px 0 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-content p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-meta,
.hero-tags,
.tag-row,
.tag-cloud,
.detail-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.hero-tags span,
.tag-row span,
.tag-cloud span,
.detail-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 47, 73, 0.34);
}

.hero-tags {
  margin-top: 12px;
}

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

.primary-button,
.ghost-button,
.search-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-box a {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.24);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.ghost-button:hover,
.search-box a:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(34, 211, 238, 0.28);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.content-section,
.chip-panel,
.detail-layout,
.player-section,
.detail-hero,
.page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.top-search {
  margin-top: -44px;
  position: relative;
  z-index: 8;
}

.sticky-search {
  position: sticky;
  top: 84px;
  z-index: 10;
}

.search-panel h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.15;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 560px);
}

.wide-search {
  width: 100%;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.66);
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.content-section {
  padding: 58px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.dense-grid {
  gap: 16px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 26px 60px rgba(8, 47, 73, 0.38);
}

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

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

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.88);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-line {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 0.78rem;
}

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

.rank-row,
.wide-rank-row {
  display: grid;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.68);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 13px 16px;
}

.rank-row:hover,
.wide-rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(30, 41, 59, 0.76);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.6);
  font-weight: 900;
}

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

.rank-type {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.page-hero,
.detail-hero {
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.66));
  box-shadow: var(--shadow);
}

.small-hero {
  padding: clamp(34px, 8vw, 72px);
}

.small-hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
}

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

.category-tile a {
  display: grid;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 150px;
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.24), transparent 50%),
    linear-gradient(135deg, #0f172a, #1e3a8a);
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.84;
}

.category-info {
  padding: 22px;
}

.category-info strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.category-info em {
  color: var(--muted);
  font-style: normal;
}

.chip-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  border-color: rgba(34, 211, 238, 0.48);
  color: white;
  background: rgba(8, 145, 178, 0.38);
}

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

.wide-rank-row {
  grid-template-columns: 56px minmax(0, 1fr) minmax(160px, 0.45fr);
  padding: 14px 18px;
}

.wide-rank-row span {
  color: var(--cyan);
  font-weight: 900;
}

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

.wide-rank-row em {
  color: var(--muted);
  font-style: normal;
}

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

.detail-poster {
  border-radius: 24px;
  aspect-ratio: 16 / 10;
}

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info h1 {
  font-size: clamp(2.4rem, 7vw, 4.9rem);
}

.detail-categories {
  margin-top: 18px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.16), transparent 48%),
    #020617;
  box-shadow: var(--shadow);
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.35);
  font-size: 2rem;
}

.player-cover strong {
  font-size: 1.2rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  margin-top: 28px;
}

.detail-article,
.detail-side {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-article {
  padding: clamp(24px, 4vw, 42px);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.detail-article p {
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 1.04rem;
}

.tag-cloud {
  margin-top: 10px;
}

.detail-side {
  align-self: start;
  padding: 24px;
}

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

.detail-side dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-side dd {
  margin: -10px 0 0;
  color: var(--text);
  font-weight: 750;
}

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

.footer-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 32px;
}

.footer-main p,
.footer-column a,
.footer-column li {
  color: var(--muted);
}

.footer-column h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.footer-column ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

  .menu-button {
    display: block;
  }

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

  .detail-hero,
  .detail-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 680px;
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 82vh;
  }

  .hero-content {
    min-height: 82vh;
    padding: 106px 0 96px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .section-head,
  .rank-board {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-box {
    display: grid;
    width: 100%;
  }

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

  .wide-rank-row,
  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-type,
  .wide-rank-row em {
    display: none;
  }

  .detail-hero {
    padding: 18px;
  }

  .small-hero {
    padding: 32px 22px;
  }
}
