:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 34rem), var(--bg);
  color: var(--text);
}

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

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

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);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
}

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.28);
}

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

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

.nav-link,
.mobile-link,
.footer-links a,
.section-link {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active,
.footer-links a:hover,
.section-link:hover {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.9);
}

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

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

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
}

.hero-slider {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 120px max(24px, calc((100vw - 1180px) / 2)) 110px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.65s ease, transform 0.85s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, #020617, transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  animation: slideUp 0.7s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 12px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(2.45rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.lead-text {
  max-width: 760px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.tag-row,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-meta > span,
.detail-meta > span,
.tag-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.78);
  font-size: 0.84rem;
}

.tag-badge {
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.13);
}

.hero-actions,
.detail-copy .primary-btn {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  box-shadow: 0 16px 35px rgba(6, 182, 212, 0.25);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover,
.home-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(6, 182, 212, 0.34);
}

.primary-btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.ghost-btn {
  margin-left: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: none;
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--cyan);
  transform: translateY(-2px);
}

.hero-bottom {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  left: max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-dots,
.hero-quick {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.hero-quick a {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.hero-quick a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.42);
}

.search-strip,
.content-section,
.page-shell,
.detail-page,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: -46px;
  position: relative;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-strip h2,
.content-section h2,
.ranking-side h2,
.player-panel h2,
.story-panel h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.home-search {
  display: flex;
  width: min(520px, 100%);
  gap: 10px;
}

.home-search input,
.filter-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 16px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.75);
  outline: none;
}

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

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

.panel-section,
.category-overview-card,
.story-panel,
.player-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.7));
  box-shadow: var(--shadow);
}

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

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

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

.movie-card {
  display: grid;
  gap: 13px;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.52);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.9);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-mark {
  opacity: 1;
}

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

.card-copy {
  display: grid;
  gap: 8px;
  padding: 0 2px 4px;
}

.card-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta,
.card-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.card-desc {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.large-card {
  padding: 12px;
}

.large-card .poster-frame {
  aspect-ratio: 16 / 9;
}

.page-shell,
.detail-page {
  padding: 54px 0 0;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 66px);
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.78), rgba(15, 23, 42, 0.86)), radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 30rem);
  box-shadow: var(--shadow);
}

.slim-hero h1,
.category-hero h1,
.ranking-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.25rem);
}

.filter-box {
  width: min(680px, 100%);
  margin-top: 28px;
}

.filter-box.wide {
  width: 100%;
}

.category-overview-list {
  display: grid;
  gap: 26px;
  margin-top: 34px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: 28px;
  align-items: center;
}

.category-copy p {
  color: var(--muted);
  line-height: 1.8;
}

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

.category-preview .card-desc,
.category-preview .card-tags,
.category-preview .card-meta {
  display: none;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 36px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.9);
}

.rank-index {
  color: var(--cyan);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 160px;
  height: 90px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em,
.rank-copy small {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-action {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.ranking-side {
  position: sticky;
  top: 94px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.76);
}

.side-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.side-grid .card-desc,
.side-grid .card-tags {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: clamp(20px, 4vw, 38px);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 28rem), rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-meta {
  margin: 22px 0 18px;
}

.player-panel,
.story-panel {
  margin-top: 32px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: clamp(72px, 12vw, 108px);
  height: clamp(72px, 12vw, 108px);
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 22px 60px rgba(6, 182, 212, 0.35);
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-indent: 0.15em;
}

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

.story-panel {
  display: grid;
  gap: 16px;
}

.story-panel p {
  margin: 0 0 10px;
  color: #cbd5e1;
  line-height: 1.9;
}

.search-status {
  margin-bottom: 18px;
  color: var(--muted);
}

.site-footer {
  margin-top: 76px;
  padding: 42px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: start;
}

.footer-brand p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}

.copyright {
  margin: 30px 0 0;
  text-align: center;
}

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

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .category-overview-card,
  .ranking-layout,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-side {
    position: static;
  }

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

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

  .hero-slide {
    padding: 110px 18px 140px;
  }

  .hero-bottom,
  .search-strip,
  .section-head,
  .hero-actions,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-bottom {
    right: 18px;
    left: 18px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .ghost-btn {
    margin-left: 0;
  }

  .home-search {
    flex-direction: column;
  }

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

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

  .rank-row img {
    width: 96px;
    height: 70px;
  }

  .rank-action {
    display: none;
  }

  .detail-cover {
    width: min(320px, 100%);
  }
}

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

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

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.04em;
  }
}
