:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(14, 165, 233, 0.22);
  --line-soft: rgba(14, 165, 233, 0.12);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --subtle: #64748b;
  --sky: #38bdf8;
  --sky-deep: #0ea5e9;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --pink: #f472b6;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.2), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(34, 211, 238, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.84));
  backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-deep), var(--cyan));
  box-shadow: 0 12px 34px rgba(14, 165, 233, 0.38);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-dropdown:hover > button {
  color: #fff;
  background: rgba(14, 165, 233, 0.16);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 48px;
  left: 0;
  display: grid;
  width: 178px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-panel a:hover {
  color: #fff;
  background: rgba(14, 165, 233, 0.15);
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(280px, 24vw);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
}

.nav-search input,
.local-filter input,
.search-page-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search button,
.search-page-box button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-deep), var(--cyan));
  cursor: pointer;
}

.nav-search button {
  padding: 7px 12px;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: #e2e8f0;
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-panel a:hover {
  background: rgba(14, 165, 233, 0.14);
}

.hero {
  position: relative;
  min-height: 100vh;
  padding: 112px 0 64px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 88px auto auto 52%;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.16);
  filter: blur(80px);
}

.hero-stage,
.home-main,
.page-shell,
.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slide {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 48px;
}

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

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: #fff;
}

.hero-line,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: #cbd5e1;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(14, 165, 233, 0.24);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--sky-deep), var(--cyan));
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.32);
}

.ghost-btn {
  margin-left: 12px;
  border: 1px solid var(--line);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

.hero-media {
  position: relative;
  isolation: isolate;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.6));
  box-shadow: var(--shadow);
}

.hero-media::after,
.poster-link::after,
.detail-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.88));
}

.hero-media img {
  aspect-ratio: 16 / 10;
  height: min(58vh, 540px);
  object-fit: cover;
  transition: 0.45s ease;
}

.hero-media:hover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.hero-media span {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  color: #e2e8f0;
  font-weight: 700;
}

.hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 10px;
  width: min(1280px, calc(100% - 32px));
  margin: 30px auto 0;
}

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

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

.home-main,
.page-shell {
  padding: 48px 0 72px;
}

.page-shell {
  padding-top: 112px;
}

.section-block {
  margin-top: 46px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  color: #fff;
}

.section-head a {
  color: var(--sky);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.26);
  transition: 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 22px 58px rgba(14, 165, 233, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a, #020617);
}

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

.movie-year,
.movie-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.movie-year {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.9);
}

.movie-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.86);
}

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

.movie-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--subtle);
}

.movie-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #fff;
}

.movie-card h2 a:hover {
  color: var(--sky);
}

.movie-desc {
  display: -webkit-box;
  min-height: 56px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #a7b4c8;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.glass-block,
.page-hero,
.detail-hero,
.watch-section,
.detail-content article {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.38));
  box-shadow: var(--shadow);
}

.glass-block,
.page-hero {
  padding: clamp(24px, 4vw, 42px);
}

.category-grid,
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.category-card,
.category-overview-card {
  display: block;
  min-height: 156px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.4);
  transition: 0.22s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.09);
}

.category-card span,
.category-title {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

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

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  color: var(--sky);
  font-size: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.64fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(170px, 0.7fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(14, 165, 233, 0.38);
  background: rgba(14, 165, 233, 0.1);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #fff7ed;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

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

.rank-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-page-list {
  gap: 12px;
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.local-filter,
.search-page-box {
  display: flex;
  gap: 10px;
  max-width: 680px;
  margin-top: 26px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
}

.search-page-box button {
  padding: 0 22px;
}

.filter-grid .is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(22px, 4vw, 42px);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(145deg, #0f172a, #020617);
  box-shadow: 0 22px 58px rgba(2, 6, 23, 0.42);
}

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

.detail-copy {
  align-self: center;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.1);
}

.large-tags span {
  min-height: 30px;
  padding: 5px 10px;
}

.watch-section {
  margin-top: 34px;
  padding: clamp(18px, 3vw, 30px);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 78px rgba(2, 6, 23, 0.5);
}

.video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: 0.22s ease;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  border-radius: 999px;
  color: #fff;
  font-size: 28px;
  background: linear-gradient(135deg, var(--sky-deep), var(--cyan));
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.42);
}

.video-frame.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.detail-content article {
  padding: 26px;
}

.detail-content h2 {
  margin: 0 0 14px;
  color: #fff;
}

.detail-content p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #fff;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--sky);
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

.empty-results {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

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

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

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-media img {
    height: auto;
  }

  .mini-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  }
}

@media (max-width: 680px) {
  .nav-wrap {
    width: min(100% - 22px, 1280px);
    height: 64px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero,
  .page-shell {
    padding-top: 88px;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-line,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

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

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

  .section-head,
  .rank-item {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

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

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

  .movie-card h2 {
    font-size: 16px;
  }

  .movie-desc {
    min-height: 44px;
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .page-hero,
  .glass-block,
  .detail-hero,
  .watch-section,
  .detail-content article {
    border-radius: 20px;
  }

  .search-page-box,
  .local-filter {
    border-radius: 20px;
  }
}
