:root {
  --mist-50: #f8f9fa;
  --mist-100: #f1f3f5;
  --mist-200: #e9ecef;
  --mist-300: #dee2e6;
  --mist-500: #868e96;
  --mist-600: #495057;
  --mist-700: #343a40;
  --mist-900: #212529;
  --fog-50: #f0f9ff;
  --fog-100: #e0f2fe;
  --fog-400: #38bdf8;
  --fog-600: #0284c7;
  --fog-700: #0369a1;
  --fog-900: #0c4a6e;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50), var(--white));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(222, 226, 230, 0.85);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--mist-900);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--fog-400), var(--fog-700));
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 12px;
  color: var(--mist-700);
  border-radius: 10px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--fog-700);
  background: var(--fog-50);
}

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

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid var(--mist-300);
  background: var(--white);
  color: var(--mist-900);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--fog-400);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
  color: var(--white);
  background: var(--fog-600);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.22);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: var(--fog-700);
  transform: translateY(-1px);
}

.secondary-btn {
  color: var(--fog-700);
  background: var(--fog-50);
  border: 1px solid var(--fog-100);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  background: var(--white);
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
}

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

.search-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
}

.search-item:hover {
  background: var(--mist-100);
}

.search-item img {
  width: 46px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--mist-200);
}

.search-item strong {
  display: block;
  font-size: 14px;
  color: var(--mist-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-item span {
  display: block;
  margin-top: 4px;
  color: var(--mist-500);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--mist-100);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 18px;
  border-top: 1px solid var(--mist-200);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--mist-700);
  font-weight: 700;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--mist-900);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 96px 20px 86px;
  color: var(--white);
}

.hero-copy {
  max-width: 720px;
  animation: slideUp 0.58s ease both;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.hero-copy p {
  margin: 0 0 24px;
  color: rgba(248, 249, 250, 0.88);
  font-size: clamp(16px, 2.3vw, 21px);
  line-height: 1.75;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fog-100);
  background: rgba(14, 165, 233, 0.22);
  border: 1px solid rgba(224, 242, 254, 0.3);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  right: calc((100vw - min(var(--max), calc(100vw - 40px))) / 2 + 20px);
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

.section,
.page-hero,
.detail-layout,
.player-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 20px;
}

.page-hero {
  padding-top: 70px;
  padding-bottom: 40px;
}

.page-hero h1,
.section h2,
.detail-main h1 {
  margin: 0;
  color: var(--mist-900);
  letter-spacing: -0.02em;
}

.page-hero h1,
.detail-main h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p,
.section-lead {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--mist-600);
  line-height: 1.85;
  font-size: 17px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title-row h2,
.section h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}

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

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  background: var(--mist-200);
  box-shadow: var(--shadow-sm);
}

.poster-frame img,
.wide-cover img,
.square-card img,
.rank-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover img,
.wide-card:hover img,
.square-card:hover img,
.rank-item:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 132, 199, 0.88);
  opacity: 0;
  transform: scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.movie-card:hover .poster-frame::after {
  background: rgba(0, 0, 0, 0.32);
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 12px 2px 0;
}

.card-body h2,
.card-body h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover h2,
.movie-card:hover h3 {
  color: var(--fog-700);
}

.card-desc {
  min-height: 46px;
  margin: 0 0 10px;
  color: var(--mist-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc.compact {
  min-height: auto;
}

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

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span {
  color: var(--fog-700);
  background: var(--fog-50);
  border: 1px solid var(--fog-100);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.hot-strip {
  background: var(--mist-50);
  padding: 58px 0;
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 20px 16px calc((100vw - min(var(--max), calc(100vw - 40px))) / 2 + 20px);
  scroll-snap-type: x proximity;
}

.square-card {
  flex: 0 0 260px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  background: var(--mist-200);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
}

.square-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08));
}

.square-card span {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: var(--white);
  font-weight: 800;
  line-height: 1.4;
}

.wide-list {
  display: grid;
  gap: 24px;
}

.wide-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.wide-link:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.wide-cover {
  min-height: 300px;
  overflow: hidden;
  background: var(--mist-200);
}

.wide-content {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-content h3 {
  margin: 14px 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
}

.wide-content p {
  margin: 0 0 18px;
  color: var(--mist-600);
  line-height: 1.85;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-chip {
  display: block;
  padding: 22px;
  min-height: 168px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--white), var(--fog-50));
  border: 1px solid var(--mist-200);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-chip:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.category-chip strong {
  display: block;
  font-size: 22px;
  color: var(--mist-900);
  margin-bottom: 12px;
}

.category-chip span {
  color: var(--mist-600);
  line-height: 1.7;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 100px 1fr auto;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--mist-200);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.rank-number {
  font-size: 30px;
  font-weight: 900;
  color: var(--fog-700);
  text-align: center;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: var(--mist-200);
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--mist-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 36px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  background: var(--mist-200);
  box-shadow: var(--shadow-lg);
}

.breadcrumb {
  color: var(--mist-500);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: var(--fog-700);
  font-weight: 700;
}

.detail-main h1 {
  margin-bottom: 18px;
}

.detail-summary {
  color: var(--mist-700);
  font-size: 17px;
  line-height: 1.9;
  margin: 22px 0;
}

.detail-review {
  padding: 20px;
  background: var(--fog-50);
  border-left: 4px solid var(--fog-600);
  border-radius: 14px;
  color: var(--mist-700);
  line-height: 1.9;
}

.player-section {
  padding-top: 10px;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--mist-900);
  box-shadow: var(--shadow-lg);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--black);
  position: relative;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.24), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--fog-600);
  box-shadow: 0 18px 42px rgba(2, 132, 199, 0.42);
  font-size: 30px;
  padding-left: 4px;
}

.play-overlay strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

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

.player-caption {
  padding: 18px 22px 22px;
  color: var(--white);
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.player-caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

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

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

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  color: var(--white);
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 12px 0 0;
  line-height: 1.8;
}

.site-footer h2 {
  color: var(--white);
  margin: 0 0 16px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--mist-300);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--fog-400);
}

.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--mist-500);
  font-size: 14px;
  text-align: center;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: var(--radius-md);
  color: var(--mist-600);
  background: var(--mist-100);
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

@media (max-width: 820px) {
  .hero,
  .hero-content {
    min-height: 66vh;
  }

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

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 28px;
  }

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

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

  .wide-cover {
    min-height: 220px;
  }

  .detail-cover {
    max-width: 340px;
  }

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

  .rank-item {
    grid-template-columns: 46px 82px 1fr;
  }

  .rank-item .primary-btn {
    grid-column: 2 / 4;
    text-align: center;
  }

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

@media (max-width: 560px) {
  .header-inner {
    height: 64px;
  }

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

  .section,
  .page-hero,
  .detail-layout,
  .player-section {
    padding-left: 14px;
    padding-right: 14px;
  }

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

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

  .card-body h2,
  .card-body h3 {
    font-size: 15px;
  }

  .card-desc {
    font-size: 13px;
  }

  .wide-content {
    padding: 24px;
  }

  .rank-number {
    font-size: 22px;
  }

  .rank-cover {
    display: none;
  }

  .rank-item {
    grid-template-columns: 44px 1fr;
  }

  .rank-item .primary-btn {
    grid-column: 1 / 3;
  }

  .play-overlay span {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }
}
