:root {
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --border: #e2e8f0;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.7;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald);
  background: #ecfdf5;
}

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav-panel {
  display: none;
  border-top: 1px solid var(--border);
  padding: 10px 16px 18px;
  background: #ffffff;
}

.mobile-nav-panel a {
  display: block;
  padding: 11px 10px;
  border-radius: 10px;
  color: #334155;
  font-weight: 650;
}

.mobile-nav-panel a:hover {
  color: var(--emerald);
  background: #f0fdfa;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #0d9488 48%, #0891b2);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  opacity: 0.78;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.20), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.70), rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.66));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 54px 0;
}

.hero-panel {
  max-width: 760px;
}

.eyebrow,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 13px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--emerald-dark);
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
}

.btn-primary:hover {
  background: #f8fafc;
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-green {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 25px rgba(5, 150, 105, 0.25);
}

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

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-desc {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--text-muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: var(--radius);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 150, 105, 0.25);
  box-shadow: var(--shadow-md);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 10%, rgba(16, 185, 129, 0.4), transparent 35%),
    linear-gradient(135deg, #064e3b, #0f766e, #155e75);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.72));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #064e3b;
  background: rgba(255, 255, 255, 0.92);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-row span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

.movie-card h3 {
  min-height: 54px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.genre-line {
  min-height: 22px;
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 700;
}

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

.category-card {
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(5, 150, 105, 0.28);
}

.category-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.category-card span {
  color: var(--text-muted);
  font-size: 13px;
}

.gradient-banner {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.gradient-banner h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.gradient-banner p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.filter-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 15px;
  outline: none;
  font: inherit;
}

.filter-input:focus {
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.10);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.category-tabs a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--border);
  font-weight: 700;
}

.category-tabs a:hover,
.category-tabs a.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.05);
}

.rank-row:hover {
  border-color: rgba(5, 150, 105, 0.25);
  color: var(--emerald-dark);
}

.list-rank {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 32px;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

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

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

.detail-hero {
  padding: 38px 0 54px;
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.24), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.breadcrumb {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 14px;
}

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

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

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #064e3b, #0f766e, #155e75);
  box-shadow: var(--shadow-md);
}

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

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.detail-lead {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 750;
}

.content-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.content-card + .content-card {
  margin-top: 20px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.content-card p {
  margin: 0 0 12px;
  color: #334155;
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow-md);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-meta {
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.player-meta h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 40px);
}

.player-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  margin-top: 58px;
  padding: 48px 0 0;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 36px;
}

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

.site-footer p {
  max-width: 440px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
}

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

.footer-bottom {
  margin-top: 36px;
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.index-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.sitemap-grid {
  columns: 4 220px;
}

.sitemap-grid a {
  display: block;
  break-inside: avoid;
  padding: 7px 0;
  color: #334155;
}

.sitemap-grid a:hover {
  color: var(--emerald);
}

.hide-by-filter {
  display: none !important;
}

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

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

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

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

  .mobile-nav-toggle {
    display: block;
  }

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

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

  .category-grid,
  .footer-grid,
  .index-columns,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-meta {
    grid-column: 2;
  }

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

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

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

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

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

  .section {
    padding: 42px 0;
  }

  .filter-bar {
    display: block;
  }

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