:root {
  --page-bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #ecfdf5;
  --teal: #0d9488;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--page-bg);
  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;
  width: 100%;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(5, 150, 105, 0.25);
  font-size: 14px;
}

.brand-text {
  font-size: 1.35rem;
}

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

.nav-link {
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.mobile-links {
  display: grid;
  gap: 8px;
  padding: 14px 0 18px;
}

.mobile-links a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 600;
}

.mobile-links a:hover {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: overlay;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.76), rgba(3, 7, 18, 0.4), rgba(3, 7, 18, 0.08)),
    rgba(0, 0, 0, 0.28);
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  height: 100%;
  color: #ffffff;
}

.hero-copy {
  max-width: 680px;
}

.hero-pill,
.page-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: var(--emerald-dark);
  font-weight: 800;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.18);
}

.button.button-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

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

.hero-poster {
  position: relative;
  width: min(280px, 28vw);
  aspect-ratio: 3 / 4;
  flex: 0 0 auto;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.35);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 5;
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-dots {
  display: flex;
  gap: 6px;
  margin: 0 2px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

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

.section {
  padding: 70px 0 0;
}

.section-alt {
  margin-top: 70px;
  padding: 70px 0;
  background: linear-gradient(135deg, #f9fafb, #eef2f7);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--text);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--emerald);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  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);
}

.card-cover {
  position: relative;
  display: block;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
}

.card-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}

.movie-card:hover .card-cover::after {
  background: rgba(0, 0, 0, 0.25);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: var(--emerald-dark);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.86);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--emerald);
}

.card-body p {
  display: -webkit-box;
  margin: 0 0 12px;
  min-height: 44px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.93rem;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 0.84rem;
}

.card-meta span,
.detail-meta span {
  padding: 4px 8px;
  background: var(--surface-soft);
  border-radius: 999px;
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 156px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 14px;
  font-weight: 900;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.rank-item img {
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title h2 {
  margin: 0 0 5px;
  font-size: 1.02rem;
}

.rank-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.rank-action {
  color: var(--emerald-dark);
  font-weight: 800;
}

.page-hero {
  padding: 66px 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.page-title {
  max-width: 820px;
}

.page-title h1 {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.page-title p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.04rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 160px 160px;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-side,
.player-panel {
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.player-panel {
  padding: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #030712;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.18), rgba(3, 7, 18, 0.74));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 5px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.95);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
  font-size: 28px;
}

.player-start strong {
  font-size: 1.05rem;
}

.detail-content {
  padding: 26px;
}

.detail-title h1 {
  margin-bottom: 12px;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.detail-intro {
  margin: 20px 0 0;
  color: #374151;
  font-size: 1.06rem;
}

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

.content-block h2 {
  margin: 0 0 10px;
  font-size: 1.34rem;
}

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

.detail-side {
  padding: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: 18px;
}

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

.side-card {
  margin-top: 18px;
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

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

.compact-card {
  display: grid;
  gap: 6px;
}

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

.compact-card span {
  display: -webkit-box;
  overflow: hidden;
  color: #374151;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.86rem;
  font-weight: 700;
}

.hidden-card {
  display: none !important;
}

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

  .nav-toggle {
    display: block;
  }

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    height: 620px;
  }

  .hero-inner {
    align-items: flex-end;
    padding-bottom: 82px;
  }

  .hero-poster {
    display: none;
  }

  .hero-controls {
    left: 12px;
    right: auto;
    bottom: 22px;
  }

  .section,
  .section-alt {
    padding-top: 48px;
  }

  .section-alt {
    margin-top: 48px;
    padding-bottom: 48px;
  }

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

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

  .card-cover {
    height: 188px;
  }

  .card-body {
    padding: 14px;
  }

  .rank-item {
    grid-template-columns: 42px 68px 1fr;
  }

  .rank-action {
    display: none;
  }

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

@media (max-width: 480px) {
  .brand-text {
    font-size: 1.08rem;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

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

  .card-cover {
    height: 238px;
  }
}
