:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-soft: #ecfdf5;
  --teal: #0d9488;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.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(14px);
}

.header-inner,
.container {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 650;
  color: #374151;
}

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

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

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 700;
  color: #374151;
}

.hero {
  position: relative;
  height: 66vh;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.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;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 36%, rgba(16, 185, 129, 0.28), transparent 30%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 82px;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.95);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.pill.light {
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.pill.dark {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
}

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

.hero-summary {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: #d1d5db;
  font-size: 14px;
}

.hero-meta span + span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 12px;
  vertical-align: middle;
  background: #6b7280;
  border-radius: 50%;
}

.hero-actions,
.section-head,
.card-meta,
.filter-row,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--emerald);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  background: var(--emerald-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.28);
}

.button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--emerald);
}

.quick-search {
  margin-top: -34px;
  position: relative;
  z-index: 10;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.select:focus {
  border-color: rgba(5, 150, 105, 0.7);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.section {
  padding: 58px 0;
}

.section.tint-emerald {
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.section.tint-amber {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

.section.tint-rose {
  background: linear-gradient(90deg, #fff1f2, #fdf2f8);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-line {
  flex: 1 1 180px;
  height: 4px;
  min-width: 120px;
  background: linear-gradient(90deg, var(--emerald), transparent);
  border-radius: 999px;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.rank-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.movie-card {
  display: block;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.76);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f8fafc);
}

.poster-wrap.wide {
  aspect-ratio: 16 / 9;
}

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

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

.poster-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 50%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::before {
  opacity: 1;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 32px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.card-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.card-badge.emerald {
  background: rgba(5, 150, 105, 0.94);
}

.card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

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

.card-desc {
  margin: 0 0 12px;
  min-height: 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  justify-content: space-between;
  color: #6b7280;
  font-size: 12px;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  font-size: 12px;
  font-weight: 700;
}

.page-hero {
  padding: 56px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, var(--emerald), var(--teal));
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

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

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

.category-card {
  display: block;
  padding: 26px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.13);
}

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

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.count {
  color: var(--emerald-dark);
  font-size: 28px;
  font-weight: 900;
}

.filter-panel {
  margin: 26px 0 30px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-row {
  align-items: stretch;
}

.filter-row .input {
  flex: 1 1 280px;
}

.filter-row .select {
  flex: 0 1 180px;
}

.result-count {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

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

.rank-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--soft);
}

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

.rank-info h3 {
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.panel {
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.info-panel {
  margin-top: 22px;
  padding: 26px;
}

.info-panel h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 22px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.info-section {
  margin-top: 22px;
}

.info-section h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.info-section p {
  margin: 0;
  color: #374151;
  line-height: 1.86;
}

.review-box {
  padding: 18px;
  border-radius: 16px;
  background: #f9fafb;
  border-left: 4px solid var(--emerald);
}

.sidebar {
  position: sticky;
  top: 86px;
  padding: 20px;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-mini:hover {
  background: #f9fafb;
}

.related-mini .rank-poster {
  width: 82px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
}

.player-start {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--emerald);
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
  background: var(--emerald-dark);
  transform: scale(1.05);
}

.player-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player:hover .player-bar,
.player:focus-within .player-bar {
  opacity: 1;
}

.player-actions button {
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  z-index: 3;
  display: none;
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(225, 29, 72, 0.92);
  border-radius: 12px;
  font-size: 14px;
}

.player.has-error .player-message {
  display: block;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-inner p,
.footer-inner li {
  color: #9ca3af;
  line-height: 1.8;
  font-size: 14px;
}

.footer-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a:hover {
  color: #34d399;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 13px;
}

.image-missing {
  opacity: 0.22;
}

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

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

  .sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-content {
    padding-top: 160px;
    padding-bottom: 86px;
  }

  .hero-control {
    display: none;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .container,
  .mobile-nav {
    width: min(100% - 22px, 1280px);
  }

  .brand {
    font-size: 17px;
  }

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

  .section {
    padding: 42px 0;
  }

  .movie-grid {
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

  .filter-row .select,
  .filter-row .input {
    flex-basis: 100%;
  }

  .rank-item {
    grid-template-columns: 42px 66px minmax(0, 1fr);
  }

  .rank-number {
    width: 38px;
    height: 38px;
  }
}
