:root {
  --page-bg: #020617;
  --panel-bg: #0f172a;
  --panel-soft: #111c2f;
  --card-bg: #1e293b;
  --card-hover: #334155;
  --line: rgba(148, 163, 184, 0.18);
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: #22d3ee;
  --shadow: 0 25px 50px rgba(0, 0, 0, 0.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.3);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.16);
  color: var(--cyan-soft);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.26) inset;
  font-size: 13px;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.header-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.96);
  color: #ffffff;
  border-radius: 999px;
  outline: none;
}

.header-search input {
  width: 260px;
  padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  background: var(--cyan);
  color: white;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  padding: 14px 24px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search input {
  width: 100%;
  padding: 11px 15px;
}

.mobile-nav,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mobile-category {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.85);
  border-radius: 999px;
  padding: 8px 12px;
}

.site-main {
  min-height: 70vh;
}

.home-main {
  padding-top: 0;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.68) 38%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 78px;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 18px 0 0;
  max-width: 680px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

.hero-meta,
.detail-meta-grid,
.card-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-meta span,
.detail-meta-grid span,
.detail-meta-grid strong,
.rank-meta span,
.rank-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 24px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  padding: 13px 26px;
  color: #ffffff;
  background: var(--cyan);
}

.primary-button:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

.ghost-button {
  padding: 12px 24px;
  margin-left: 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.ghost-button:hover,
.text-link:hover {
  color: var(--cyan-soft);
}

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-panel {
  max-width: 1180px;
  margin: -34px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-panel a {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: #e2e8f0;
  box-shadow: var(--shadow);
}

.quick-panel a:hover {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.52);
}

.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-section,
.home-category-section {
  margin: 70px 0;
}

.section-heading,
.section-row-title {
  margin-bottom: 28px;
}

.section-heading h2,
.section-row-title h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.035em;
}

.section-heading p,
.section-row-title p,
.page-hero p,
.category-tile p,
.footer-brand p,
.copy-card p,
.rank-info p,
.search-empty {
  color: var(--muted);
  line-height: 1.75;
}

.section-row-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-row-title a {
  color: var(--cyan-soft);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  background: rgba(51, 65, 85, 0.95);
  box-shadow: var(--shadow);
}

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

.movie-card.compact .card-poster {
  aspect-ratio: 16 / 10;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.78);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.9);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  color: #ffffff;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-title {
  font-size: 15px;
}

.card-title a:hover {
  color: var(--cyan-soft);
}

.card-meta {
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
}

.card-desc {
  min-height: 46px;
  margin: 12px 0;
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.16);
  font-size: 12px;
}

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

.page-hero {
  position: relative;
  padding: 76px 24px 54px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.2), transparent 36%), linear-gradient(180deg, #0f172a, #020617);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px auto 0;
}

.category-overview,
.listing-wrap,
.ranking-wrap,
.search-wrap,
.related-section,
.detail-copy,
.player-section {
  padding-top: 54px;
  padding-bottom: 54px;
}

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

.category-tile {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 220px;
}

.category-cover-stack {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.category-cover-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tile-body {
  padding: 26px;
}

.category-tile-body h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.text-link {
  margin-top: 16px;
  color: var(--cyan-soft);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
}

.filter-bar input,
.filter-bar select {
  padding: 12px 15px;
}

.rank-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-poster span {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  font-weight: 800;
}

.rank-info h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.rank-info h2 a:hover {
  color: var(--cyan-soft);
}

.search-page-form {
  max-width: 760px;
  margin: 0 auto 34px;
}

.search-page-form input {
  width: 100%;
  padding: 15px 18px;
}

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

.detail-main {
  padding-top: 64px;
}

.detail-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px);
  transform: scale(1.08);
  opacity: 0.42;
}

.detail-bg-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.5), #020617 88%);
}

.detail-hero-inner {
  position: relative;
  width: 100%;
  padding-bottom: 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 24px;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.detail-one-line {
  margin: 18px 0 18px;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.75;
  max-width: 850px;
}

.detail-meta-grid strong {
  background: rgba(250, 204, 21, 0.16);
  color: #fde68a;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
  color: #ffffff;
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cyan);
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.35);
  font-size: 28px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.copy-card {
  padding: 28px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.copy-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.copy-card p {
  margin: 0;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 34px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-links h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

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

.footer-link-grid.compact {
  grid-template-columns: 1fr;
}

.footer-link-grid a {
  color: #cbd5e1;
}

.footer-link-grid a:hover {
  color: var(--cyan-soft);
}

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

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

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

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

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

  .detail-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    left: 22px;
    bottom: 78px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

  .quick-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
  }

  .card-grid,
  .compact-grid,
  .latest-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-tile-grid,
  .detail-copy,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-tile {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 110px 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .content-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-logo {
    font-size: 18px;
  }

  .hero-content h1,
  .detail-info h1,
  .page-hero h1 {
    letter-spacing: -0.03em;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .card-grid,
  .compact-grid,
  .latest-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }
}
