:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0f766e;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --panel: #ffffff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f9fafb;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(5, 150, 105, 0.28);
  font-size: 15px;
}

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

.brand-text strong {
  font-size: 20px;
  color: #0f172a;
}

.brand-text small {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  position: relative;
  padding: 10px 14px;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  transition: 0.22s ease;
}

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

.mobile-toggle {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
  font-size: 22px;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 18px 18px;
  background: #fff;
}

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

.hero {
  position: relative;
  height: min(70vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.12) 100%), linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 52%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 88px;
  max-width: 760px;
  color: #fff;
}

.hero-kicker {
  margin: 0 0 12px;
  color: #a7f3d0;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.hero-content p {
  margin: 0 0 20px;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn.primary {
  color: #fff;
  background: var(--emerald);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.32);
}

.btn.primary:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
}

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

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

.hero-dot.active {
  width: 36px;
  background: #fff;
}

.search-strip {
  max-width: 1180px;
  margin: -48px auto 0;
  padding: 28px;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.search-strip h2,
.section-head h2,
.inner-hero h1,
.detail-info h1,
.content-card h2,
.related-card h2 {
  margin: 0;
  color: #111827;
}

.search-strip p,
.inner-hero p,
.inner-hero span {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-form,
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-form input,
.toolbar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: 0.2s ease;
}

.search-form input:focus,
.toolbar input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.search-form button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--emerald);
  font-weight: 800;
  cursor: pointer;
}

.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

.page-section:last-child {
  padding-bottom: 72px;
}

.soft-panel {
  max-width: 1240px;
  margin-top: 28px;
  padding: 48px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head.compact h2 {
  font-size: 24px;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--emerald);
  background: #d1fae5;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald);
  font-weight: 800;
}

.section-more span {
  transition: transform 0.2s ease;
}

.section-more:hover span {
  transform: translateX(4px);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
  display: block;
  color: inherit;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-frame.wide {
  width: 192px;
  min-height: 122px;
  aspect-ratio: 16 / 10;
  flex: 0 0 192px;
}

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

.movie-card:hover .poster-frame img,
.category-card:hover figure img,
.feature-link:hover img {
  transform: scale(1.08);
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 42px;
  background: rgba(0, 0, 0, 0.36);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body h3,
.rank-row h3,
.feature-link h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p,
.rank-row p,
.feature-link p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.horizontal {
  display: flex;
  gap: 0;
}

.movie-card.horizontal .card-body {
  flex: 1;
  min-width: 0;
}

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

.movie-list.compact {
  gap: 14px;
}

.movie-list.compact .poster-frame.wide {
  width: 132px;
  min-height: 86px;
  flex-basis: 132px;
}

.movie-list.compact .card-body {
  padding: 12px;
}

.movie-list.compact .tag-row {
  display: none;
}

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

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

.category-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card figure {
  height: 168px;
  margin: 0;
  overflow: hidden;
  background: #e5e7eb;
}

.category-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card div {
  padding: 18px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card p {
  min-height: 46px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
}

.category-card span {
  color: var(--emerald);
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.rank-panel,
.content-card,
.related-card,
.detail-info {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.mini-rank-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: #f9fafb;
  transition: 0.2s ease;
}

.mini-rank-item:hover {
  color: var(--emerald);
  background: #ecfdf5;
}

.mini-rank-item strong {
  color: var(--emerald);
}

.mini-rank-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.mini-rank-item em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.feature-link {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(260px, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.feature-link div {
  padding: 24px;
}

.feature-link h3 {
  font-size: 26px;
}

.feature-link span {
  color: var(--emerald);
  font-weight: 800;
}

.inner-hero {
  padding: 64px 24px;
}

.inner-hero.green {
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.inner-hero.green > div,
.inner-hero.plain,
.detail-top,
.detail-content {
  max-width: 1280px;
  margin: 0 auto;
}

.inner-hero.green p,
.inner-hero.green span,
.inner-hero.green h1 {
  color: #fff;
}

.inner-hero.plain {
  padding-top: 48px;
  padding-bottom: 18px;
}

.inner-hero h1 {
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--emerald);
  font-weight: 800;
}

.toolbar {
  margin-top: 24px;
  align-items: flex-start;
  flex-direction: column;
}

.toolbar.wide {
  max-width: 920px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #374151;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #fff;
  border-color: var(--emerald);
  background: var(--emerald);
}

.rank-toolbar {
  margin: 0 0 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 66px 168px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-row > strong {
  color: var(--emerald);
  font-size: 24px;
}

.rank-row > img {
  width: 168px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row > span {
  justify-self: end;
  color: #64748b;
  font-weight: 800;
}

.detail-top {
  padding: 32px 24px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  color: #fff;
  background: #000;
  cursor: pointer;
  z-index: 2;
}

.play-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.play-overlay span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
  font-size: 36px;
  transform: translate(-50%, -50%);
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.detail-info > p:not(.eyebrow) {
  color: #4b5563;
  line-height: 1.8;
}

.tag-row.large {
  margin: 20px 0 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.72fr);
  gap: 26px;
}

.content-card,
.related-card {
  padding: 28px;
}

.content-card h2,
.related-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.content-card h2:not(:first-child) {
  margin-top: 32px;
}

.content-card p {
  color: #374151;
  font-size: 16px;
  line-height: 2;
}

.related-card {
  align-self: start;
  position: sticky;
  top: 96px;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #111827;
}

.footer-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
  gap: 48px;
}

.footer-logo .brand-text strong {
  color: #fff;
}

.footer-logo .brand-text small {
  color: #9ca3af;
}

.footer-brand p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-cols h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

[data-hidden="true"] {
  display: none !important;
}

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

  .split-section,
  .editor-layout,
  .detail-grid,
  .detail-content,
  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .related-card {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-wrap {
    height: 64px;
    padding: 0 16px;
  }

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

  .hero {
    min-height: 560px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 76px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .search-strip {
    grid-template-columns: 1fr;
    margin: -28px 16px 0;
    padding: 22px;
  }

  .search-form,
  .movie-card.horizontal {
    flex-direction: column;
  }

  .search-form button {
    width: 100%;
  }

  .page-section,
  .inner-hero,
  .detail-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .soft-panel {
    margin-left: 16px;
    margin-right: 16px;
    padding: 28px 18px;
  }

  .movie-grid.three,
  .movie-grid.four,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .poster-frame.wide,
  .movie-list.compact .poster-frame.wide {
    width: 100%;
    min-height: auto;
    flex-basis: auto;
  }

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

  .rank-row {
    grid-template-columns: 44px 96px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-row > img {
    width: 96px;
    height: 64px;
  }

  .rank-row > span {
    display: none;
  }

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