:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --bamboo-50: #f0fdf4;
  --bamboo-100: #dcfce7;
  --bamboo-600: #16a34a;
  --mist-50: #f8fafc;
  --mist-100: #f1f5f9;
  --mist-200: #e2e8f0;
  --mist-300: #cbd5e1;
  --mist-400: #94a3b8;
  --mist-500: #64748b;
  --mist-600: #475569;
  --mist-700: #334155;
  --mist-800: #1e293b;
  --mist-900: #0f172a;
  --white: #ffffff;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--mist-50), var(--white));
  color: var(--mist-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--mist-200);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mist-900);
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--primary-600);
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  background: var(--primary-50);
  border-radius: 10px;
}

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

.nav-link {
  color: var(--mist-700);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-600);
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  border: 1px solid var(--mist-300);
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.search-panel input,
.search-panel select,
.filter-select {
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  color: var(--mist-900);
}

.header-search button {
  width: 44px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--mist-500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-search:focus-within {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--mist-100);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--mist-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--mist-200);
  background: var(--white);
  padding: 14px 24px 20px;
}

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

.mobile-link {
  display: block;
  padding: 10px 0;
  color: var(--mist-700);
  font-weight: 650;
}

.mobile-link.is-active {
  color: var(--primary-600);
}

.mobile-search {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
  background: var(--mist-100);
  border-radius: 10px;
}

.mobile-search button,
.btn,
.hero-button,
.search-panel button,
.filter-button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.mobile-search button,
.btn.primary,
.hero-button,
.search-panel button {
  color: var(--white);
  background: var(--primary-600);
}

.mobile-search button:hover,
.btn.primary:hover,
.hero-button:hover,
.search-panel button:hover {
  background: var(--primary-700);
}

.main-wrap,
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  color: var(--white);
  background: var(--mist-900);
}

.hero-slider {
  position: relative;
  height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
  padding: 72px 24px;
}

.hero-text {
  max-width: 690px;
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: 18px;
}

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

.hero-button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
}

.hero-link,
.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-link:hover,
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

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

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

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 18px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 56px 0;
}

.section.soft {
  background: linear-gradient(90deg, var(--bamboo-50), var(--primary-50));
}

.section.dark {
  background: var(--mist-900);
  color: var(--white);
}

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

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

.section-title h2 {
  font-size: 28px;
}

.section-title p,
.page-hero p,
.category-lead,
.detail-lead {
  margin: 8px 0 0;
  color: var(--mist-600);
}

.section-link {
  color: var(--primary-600);
  font-weight: 750;
}

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

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--mist-200);
  overflow: hidden;
}

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

.movie-card-link:hover .movie-cover img,
.compact-row:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 70%);
  transition: opacity 0.25s ease;
}

.cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cover-play svg {
  width: 58px;
  height: 58px;
  padding: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.movie-card-link:hover .cover-shade,
.movie-card-link:hover .cover-play {
  opacity: 1;
}

.duration,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: var(--primary-600);
}

.movie-info {
  padding: 16px;
}

.movie-info h3,
.compact-row h3,
.category-card h3 {
  margin: 0;
  color: var(--mist-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3,
.compact-row:hover h3,
.category-card:hover h3 {
  color: var(--primary-600);
}

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

.movie-meta,
.movie-tags,
.detail-meta,
.detail-tags,
.page-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta {
  margin-top: 12px;
  color: var(--mist-500);
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--mist-300);
}

.movie-tags,
.detail-tags,
.page-tags {
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span,
.page-tags span,
.meta-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--mist-100);
  color: var(--mist-600);
  font-size: 12px;
  font-weight: 650;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.category-card img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 55%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  transition: transform 0.5s ease;
}

.category-card h3,
.category-card p {
  position: relative;
  z-index: 1;
  max-width: 70%;
}

.category-card p {
  color: var(--mist-600);
  margin: 10px 0 18px;
}

.category-card span {
  position: relative;
  z-index: 1;
  color: var(--primary-600);
  font-weight: 800;
}

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

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

.compact-row {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding-right: 14px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.row-cover {
  height: 92px;
  overflow: hidden;
  background: var(--mist-200);
}

.row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.row-main {
  min-width: 0;
  padding: 10px 0;
}

.row-main p {
  margin: 5px 0;
  color: var(--mist-600);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-main span {
  color: var(--mist-500);
  font-size: 13px;
}

.row-rank {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 900;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-50), var(--bamboo-50));
  border-bottom: 1px solid var(--mist-200);
}

.page-hero .main-wrap {
  padding-top: 46px;
  padding-bottom: 42px;
}

.page-hero h1 {
  font-size: clamp(30px, 4vw, 44px);
}

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

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

.search-panel,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--mist-200);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.search-panel input,
.search-panel select,
.filter-select {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--mist-100);
  color: var(--mist-900);
}

.search-panel input {
  min-width: 260px;
  flex: 1;
}

.search-panel button,
.filter-button {
  padding: 11px 16px;
}

.filter-button {
  background: var(--mist-100);
  color: var(--mist-700);
}

.filter-button.is-active,
.filter-button:hover {
  background: var(--primary-600);
  color: var(--white);
}

.empty-state {
  display: none;
  padding: 42px 24px;
  text-align: center;
  color: var(--mist-600);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 32px;
  padding-top: 34px;
  padding-bottom: 58px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: var(--shadow-xl);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.20);
  cursor: pointer;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.player-cover:hover {
  background: rgba(0, 0, 0, 0.33);
}

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

.play-ring {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-600);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.player-cover:hover .play-ring {
  transform: scale(1.08);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  margin: 0;
  color: var(--white);
  font-weight: 700;
}

.detail-card,
.side-card,
.story-card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.detail-card {
  margin-top: 24px;
  padding: 26px;
}

.detail-title h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.detail-meta {
  margin-top: 12px;
  color: var(--mist-600);
}

.detail-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--mist-300);
}

.story-card {
  margin-top: 22px;
  padding: 24px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  color: var(--mist-900);
}

.story-card p {
  margin: 0;
  color: var(--mist-700);
  white-space: pre-line;
}

.side-card {
  padding: 22px;
  position: sticky;
  top: 88px;
}

.side-card .compact-row {
  grid-template-columns: 98px minmax(0, 1fr);
  box-shadow: none;
  border: 1px solid var(--mist-200);
  padding-right: 0;
}

.side-card .row-cover {
  height: 74px;
}

.side-card .row-main h3 {
  font-size: 15px;
}

.side-card .row-main p {
  display: none;
}

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

.category-overview .category-card {
  min-height: 210px;
}

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

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

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

.footer-logo {
  color: var(--white);
  font-size: 20px;
  font-weight: 850;
}

.footer-brand p {
  max-width: 340px;
  color: var(--mist-400);
}

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

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

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

.footer-links a:hover {
  color: var(--primary-100);
}

.footer-bottom {
  border-top: 1px solid var(--mist-800);
  padding: 18px 24px;
  text-align: center;
  color: var(--mist-400);
}

[data-card].is-hidden {
  display: none !important;
}

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

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

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

  .nav-toggle {
    display: flex;
  }

  .hero,
  .hero-slider {
    min-height: 560px;
    height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.28));
  }

  .hero-content {
    align-self: end;
    padding-bottom: 84px;
  }

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .main-wrap,
  .section-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .section {
    padding: 42px 0;
  }

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

  .movie-grid,
  .movie-grid.three,
  .movie-grid.dense,
  .category-strip,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .compact-row {
    grid-template-columns: 118px minmax(0, 1fr);
    padding-right: 0;
  }

  .row-rank {
    position: absolute;
    right: 10px;
    top: 10px;
  }

  .row-cover {
    height: 86px;
  }

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

  .play-ring {
    width: 70px;
    height: 70px;
  }
}
