:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef6f6;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --cyan: #0891b2;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #eef6f6 48%, #f0f9ff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1.15;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

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

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: #e6fffb;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-nav.open {
  display: flex;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: 92px 24px 90px;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

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

.hero-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  color: #ffffff;
}

.eyebrow,
.section-heading span,
.page-hero span,
.detail-label,
.feature-note span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(204, 251, 241, 0.9);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 850px;
  margin: 18px 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #d9fffb;
  font-size: clamp(18px, 2.3vw, 26px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(8, 145, 178, 0.36);
}

.ghost-btn {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  width: 34px;
  border-radius: 999px;
  background: #ffffff;
}

.section-wrap,
.detail-wrap {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.section-heading.compact {
  display: block;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading a,
.text-link {
  color: var(--primary-dark);
  font-weight: 800;
}

.search-panel {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.search-panel input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 12px 16px;
  background: #f8fafc;
  color: var(--ink);
}

.search-panel button,
.filter-btn {
  border: 0;
  border-radius: 16px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-btn {
  min-height: 38px;
  color: #0f766e;
  background: #ccfbf1;
}

.filter-btn.active,
.filter-btn:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

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

.category-tile,
.category-cover {
  min-height: 170px;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  overflow: hidden;
  transition: 0.22s ease;
}

.category-tile:hover,
.category-cover:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.category-tile span,
.category-cover strong {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: #ccfbf1;
  font-size: 14px;
}

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

.movie-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0d9488);
}

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

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

.play-badge,
.rank-badge {
  position: absolute;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 900;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rank-badge {
  top: 12px;
  right: 12px;
  padding: 5px 8px;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 26px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 1fr minmax(180px, 0.8fr) 70px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  transition: 0.2s ease;
}

.rank-row:hover {
  border-color: #99f6e4;
  transform: translateX(4px);
}

.rank-number {
  color: var(--primary-dark);
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

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

.rank-action {
  color: var(--primary-dark);
  font-weight: 800;
  text-align: right;
}

.feature-note {
  position: sticky;
  top: 96px;
  padding: 30px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0f766e);
  box-shadow: var(--shadow);
}

.feature-note p {
  color: #d9fffb;
}

.page-hero {
  min-height: 360px;
  padding: 84px 24px;
  display: grid;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0d9488);
  background-size: cover;
  background-position: center;
}

.page-hero.slim {
  min-height: 280px;
}

.page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #d9fffb;
  font-size: 18px;
}

.category-card-large {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

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

.category-card-body h2 {
  margin: 0 0 8px;
}

.category-card-body p {
  color: var(--muted);
}

.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preview-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 12px;
}

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

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #0d9488);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #334155;
  font-size: 20px;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 22px 0;
  list-style: none;
}

.fact-list li {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.fact-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.fact-list strong {
  display: block;
  margin-top: 4px;
}

.player-section,
.detail-content,
.detail-related {
  margin-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.34), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.35);
  font-size: 30px;
}

.player-box.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

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

.detail-content article {
  padding: 28px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
}

.detail-content p {
  margin: 0;
  color: #334155;
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  justify-content: flex-end;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
  }

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

  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }

  .rank-row {
    grid-template-columns: 56px 1fr;
  }

  .rank-meta,
  .rank-action {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

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

  .brand-text em {
    display: none;
  }

  .section-wrap,
  .detail-wrap {
    width: min(100% - 28px, 1280px);
    padding: 38px 0;
  }

  .hero-slide {
    padding: 78px 16px 80px;
  }

  .movie-grid,
  .category-grid,
  .category-page-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    min-height: 44px;
  }

  .section-heading {
    display: block;
  }

  .detail-hero {
    padding: 18px;
  }

  .fact-list {
    grid-template-columns: 1fr;
  }
}
