:root {
  --primary: 14, 165, 233;
  --primary-dark: 3, 105, 161;
  --secondary: 6, 182, 212;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.32);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong,
.footer-brand strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgb(var(--primary));
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.24);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide.active {
  opacity: 1;
}

.hero-slide > img {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.54) 46%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
  animation: fade-up 0.72s ease both;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-kicker span,
.movie-tags span,
.side-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

.hero-kicker span:first-child {
  color: #ffffff;
  background: rgb(var(--primary));
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.hero p {
  max-width: 700px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions,
.section-heading,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(14, 165, 233, 0.42);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(12px);
  transition: 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 16px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: 0.2s ease;
}

.hero-dot.active {
  width: 36px;
  background: #ffffff;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: -38px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 4;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-heading p,
.page-hero p {
  margin: 5px 0 0;
  color: var(--muted);
}

.search-box {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.search-box span {
  color: #0369a1;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
}

.inline-search {
  margin-top: 24px;
}

.section-block {
  padding: 64px 0;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  display: inline;
  font-size: 34px;
}

.section-heading a {
  color: #0284c7;
  font-weight: 800;
}

.section-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-right: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.24);
}

.section-icon.cyan {
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
}

.wide-band {
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

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

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

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

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

.movie-card,
.movie-list-card,
.category-chip,
.detail-card,
.side-card,
.player-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.movie-card,
.category-chip,
.movie-list-card {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover,
.category-chip:hover,
.movie-list-card:hover {
  border-color: rgba(14, 165, 233, 0.35);
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

.card-cover,
.list-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-cover {
  aspect-ratio: 3 / 4;
}

.large-card .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img,
.list-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .card-cover img,
.movie-list-card:hover .list-cover img {
  transform: scale(1.05);
}

.play-dot,
.play-large {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(14, 165, 233, 0.94);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
}

.play-dot {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.card-body {
  padding: 16px;
}

.movie-tags,
.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.movie-title {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.28;
}

.movie-title:hover {
  color: #0284c7;
}

.card-body p,
.list-body p,
.detail-card p {
  color: #475569;
}

.card-body p {
  min-height: 48px;
  margin: 10px 0 14px;
  font-size: 14px;
}

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

.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 22px rgba(239, 68, 68, 0.32);
}

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

.category-chip {
  min-height: 164px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: #ffffff;
  isolation: isolate;
}

.category-chip img {
  position: absolute;
  inset: 0;
  z-index: -2;
  height: 100%;
  object-fit: cover;
}

.category-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.1));
}

.category-chip span {
  display: grid;
  gap: 4px;
}

.category-chip strong {
  font-size: 20px;
}

.category-chip em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

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

.large-category-grid .category-chip {
  min-height: 220px;
}

.list-stack {
  display: grid;
  gap: 16px;
}

.movie-list-card {
  display: grid;
  grid-template-columns: 156px 1fr;
  gap: 18px;
  padding: 14px;
}

.list-cover {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.list-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-body p {
  margin: 8px 0 12px;
}

.page-main {
  background: linear-gradient(180deg, #f8fafc, #ffffff 320px);
}

.page-hero {
  padding: 54px 0 20px;
}

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

.small-hero p {
  max-width: 760px;
  font-size: 18px;
}

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

.breadcrumb a:hover {
  color: #0284c7;
}

.detail-shell {
  padding: 36px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
}

.detail-primary {
  display: grid;
  gap: 22px;
}

.player-card {
  padding: 12px;
  background: #020617;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: #000000;
}

.player-cover img {
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.play-large {
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  font-size: 30px;
  transform: translate(-50%, -50%);
}

.player-cover.is-hidden {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 46px);
}

.detail-meta {
  margin: 18px 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f1f5f9;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  white-space: pre-line;
}

.detail-side {
  min-width: 0;
}

.sticky-card {
  position: sticky;
  top: 104px;
}

.side-card {
  padding: 18px;
}

.side-card img {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

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

.side-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
}

.side-card dt {
  color: var(--muted);
  font-weight: 700;
}

.side-card dd {
  margin: 0;
  color: #0f172a;
}

.side-card a {
  color: #0284c7;
  font-weight: 800;
}

.site-footer {
  margin-top: 36px;
  color: #cbd5e1;
  background: #0f172a;
}

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

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

.site-footer p {
  max-width: 430px;
  margin: 16px 0 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: #38bdf8;
}

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

[hidden-by-filter] {
  display: none !important;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .movie-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .sticky-card {
    position: static;
  }

  .side-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
  }
}

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

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

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

  .brand-text em {
    display: none;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .movie-list-card {
    grid-template-columns: 116px 1fr;
    gap: 12px;
  }

  .list-body p {
    display: none;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }

  .side-card {
    display: block;
  }

  .side-card img {
    max-width: 260px;
    margin-bottom: 16px;
  }

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

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .movie-list-card {
    grid-template-columns: 92px 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }
}
