:root {
  --night-950: #06080d;
  --night-900: #0d1117;
  --night-850: #121820;
  --night-800: #161b22;
  --night-700: #21262d;
  --night-600: #30363d;
  --night-300: #8b949e;
  --night-200: #b1bac4;
  --night-100: #d0d7de;
  --moss-700: #3f5f3b;
  --moss-600: #4d7348;
  --moss-500: #628f5c;
  --moss-400: #7aaa73;
  --moss-300: #96c48f;
  --swamp-800: #1a2620;
  --swamp-700: #243329;
  --shadow-swamp: 0 18px 50px rgba(45, 64, 51, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 0%, rgba(77, 115, 72, 0.14), transparent 30%), var(--night-900);
  color: var(--night-100);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.94);
  border-bottom: 1px solid var(--swamp-700);
  backdrop-filter: blur(14px);
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 176px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--moss-600), var(--swamp-800));
  box-shadow: 0 10px 30px rgba(77, 115, 72, 0.35);
  font-weight: 900;
}

.logo-title {
  display: block;
  color: var(--moss-300);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.logo-subtitle {
  display: block;
  color: var(--night-300);
  font-size: 12px;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--night-300);
  font-weight: 650;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--moss-300);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--night-100);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--swamp-700);
  background: var(--night-800);
}

.mobile-panel a {
  display: block;
  padding: 13px 16px;
  color: var(--night-200);
  border-bottom: 1px solid rgba(36, 51, 41, 0.45);
}

.mobile-panel a:hover {
  color: var(--moss-300);
}

.main-content {
  flex: 1;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  background: var(--night-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 5s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 17, 23, 1) 0%, rgba(13, 17, 23, 0.68) 48%, rgba(13, 17, 23, 0.1) 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(150, 196, 143, 0.18), transparent 36%);
}

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

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(150, 196, 143, 0.24);
  border-radius: 999px;
  color: var(--moss-300);
  background: rgba(26, 38, 32, 0.68);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  color: #fff;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-desc {
  max-width: 650px;
  margin: 0 0 26px;
  color: var(--night-200);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

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

.hero-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(208, 215, 222, 0.32);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 46px;
  background: var(--moss-300);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--night-700);
  color: var(--night-100);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--moss-600);
  color: #fff;
  box-shadow: 0 16px 35px rgba(77, 115, 72, 0.34);
}

.btn-primary:hover {
  background: var(--moss-500);
}

.btn-ghost {
  border: 1px solid rgba(150, 196, 143, 0.25);
  background: rgba(22, 27, 34, 0.72);
  color: var(--moss-300);
}

.section {
  padding: 74px 0;
}

.section-alt {
  background: var(--night-800);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  color: var(--moss-300);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-line {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--moss-600), transparent);
}

.section-note {
  color: var(--night-300);
  font-size: 14px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 51, 41, 0.65);
  border-radius: var(--radius);
  background: var(--night-800);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(150, 196, 143, 0.48);
  background: var(--night-700);
  box-shadow: var(--shadow-swamp);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--night-700);
}

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

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

.movie-card:hover .poster img,
.media-row:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.06));
  opacity: 0;
  transition: opacity 0.22s ease;
}

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

.play-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: #fff;
  background: var(--moss-600);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--night-100);
  font-size: 15px;
  line-height: 1.45;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--night-300);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(42, 66, 39, 0.68);
  color: var(--moss-300);
  font-size: 12px;
  font-weight: 700;
}

.pill-muted {
  background: rgba(48, 54, 61, 0.7);
  color: var(--night-200);
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(36, 51, 41, 0.72);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(26, 38, 32, 0.96), rgba(22, 27, 34, 0.96));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(150, 196, 143, 0.45);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -42px;
  top: -54px;
  border-radius: 999px;
  background: rgba(150, 196, 143, 0.1);
}

.category-card h3 {
  margin: 0 0 10px;
  color: var(--moss-300);
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--night-300);
  line-height: 1.7;
}

.category-count {
  color: var(--night-100);
  font-weight: 800;
}

.filter-panel {
  margin: 26px 0 30px;
  padding: 18px;
  border: 1px solid rgba(36, 51, 41, 0.7);
  border-radius: var(--radius);
  background: rgba(22, 27, 34, 0.86);
}

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

.input,
.select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(36, 51, 41, 0.95);
  border-radius: 12px;
  background: var(--night-900);
  color: var(--night-100);
  padding: 0 14px;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: rgba(150, 196, 143, 0.65);
  box-shadow: 0 0 0 4px rgba(150, 196, 143, 0.08);
}

.result-count {
  margin: 12px 0 0;
  color: var(--night-300);
  font-size: 14px;
}

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

.rank-row,
.media-row {
  display: grid;
  grid-template-columns: 58px 132px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(36, 51, 41, 0.66);
  border-radius: 16px;
  background: var(--night-800);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover,
.media-row:hover {
  transform: translateY(-2px);
  background: var(--night-700);
}

.rank-num {
  color: var(--moss-300);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb,
.media-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--night-700);
}

.rank-thumb img,
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-title {
  margin: 0 0 6px;
  color: var(--night-100);
  font-size: 17px;
}

.rank-desc {
  margin: 0;
  color: var(--night-300);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  color: var(--moss-300);
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  padding: 56px 0 28px;
  background: radial-gradient(circle at 80% 10%, rgba(77, 115, 72, 0.2), transparent 28%);
}

.page-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-desc {
  max-width: 760px;
  margin: 0;
  color: var(--night-300);
  font-size: 17px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  padding: 22px 0;
  color: var(--night-300);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--moss-300);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 30px;
  padding-bottom: 60px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow-swamp);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.15));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 3;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: var(--moss-600);
  color: #fff;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.player-error {
  display: none;
  padding: 12px 16px;
  color: #ffb4b4;
  background: rgba(127, 29, 29, 0.25);
}

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

.detail-card,
.sidebar-card {
  border: 1px solid rgba(36, 51, 41, 0.68);
  border-radius: var(--radius);
  background: var(--night-800);
  padding: 24px;
}

.detail-card {
  margin-top: 22px;
}

.detail-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.detail-block {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(36, 51, 41, 0.72);
}

.detail-block h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  color: var(--moss-300);
  font-size: 22px;
}

.detail-block p {
  margin: 0;
  color: var(--night-200);
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sidebar-card {
  position: sticky;
  top: 94px;
}

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

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

.related-card:hover {
  background: var(--night-700);
}

.related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: var(--night-700);
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-title {
  margin: 0 0 6px;
  color: var(--night-100);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-desc {
  margin: 0;
  color: var(--night-300);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.footer {
  margin-top: 56px;
  border-top: 1px solid var(--swamp-700);
  background: var(--night-800);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer h3 {
  margin: 0 0 14px;
  color: var(--moss-300);
}

.footer p,
.footer a {
  color: var(--night-300);
  line-height: 1.8;
  font-size: 14px;
}

.footer a:hover {
  color: var(--moss-300);
}

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

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

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero {
    height: 76vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 48px 0;
  }

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

  .section-line {
    width: 100%;
    flex: none;
  }

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

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

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

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

  .rank-score {
    display: none;
  }

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

  .detail-card,
  .sidebar-card {
    padding: 18px;
  }
}

@media (max-width: 460px) {
  .logo-subtitle {
    display: none;
  }

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

  .card-body {
    padding: 11px;
  }

  .related-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
