:root {
  --mist-950: #020617;
  --mist-900: #0f172a;
  --mist-800: #1e293b;
  --mist-700: #334155;
  --mist-600: #475569;
  --mist-500: #64748b;
  --mist-300: #cbd5e1;
  --mist-200: #e2e8f0;
  --mist-100: #f1f5f9;
  --mist-50: #f8fafc;
  --lake-900: #0c4a6e;
  --lake-700: #0369a1;
  --lake-600: #0284c7;
  --lake-500: #0ea5e9;
  --lake-400: #38bdf8;
  --lake-100: #e0f2fe;
  --sepia-50: #fff7ed;
  --paper: #ffffff;
  --shadow-soft: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-elevated: 0 18px 55px rgba(15, 23, 42, 0.16);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--sepia-50) 0%, var(--paper) 38%, var(--mist-50) 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, var(--mist-200), var(--lake-100));
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--lake-900);
  background: var(--lake-400);
  border-radius: 999px;
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.12);
}

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

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

.brand-text small {
  margin-top: 3px;
  color: var(--mist-300);
  font-size: 12px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--mist-200);
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--lake-400);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(226, 232, 240, 0.12);
}

.mobile-panel-inner {
  padding: 12px 0 18px;
}

.mobile-panel .nav-link {
  display: block;
  padding: 10px 0;
}

.mobile-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.mobile-category {
  padding: 7px 10px;
  color: var(--lake-400);
  background: rgba(14, 165, 233, 0.12);
  border-radius: 999px;
  font-size: 13px;
}

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

.hero-carousel {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, var(--mist-900), var(--mist-800), var(--lake-900));
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.24), transparent 30%),
    radial-gradient(circle at 82% 32%, rgba(14, 165, 233, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(12, 74, 110, 0.86));
}

.hero-inner {
  position: relative;
  min-height: 560px;
  padding: 64px 0 54px;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 52px;
  min-height: 430px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--lake-400);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--mist-200);
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0;
}

.hero-tags span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-actions,
.side-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.home-search button,
.side-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.home-search button:hover,
.side-actions a:hover {
  transform: translateY(-1px);
}

.btn-primary,
.home-search button {
  color: #ffffff;
  background: var(--lake-600);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-art {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(1.6deg);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.45));
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  cursor: pointer;
}

.hero-dot.active {
  width: 46px;
  background: var(--lake-400);
}

.home-search-section {
  position: relative;
  z-index: 2;
  margin-top: -34px;
}

.home-search,
.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.home-search {
  align-items: center;
}

.search-field,
.home-search {
  position: relative;
}

.search-field span,
.home-search span {
  position: absolute;
  left: 18px;
  top: 50%;
  color: var(--mist-500);
  transform: translateY(-50%);
}

.home-search input,
.search-field input,
.filter-selects select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--mist-200);
  color: var(--mist-900);
  background: var(--mist-50);
  border-radius: 14px;
  outline: 0;
}

.home-search input,
.search-field input {
  padding: 0 16px 0 46px;
}

.filter-selects {
  display: flex;
  gap: 10px;
}

.filter-selects select {
  min-width: 150px;
  padding: 0 12px;
}

.section {
  padding: 70px 0;
}

.section-muted {
  background: rgba(248, 250, 252, 0.82);
}

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

.section-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  color: var(--mist-900);
  font-size: clamp(24px, 3vw, 34px);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--mist-600);
}

.section-head a {
  color: var(--lake-700);
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: var(--shadow-elevated);
  transform: translateY(-4px);
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--mist-200);
}

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

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

.play-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
}

.play-pill {
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--lake-700);
  border-radius: 999px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.2);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  background: linear-gradient(135deg, var(--lake-500), var(--lake-700));
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
}

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

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--mist-500);
  font-size: 12px;
}

.movie-meta span,
.detail-meta span {
  padding: 4px 8px;
  background: var(--mist-100);
  border-radius: 999px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--mist-900);
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--lake-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 43px;
  margin: 0;
  overflow: hidden;
  color: var(--mist-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  color: var(--lake-700);
  background: var(--lake-100);
  border-radius: 7px;
  font-size: 12px;
}

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

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

.category-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--mist-200);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  box-shadow: var(--shadow-elevated);
  transform: translateY(-4px);
}

.category-thumbs {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 4px;
  height: 136px;
  padding: 4px;
  background: var(--mist-100);
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-card-body {
  padding: 18px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p {
  margin: 0;
  color: var(--mist-600);
  line-height: 1.7;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 20%, rgba(56, 189, 248, 0.22), transparent 28%),
    linear-gradient(135deg, var(--mist-900), var(--mist-800), var(--lake-900));
  padding: 76px 0;
}

.page-hero.compact {
  padding: 58px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
  color: var(--mist-300);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--lake-400);
}

.tool-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 28px 0;
}

.movie-card.filtered-out {
  display: none;
}

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

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

.detail-breadcrumb {
  margin: 0 0 18px;
  color: var(--mist-600);
}

.detail-breadcrumb a:hover {
  color: var(--lake-700);
}

.player-card,
.content-card,
.detail-info,
.side-card {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 20px;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

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

.player-button {
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: var(--lake-700);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  font-size: 30px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.86);
  border-radius: 12px;
}

.player-error.show {
  display: block;
}

.detail-info,
.content-card {
  margin-top: 18px;
  padding: 24px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--mist-700);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin-top: 18px;
}

.content-card p {
  margin: 16px 0 0;
  color: var(--mist-700);
  font-size: 16px;
  line-height: 1.9;
}

.detail-related {
  padding-bottom: 0;
}

.compact-head {
  margin-bottom: 18px;
}

.detail-side {
  position: sticky;
  top: 86px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 18px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}

.poster-side h2 {
  font-size: 22px;
}

.poster-side p {
  color: var(--mist-600);
  line-height: 1.7;
}

.side-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.side-list a {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 10px;
}

.side-list img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
}

.side-list span {
  color: var(--mist-800);
  font-weight: 700;
  line-height: 1.35;
}

.side-list a:hover span {
  color: var(--lake-700);
}

.side-actions a {
  color: var(--lake-700);
  background: var(--lake-100);
}

.site-footer {
  color: var(--mist-300);
  background: var(--mist-900);
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  line-height: 1.8;
}

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

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

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

.footer-bottom {
  margin-top: 34px;
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
}

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

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

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-inner {
    min-height: auto;
    padding: 44px 0 60px;
  }

  .hero-slide,
  .hero-slide.active {
    display: none;
  }

  .hero-slide.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-art {
    max-width: 360px;
    transform: none;
  }

  .hero-dots {
    left: 0;
    bottom: 20px;
  }

  .home-search,
  .tool-panel {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-block;
    margin-top: 12px;
  }

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

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

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

  .brand-text small {
    display: none;
  }

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

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

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

  .section {
    padding: 48px 0;
  }

  .movie-card-body,
  .detail-info,
  .content-card,
  .side-card {
    padding: 16px;
  }

  .player-button {
    width: 64px;
    height: 64px;
  }
}
