:root {
  color-scheme: light;
  --emerald-950: #022c22;
  --emerald-900: #064e3b;
  --emerald-800: #065f46;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --amber-400: #f59e0b;
  --amber-300: #fbbf24;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(16, 185, 129, 0.10), transparent 28rem),
    linear-gradient(180deg, #f0fdf4 0%, #ffffff 22rem, #f8fafc 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--emerald-700), var(--green-500));
  box-shadow: 0 10px 30px rgba(4, 120, 87, 0.28);
}

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

.logo-link,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-link {
  color: var(--white);
  font-size: 21px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 15px;
  border-radius: 14px;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

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

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: var(--emerald-950);
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 44, 34, 0.94) 0%, rgba(6, 78, 59, 0.76) 46%, rgba(2, 44, 34, 0.54) 100%),
    radial-gradient(circle at 80% 20%, rgba(74, 222, 128, 0.28), transparent 26rem);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0 86px;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 760px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d1fae5;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.10);
  color: var(--emerald-700);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.15);
}

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

.btn-primary,
.btn-secondary,
.filter-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: var(--emerald-950);
  background: linear-gradient(135deg, var(--green-400), var(--amber-300));
  box-shadow: 0 15px 30px rgba(34, 197, 94, 0.24);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

.btn-primary:hover,
.btn-secondary:hover,
.filter-shortcut:hover {
  transform: translateY(-2px);
}

.hero-panel {
  border-radius: var(--radius-xl);
  padding: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.hero-mini-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  color: #d1fae5;
  font-weight: 700;
}

.hero-search {
  position: relative;
  z-index: 5;
  width: min(100% - 32px, var(--container));
  margin: -64px auto 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 15px;
  background: var(--white);
  color: var(--ink);
}

.hero-search input {
  min-height: 54px;
  padding: 0 18px;
  font-size: 16px;
}

.hero-search button {
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  padding: 0 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-700), var(--green-500));
  font-weight: 800;
  cursor: pointer;
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 62px;
  background: var(--green-400);
}

.section-block,
.page-panel {
  margin: 72px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p,
.page-title p,
.category-card p,
.detail-section p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card,
.category-card,
.rank-row,
.detail-info,
.detail-section,
.filter-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: var(--shadow-soft);
}

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald-900), var(--emerald-600));
}

.poster-link img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.score-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--emerald-950);
  background: linear-gradient(135deg, var(--amber-300), var(--green-400));
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--emerald-700);
}

.card-body p {
  min-height: 48px;
  margin: 8px 0 13px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f9;
}

.card-tags {
  margin-top: 12px;
}

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

.category-card {
  min-height: 174px;
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  background: #ecfdf5;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card strong {
  color: var(--emerald-700);
}

.page-title {
  margin: 44px 0 26px;
  padding: 42px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(6, 78, 59, 0.94), rgba(34, 197, 94, 0.78)),
    radial-gradient(circle at 80% 0%, rgba(251, 191, 36, 0.32), transparent 22rem);
  box-shadow: var(--shadow);
}

.page-title h1,
.page-title p {
  color: var(--white);
}

.page-title p {
  max-width: 860px;
  margin: 14px 0 0;
  color: #dcfce7;
}

.filter-panel {
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-weight: 800;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 13px;
}

.filter-result {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--emerald-700);
  font-weight: 900;
}

.filter-shortcut {
  color: var(--white);
  background: var(--emerald-700);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 86px 1fr 70px;
  gap: 18px;
  align-items: center;
  border-radius: 20px;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--emerald-950);
  background: linear-gradient(135deg, var(--amber-300), var(--green-400));
  font-weight: 900;
}

.rank-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info a {
  display: inline-block;
  font-size: 18px;
  font-weight: 900;
}

.rank-info a:hover {
  color: var(--emerald-700);
}

.rank-info p {
  margin: 7px 0 9px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-score {
  justify-self: end;
  color: var(--amber-400);
  font-size: 24px;
  font-weight: 900;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  background: var(--emerald-900);
}

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

.detail-info {
  border-radius: var(--radius-xl);
  padding: 32px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--emerald-700);
  font-weight: 800;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
}

.detail-lead {
  color: #334155;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta,
.detail-tags {
  margin-top: 16px;
}

.detail-actions {
  margin-top: 28px;
}

.player-block {
  margin: 34px 0;
}

.player-block h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.64), rgba(6, 78, 59, 0.42));
  cursor: pointer;
}

.play-overlay span:last-child {
  display: block;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: var(--emerald-950);
  background: linear-gradient(135deg, var(--green-400), var(--amber-300));
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(34, 197, 94, 0.36);
}

.player-shell.is-playing .play-overlay {
  display: none;
}

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

.detail-section {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.detail-section h2 {
  font-size: 28px;
  margin-bottom: 14px;
}

.detail-section p {
  margin: 0 0 18px;
  font-size: 16px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 17px;
  padding: 10px;
  background: #f8fafc;
}

.side-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  margin-bottom: 5px;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 84px;
  color: #d1fae5;
  background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950));
}

.footer-grid {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--green-400);
  font-size: 18px;
}

.footer-grid p {
  max-width: 420px;
  color: #bbf7d0;
  line-height: 1.8;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #d1fae5;
}

.footer-grid a:hover {
  color: var(--white);
}

.footer-bottom {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #a7f3d0;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--emerald-800), var(--green-500));
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 13px 15px;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 760px;
  }

  .hero-inner {
    padding-top: 48px;
    gap: 24px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 44px;
  }

  .hero-search {
    grid-template-columns: 1fr;
    margin-top: -42px;
  }

  .hero-controls {
    bottom: 118px;
  }

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

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

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

  .rank-score {
    grid-column: 3;
    justify-self: start;
    font-size: 18px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .page-title {
    padding: 28px;
  }

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

@media (max-width: 480px) {
  .main-wrap,
  .nav-wrap,
  .hero-inner,
  .hero-search,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, var(--container));
  }

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

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

  .card-body p {
    min-height: auto;
  }

  .detail-info,
  .detail-section {
    padding: 22px;
  }
}
