:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(34, 211, 238, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
  --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.16), transparent 36rem),
    radial-gradient(circle at 85% 10%, rgba(96, 165, 250, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #07111f 50%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.34);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a,
.breadcrumb a {
  color: var(--soft);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.breadcrumb a:hover {
  color: var(--cyan);
}

.nav-search,
.mobile-search,
.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search {
  width: 310px;
}

.nav-search input,
.mobile-search input,
.search-shell input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.search-shell input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
  background: rgba(15, 23, 42, 1);
}

.nav-search button,
.mobile-search button,
.search-shell button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 17px;
  color: #03101d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.18);
}

.nav-search button:hover,
.mobile-search button:hover,
.search-shell button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.26);
}

.ghost-btn {
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slider {
  position: relative;
  min-height: 620px;
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.62);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 38%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  align-items: center;
  max-width: 720px;
  padding: 82px 0 110px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  padding: 8px 13px;
}

.hero h1,
.page-title h1,
.detail-info h1 {
  margin: 20px 0 14px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero h1 span,
.page-title h1 span {
  background: linear-gradient(90deg, #f8fafc, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p,
.page-title p {
  margin: 0;
  max-width: 650px;
  color: #d6e0ee;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta,
.meta-chips,
.card-meta,
.tag-row,
.category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

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

.hero-meta span,
.meta-chips span,
.tag-row span,
.category-pills a,
.rank-item span {
  color: #c7d2fe;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(16px, calc((100% - 1180px) / 2));
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.main-space {
  padding: 56px 0 80px;
}

.section {
  margin-top: 54px;
}

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

.section-heading h2,
.page-title h1,
.detail-content h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-heading p,
.category-card p,
.detail-content p,
.movie-card p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card,
.category-card,
.rank-list,
.info-panel,
.player-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.28);
}

.movie-card {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.95);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

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

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

.poster-shine {
  position: absolute;
  inset: -60% auto auto -70%;
  width: 50%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(18deg);
  transition: left 0.55s ease;
}

.movie-card:hover .poster-shine {
  left: 120%;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #03101d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.26);
}

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

.card-meta {
  color: #93c5fd;
  font-size: 12px;
}

.card-meta span::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.55);
}

.card-meta span:last-child::after {
  content: "";
  margin: 0;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

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

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 72px;
  margin: 0 0 14px;
  font-size: 14px;
}

.movie-card.compact p {
  -webkit-line-clamp: 2;
  min-height: 50px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
  color: #bae6fd;
}

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

.category-card {
  display: grid;
  min-height: 210px;
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 20px;
}

.category-card strong {
  align-self: end;
  color: var(--cyan);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin: 22px 0 28px;
}

.rank-list {
  padding: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 56px 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(148, 163, 184, 0.08);
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-number {
  font-size: 24px;
  font-weight: 950;
  color: var(--cyan);
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 54px 0 66px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(30px) saturate(1.1);
  transform: scale(1.1);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72));
}

.detail-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: center;
}

.player-card {
  border-radius: 28px;
  background: #020617;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: cover;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.7));
  cursor: pointer;
  z-index: 4;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-core {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #03101d;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 0 14px rgba(34, 211, 238, 0.13), 0 24px 60px rgba(34, 211, 238, 0.24);
  font-size: 31px;
  padding-left: 5px;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 58px);
}

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

.detail-info p {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  padding: 52px 0 78px;
}

.detail-content,
.info-panel {
  padding: 28px;
}

.detail-content h2,
.related-section h2 {
  margin-top: 0;
  margin-bottom: 15px;
}

.detail-content p {
  margin: 0 0 24px;
  font-size: 16px;
}

.info-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

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

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.info-list span {
  color: var(--muted);
}

.info-list strong {
  text-align: right;
}

.related-section {
  margin-top: 26px;
}

.search-shell {
  max-width: 780px;
  margin-top: 24px;
}

.empty-state {
  display: none;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 24px;
}

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

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-bottom {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

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

  .nav-search {
    margin-left: auto;
  }

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

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

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

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 70px 0 92px;
  }

  .section-heading,
  .page-title {
    display: block;
  }

  .movie-grid,
  .category-grid,
  .detail-grid,
  .detail-content-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item span {
    display: none;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 31px;
    height: 31px;
  }

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

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

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

  .movie-card p {
    -webkit-line-clamp: 2;
    min-height: 50px;
  }

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

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

  .hero-dot {
    width: 28px;
  }

  .hero-dot.is-active {
    width: 50px;
  }

  .detail-content,
  .info-panel {
    padding: 22px;
  }
}
