:root {
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: #ecfdf5;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --page: #f9fafb;
  --night: #07111d;
  --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: var(--page);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.65;
}

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

img,
video {
  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.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 13px;
  background: linear-gradient(135deg, #10b981, #059669 54%, #064e3b);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.28);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav .is-active,
.mobile-nav a:hover,
.mobile-nav .is-active {
  color: var(--brand);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.24), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.18), transparent 30%),
    linear-gradient(135deg, #ecfdf5 0%, #ffffff 50%, #f0fdf4 100%);
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 68px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.78fr);
  align-items: center;
  gap: 42px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  color: #047857;
  background: rgba(236, 253, 245, 0.92);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(38px, 5.2vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--brand);
}

.hero-lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: #4b5563;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.26);
}

.btn-ghost {
  color: #065f46;
  background: #ffffff;
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.hero-search {
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(209, 213, 219, 0.82);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
}

.hero-search a {
  padding: 12px 18px;
  color: #ffffff;
  background: var(--brand);
  border-radius: 14px;
  font-weight: 800;
}

.hero-chips,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-chips a,
.chip-row a,
.chip-row span {
  padding: 8px 12px;
  color: #065f46;
  background: #ffffff;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-stage {
  position: relative;
  min-height: 520px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.55s ease, transform 0.55s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-card {
  position: relative;
  overflow: hidden;
  height: 520px;
  border-radius: 34px;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-card:after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.92));
}

.hero-card-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  z-index: 1;
  color: #ffffff;
}

.hero-card-content h2 {
  margin: 10px 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-card-content p {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.hero-tags span {
  padding: 5px 9px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 26px;
  bottom: -28px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 30px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.22);
}

.hero-dots button.is-active {
  background: var(--brand);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section + .section {
  padding-top: 24px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.more-link {
  color: var(--brand);
  font-weight: 900;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.12);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.045);
  opacity: 0.9;
}

.year-badge,
.rank-badge,
.score-badge {
  position: absolute;
  z-index: 1;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  color: #064e3b;
  background: rgba(236, 253, 245, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.score-badge {
  right: 12px;
  top: 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-meta a {
  color: var(--brand);
}

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

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

.card-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.2em;
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-line.compact {
  min-height: 2.8em;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 8px;
  color: #047857;
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.2), transparent 36%),
    #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.36);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.category-tile span {
  color: var(--brand);
  font-weight: 900;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 94px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.rank-num {
  color: var(--brand);
  font-size: 28px;
  font-weight: 950;
  text-align: center;
}

.rank-item img {
  width: 94px;
  height: 126px;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.side-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.small-card img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.small-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.small-card em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  background:
    radial-gradient(circle at 18% 10%, rgba(16, 185, 129, 0.22), transparent 28%),
    linear-gradient(135deg, #ffffff, #ecfdf5);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 46px;
}

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

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

.page-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: #4b5563;
  font-size: 17px;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.filter-search {
  flex: 1;
  min-width: 260px;
  display: flex;
  gap: 10px;
}

.filter-search input,
.filter-selects select {
  min-height: 44px;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  background: #ffffff;
}

.filter-search input {
  flex: 1;
  padding: 0 14px;
}

.filter-search button {
  padding: 0 16px;
  color: #ffffff;
  background: var(--brand);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
}

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

.filter-selects select {
  padding: 0 12px;
  color: #374151;
}

.empty-state {
  display: none;
  padding: 38px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px dashed var(--line);
  border-radius: 24px;
}

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

.detail-player {
  background: #030712;
}

.player-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.7));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

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

.play-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.34);
}

.play-button svg {
  width: 38px;
  height: 38px;
  margin-left: 5px;
  fill: currentColor;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: none;
  padding: 10px 12px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.9);
  border-radius: 12px;
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-aside-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.detail-main {
  padding: 28px;
}

.detail-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span,
.detail-meta a {
  padding: 7px 11px;
  color: #065f46;
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-summary {
  color: #374151;
  font-size: 17px;
}

.article-block {
  margin-top: 28px;
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: #374151;
}

.detail-aside-card {
  position: sticky;
  top: 92px;
  overflow: hidden;
}

.detail-aside-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #0f172a;
}

.aside-body {
  padding: 18px;
}

.aside-body h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.related-grid .movie-card {
  border-radius: 20px;
}

.related-grid .card-body {
  padding: 13px;
}

.related-grid .movie-card h3 {
  font-size: 15px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 34px;
}

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

.site-footer p {
  max-width: 500px;
  margin: 16px 0 0;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #d1d5db;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

  .nav-toggle {
    display: block;
  }

  .hero-inner,
  .rank-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage,
  .hero-slider,
  .hero-card {
    min-height: auto;
  }

  .hero-card {
    height: 520px;
  }

  .side-panel,
  .detail-aside-card {
    position: static;
  }

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

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

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

@media (max-width: 760px) {
  .hero-inner {
    padding: 42px 0 50px;
  }

  .hero-card {
    height: 430px;
    border-radius: 26px;
  }

  .hero-search,
  .filter-panel,
  .filter-search {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section {
    padding: 38px 0;
  }

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

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

  .rank-num {
    font-size: 21px;
  }

  .rank-item img {
    width: 74px;
    height: 98px;
  }

  .rank-item h3 {
    font-size: 16px;
  }

  .detail-main {
    padding: 20px;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .mobile-nav,
  .section,
  .page-hero-inner,
  .player-wrap,
  .detail-layout,
  .footer-grid,
  .footer-bottom,
  .hero-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

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

  .hero-card {
    height: 380px;
  }

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

  .mobile-nav.is-open {
    grid-template-columns: 1fr;
  }
}
