:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --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 4px 6px -1px rgba(15, 23, 42, 0.12), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 38px -18px rgba(15, 23, 42, 0.30);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--mist-900);
  background: linear-gradient(180deg, var(--mist-50), var(--white));
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--mist-900);
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-size: 14px;
  box-shadow: 0 12px 20px -14px var(--primary-700);
}

.site-logo-text {
  font-size: 20px;
  line-height: 1;
}

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

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

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

.header-search,
.mobile-search,
.search-hero-form {
  display: flex;
  align-items: stretch;
}

.header-search input,
.mobile-search input,
.search-hero-form input,
.filter-box input {
  min-width: 0;
  border: 1px solid var(--mist-300);
  border-radius: 10px 0 0 10px;
  padding: 10px 14px;
  color: var(--mist-900);
  outline: none;
  background: var(--white);
}

.header-search input:focus,
.mobile-search input:focus,
.search-hero-form input:focus,
.filter-box input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.header-search button,
.mobile-search button,
.search-hero-form button {
  border: 0;
  border-radius: 0 10px 10px 0;
  padding: 0 16px;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 700;
}

.header-search input {
  width: 210px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--mist-700);
  font-size: 24px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--mist-200);
  padding: 16px;
  background: var(--white);
}

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

.mobile-search {
  margin-bottom: 14px;
}

.mobile-search input {
  width: 100%;
}

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

.mobile-nav .nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--mist-50);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--mist-900);
}

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

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

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

.hero-layer {
  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.08));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 28px;
  max-width: 620px;
  color: var(--mist-200);
  font-size: 18px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--primary-600);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

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

.btn-light {
  background: var(--white);
  color: var(--primary-700);
  box-shadow: var(--shadow-card);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.section {
  padding: 54px 0;
}

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

.section-muted {
  background: var(--mist-50);
}

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

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

.section-heading h2,
.section-heading h1 {
  font-size: 28px;
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--mist-600);
  line-height: 1.75;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-compact .movie-poster {
  aspect-ratio: 16 / 10;
}

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

.movie-card:hover .movie-poster img,
.media-list-item:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

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

.movie-card:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.70);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

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

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

.movie-card a:hover h2,
.movie-card h2 a:hover {
  color: var(--primary-600);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--mist-500);
  font-size: 13px;
}

.movie-meta span {
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--mist-100);
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
}

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

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

.media-list-item {
  display: flex;
  gap: 14px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.media-list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.media-thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--mist-200);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-right: 14px;
}

.media-copy strong {
  color: var(--mist-900);
  font-size: 16px;
  line-height: 1.4;
}

.media-copy em {
  margin-top: 6px;
  color: var(--mist-600);
  font-size: 14px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  color: var(--mist-900);
  font-size: 22px;
}

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

.category-count {
  color: var(--primary-700);
  font-weight: 800;
}

.category-preview {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.category-preview a {
  color: var(--mist-600);
  font-size: 14px;
}

.category-preview a:hover {
  color: var(--primary-600);
}

.filter-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--mist-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-box input {
  width: min(420px, 100%);
  border-radius: 10px;
}

.filter-count {
  color: var(--mist-600);
  font-weight: 700;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 180px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

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

.ranking-row:nth-child(-n + 3) .rank-number {
  background: var(--primary-600);
  color: var(--white);
}

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

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-main h2 {
  margin: 0;
  font-size: 20px;
}

.rank-main p {
  margin: 8px 0 0;
  color: var(--mist-600);
  line-height: 1.6;
}

.rank-views {
  color: var(--primary-700);
  font-weight: 900;
}

.detail-hero {
  padding: 34px 0 50px;
  background: linear-gradient(180deg, var(--mist-900), var(--mist-800));
  color: var(--white);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--mist-300);
  font-size: 14px;
}

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

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

.player-shell {
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 34px 52px -30px rgba(0, 0, 0, 0.75);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.65));
  color: var(--white);
  font-size: 62px;
}

.player-start span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-600);
  padding-left: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

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

.detail-title {
  margin-top: 26px;
}

.detail-title h1 {
  color: var(--white);
  font-size: clamp(30px, 4vw, 46px);
}

.detail-title p {
  margin: 14px 0 0;
  color: var(--mist-200);
  font-size: 18px;
  line-height: 1.8;
}

.detail-side {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--mist-800);
}

.detail-side-body {
  padding: 20px;
}

.detail-side-body dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px 12px;
  margin: 0;
  color: var(--mist-200);
}

.detail-side-body dt {
  color: var(--mist-400);
}

.detail-content {
  padding: 54px 0;
}

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

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

.article-panel {
  padding: 30px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--mist-900);
  font-size: 24px;
}

.article-panel p {
  margin: 0 0 20px;
  color: var(--mist-700);
  line-height: 1.95;
  font-size: 16px;
}

.side-panel {
  padding: 20px;
}

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

.index-list {
  columns: 4 220px;
  column-gap: 28px;
}

.index-list a {
  display: block;
  break-inside: avoid;
  margin-bottom: 9px;
  color: var(--mist-700);
  line-height: 1.55;
}

.index-list a:hover {
  color: var(--primary-600);
}

.search-box-large {
  max-width: 760px;
  margin-top: 22px;
}

.search-box-large .search-hero-form input {
  flex: 1;
  font-size: 18px;
  padding: 14px 18px;
}

.search-box-large .search-hero-form button {
  padding: 0 28px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

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

.site-footer p {
  margin: 14px 0 0;
  color: var(--mist-400);
  line-height: 1.8;
}

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

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .detail-side {
    max-width: 520px;
  }
}

@media (max-width: 760px) {
  .hero {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .section {
    padding: 40px 0;
  }

  .section-heading {
    display: block;
  }

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

  .two-column {
    grid-template-columns: 1fr;
  }

  .filter-box {
    display: block;
  }

  .filter-box input {
    width: 100%;
    margin-top: 12px;
  }

  .ranking-row {
    grid-template-columns: 48px 96px 1fr;
    gap: 12px;
  }

  .rank-views {
    grid-column: 3;
  }

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

@media (max-width: 520px) {
  .site-header-inner,
  .container,
  .hero-content {
    width: min(100% - 22px, 1280px);
  }

  .movie-grid,
  .movie-grid.compact,
  .category-overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .media-thumb {
    width: 128px;
  }

  .article-panel {
    padding: 22px;
  }

  .detail-title p {
    font-size: 16px;
  }
}
