* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.20);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --accent: #10b981;
  --accent-2: #14b8a6;
  --accent-3: #34d399;
  --danger: #f97316;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --radius: 26px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.22), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(20, 184, 166, 0.20), transparent 30%),
    linear-gradient(135deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.38);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 10px 0;
  transition: color 0.24s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent-3);
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: transform 0.24s ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  padding: 9px 14px;
}

.main {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.84) 42%, rgba(15, 23, 42, 0.20) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.90) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 640px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-3);
  font-weight: 700;
}

.eyebrow-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.92);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-desc {
  margin: 0 0 26px;
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(17px, 2.3vw, 22px);
  line-height: 1.75;
}

.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero .tag-row {
  margin-bottom: 32px;
}

.badge,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.16);
  font-size: 13px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.66);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.24);
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 24px 44px rgba(16, 185, 129, 0.34);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: none;
}

.hero-controls {
  position: absolute;
  right: 5vw;
  bottom: 42px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-arrow,
.hero-dot {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  cursor: pointer;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 20px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  padding: 0;
}

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

.hero-arrow:hover,
.hero-dot:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.72);
  background: rgba(16, 185, 129, 0.18);
}

.section {
  padding: 72px 5vw;
}

.section.is-muted {
  background: rgba(15, 23, 42, 0.32);
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-3);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.16;
}

.section-desc {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.54);
  box-shadow: 0 20px 58px rgba(16, 185, 129, 0.13);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.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-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.08) 58%);
}

.poster-badges {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 9px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.36;
}

.card-title a:hover {
  color: var(--accent-3);
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.62;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.horizontal-list {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 2px 20px;
  scroll-snap-type: x mandatory;
}

.horizontal-list .movie-card {
  flex: 0 0 322px;
  scroll-snap-align: start;
}

.feature-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: minmax(220px, auto);
  gap: 24px;
}

.feature-grid .movie-card:first-child {
  grid-row: span 2;
}

.feature-grid .movie-card:first-child .poster-wrap {
  aspect-ratio: 16 / 12;
}

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

.category-card,
.rank-card,
.info-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: var(--panel);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card {
  padding: 20px;
}

.category-card:hover,
.rank-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(15, 23, 42, 0.92);
}

.category-card h3,
.info-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.category-card p,
.info-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.category-count {
  color: var(--accent-3);
  font-weight: 800;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 82px 110px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 122px;
  padding: 14px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  color: #ffffff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f97316, #10b981);
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
}

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

.rank-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-body p {
  margin: 0 0 10px;
  color: var(--soft);
  line-height: 1.55;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin: 28px 0 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(16, 185, 129, 0.72);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-panel select option {
  color: #0f172a;
}

.filter-result {
  grid-column: 1 / -1;
  color: var(--soft);
  font-size: 14px;
}

.clear-btn {
  min-height: 44px;
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  cursor: pointer;
}

.page-hero {
  padding: 74px 5vw 42px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 10%, rgba(16, 185, 129, 0.16), transparent 34%),
    rgba(2, 6, 23, 0.22);
}

.page-hero .container {
  max-width: 1040px;
}

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

.breadcrumb a {
  color: var(--accent-3);
}

.page-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
}

.page-desc {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 22px 48px rgba(16, 185, 129, 0.35);
  font-size: 36px;
}

.play-text {
  font-size: 20px;
  font-weight: 800;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 11;
  margin-bottom: 18px;
}

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

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
}

.info-row strong {
  color: #ffffff;
}

.article-card {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  padding: 26px;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.article-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.86;
}

.article-card p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  padding: 46px 5vw 34px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.62);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
}

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.footer-text,
.footer-links a,
.footer-copy {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: var(--accent-3);
}

.footer-copy {
  max-width: 1240px;
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
}

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

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

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

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

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    right: 5vw;
    left: 5vw;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 12px 10px;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero-controls {
    right: 24px;
    bottom: 22px;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 18px;
  }

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

  .feature-grid .movie-card:first-child {
    grid-row: span 1;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .site-header {
    min-height: 68px;
    padding: 0 18px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .site-nav {
    top: 68px;
    right: 18px;
    left: 18px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 42px 18px 96px;
  }

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

  .hero-desc {
    font-size: 16px;
  }

  .section,
  .page-hero,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

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

  .horizontal-list .movie-card {
    flex-basis: 82vw;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .rank-card {
    grid-template-columns: 54px 96px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 16px;
  }

  .player-shell,
  .article-card,
  .detail-panel {
    border-radius: 20px;
  }
}
