:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --orange: #f97316;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

* {
  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", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 26rem),
    linear-gradient(180deg, #0f172a 0%, #020617 52%, #000 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #031014;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.42);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(135deg, #fff, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.09);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.84);
  padding: 9px;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 38%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1220px) / 2));
  bottom: 112px;
  width: min(680px, calc(100% - 48px));
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p {
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
}

.hero-summary {
  max-width: 660px;
  margin: 22px 0;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.13);
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.btn-primary,
.search-box button {
  color: #031014;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.26);
}

.btn-secondary {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.24);
}

.btn-ghost {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--border);
}

.hero-control-row {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: min(1220px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.72);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(10px);
  font-size: 32px;
  cursor: pointer;
  pointer-events: auto;
}

.content-section,
.search-panel,
.detail-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 54px 0 8px;
}

.search-panel {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

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

.search-form label,
.filter-grid label,
.wide-search {
  display: grid;
  gap: 10px;
  color: #e2e8f0;
  font-weight: 800;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.78);
  padding: 0 16px;
  outline: none;
}

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

.filter-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 16px;
}

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

.section-head h2,
.ranking-panel-head h2,
.site-footer h2,
.detail-article h2,
.detail-info-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head a,
.ranking-panel-head a {
  color: var(--cyan);
  font-weight: 900;
}

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

.category-tile,
.category-overview-card,
.ranking-panel,
.detail-info-card,
.detail-article,
.player-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.72));
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 164px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.movie-card:hover,
.small-card:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-tile span,
.category-title-link span {
  display: block;
  margin-bottom: 12px;
  color: #f8fafc;
  font-size: 22px;
  font-weight: 900;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster img,
.detail-cover,
.small-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-poster img {
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
  opacity: 0.92;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #021014;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.46);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
  font-weight: 900;
}

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

.movie-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

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

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

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.65;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
}

.ranking-panel-head {
  margin-bottom: 16px;
}

.ranking-panel-head p {
  margin: 0 0 6px;
  color: var(--cyan);
  font-weight: 900;
}

.small-card-list,
.category-preview-list {
  display: grid;
  gap: 12px;
}

.small-card {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 8px;
  background: rgba(2, 6, 23, 0.48);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.small-card img {
  height: 86px;
  border-radius: 14px;
  background: #0f172a;
}

.small-card-info {
  display: grid;
  gap: 6px;
}

.small-card strong {
  color: #f8fafc;
  line-height: 1.35;
}

.small-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.small-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: rgba(34, 211, 238, 0.18);
  font-weight: 900;
}

.page-hero {
  width: min(1220px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 58px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(249, 115, 22, 0.08)),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow);
}

.compact-hero p {
  max-width: 820px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-overview-card {
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-title-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.category-title-link strong {
  color: var(--cyan);
}

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

.detail-shell {
  padding-top: 34px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.player-card {
  padding: 12px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.82));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #031014;
  background: linear-gradient(135deg, var(--cyan), #a7f3d0);
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.36);
  font-size: 32px;
}

.detail-article {
  margin-top: 22px;
  padding: 28px;
}

.detail-article h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-article p {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-article h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 26px;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-info-card {
  padding: 22px;
}

.detail-info-card dl {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.detail-info-card div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-info-card dt {
  color: var(--muted);
}

.detail-info-card dd {
  margin: 0;
  color: #f8fafc;
}

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

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), #000);
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin-bottom: 16px;
  font-size: 22px;
}

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

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

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: #64748b;
  font-size: 14px;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid,
  .dense-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

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

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

  .header-inner {
    height: 66px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    bottom: 96px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .hero-control-row {
    bottom: 24px;
  }

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

  .search-box,
  .filter-grid,
  .footer-grid,
  .footer-bottom,
  .category-overview-grid,
  .category-preview-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .movie-card p {
    font-size: 12px;
  }

  .page-hero {
    padding: 34px 22px;
    border-radius: 26px;
  }

  .content-section {
    padding-top: 38px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .detail-article,
  .detail-info-card {
    padding: 20px;
  }
}

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