:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --amber: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top left,
      rgba(16, 185, 129, 0.12),
      transparent 34rem
    ),
    radial-gradient(
      circle at top right,
      rgba(14, 165, 233, 0.12),
      transparent 28rem
    ),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #022c22;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.34);
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 14px;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  flex-direction: column;
  align-items: flex-start;
}

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

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

.hero {
  position: relative;
  margin-top: 26px;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-copy {
  width: min(660px, 100%);
  padding: 72px 58px 96px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: clamp(24px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.hero p,
.page-hero p,
.section-heading p,
.card-body p,
.rank-info p,
.detail-lead,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.hero-tags,
.card-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.card-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  color: #cbd5e1;
  font-size: 12px;
}

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

.btn-primary,
.btn-secondary,
.btn-link,
.section-action,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.btn-primary,
.home-search button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #022c22;
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.28);
}

.btn-secondary,
.section-action {
  border: 1px solid rgba(52, 211, 153, 0.34);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.btn-link {
  color: var(--accent);
  padding-inline: 8px;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-link:hover,
.section-action:hover,
.home-search button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 42px;
  right: 42px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-controls button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border-radius: 999px;
}

.hero-dot.is-active {
  background: var(--accent);
}

.search-band,
.quick-cats,
.content-section,
.page-hero,
.site-footer,
.detail-content article,
.rank-panel,
.player-shell {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: 24px;
  padding: 28px;
  border-radius: var(--radius);
}

.search-band h2,
.page-hero h1,
.section-heading h2,
.rank-panel h2,
.detail-content h2,
.player-section h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.home-search,
.search-panel {
  display: flex;
  gap: 10px;
}

.home-search input,
.search-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  outline: none;
  padding: 0 18px;
}

.home-search input:focus,
.search-panel input:focus {
  border-color: rgba(52, 211, 153, 0.72);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 22px;
}

.quick-cats a {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.46);
}

.quick-cats a:hover {
  border-color: rgba(52, 211, 153, 0.44);
  color: var(--accent);
}

.content-section,
.page-hero {
  margin-top: 26px;
  padding: 28px;
  border-radius: var(--radius);
}

.page-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), transparent 44%),
    rgba(15, 23, 42, 0.78);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
}

.search-panel {
  width: min(620px, 100%);
  margin-top: 22px;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.section-heading p {
  margin-bottom: 0;
}

.section-action.full {
  width: 100%;
  margin-top: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.36);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.card-poster,
.rank-cover,
.detail-poster {
  display: block;
  position: relative;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.64)),
    radial-gradient(
      circle at center,
      rgba(52, 211, 153, 0.18),
      rgba(15, 23, 42, 0.88)
    );
  background-position: center;
  background-size: cover;
}

.card-poster {
  aspect-ratio: 3 / 4.25;
}

.card-score {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--amber);
  font-weight: 900;
  font-size: 12px;
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.92);
  color: #022c22;
  font-weight: 900;
  transform: scale(0.94);
  transition: transform 0.22s ease;
}

.movie-card:hover .card-play {
  transform: scale(1.05);
}

.card-body {
  padding: 16px;
}

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

.card-body h3,
.rank-info h2 {
  margin: 10px 0 8px;
  color: var(--text);
  line-height: 1.32;
}

.card-body h3 {
  font-size: 17px;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--accent);
}

.card-body p,
.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  font-size: 14px;
}

.card-tags {
  margin: 14px 0 0;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  border-radius: 24px;
  padding: 22px;
}

.rank-panel-head p {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 800;
}

.rank-panel ol {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.rank-panel li a {
  display: grid;
  grid-template-columns: 42px 1fr 46px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.rank-title {
  color: #dbeafe;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--amber);
  font-weight: 900;
  text-align: right;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  overflow: hidden;
}

.rank-cover {
  min-height: 176px;
}

.rank-cover span {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.8);
  color: var(--accent);
  font-weight: 900;
}

.rank-info {
  padding: 18px 18px 18px 0;
}

.detail-hero {
  position: relative;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.95;
  background-position: center;
  background-size: cover;
}

.detail-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
  padding: 54px;
}

.detail-poster {
  aspect-ratio: 3 / 4.25;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-lead {
  max-width: 760px;
  font-size: 18px;
}

.player-section {
  scroll-margin-top: 96px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background:
    radial-gradient(
      circle at center,
      rgba(16, 185, 129, 0.24),
      transparent 34%
    ),
    rgba(2, 6, 23, 0.48);
  color: var(--text);
  cursor: pointer;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.player-shell.is-playing .play-layer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #022c22;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.32);
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.detail-content article {
  padding: 28px;
  border-radius: 24px;
}

.detail-content p:last-child {
  margin-bottom: 0;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 26px;
  border-radius: var(--radius);
  padding: 26px;
}

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

.site-footer p {
  max-width: 580px;
  margin: 10px 0 0;
  font-size: 14px;
}

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

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-stage,
  .hero-slide {
    min-height: 650px;
  }

  .hero-copy {
    padding: 48px 26px 106px;
  }

  .hero-controls {
    left: 24px;
    right: 24px;
  }

  .search-band,
  .detail-wrap,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    padding: 28px;
  }

  .detail-poster {
    max-width: 320px;
  }

  .rank-info {
    padding: 0 18px 18px;
  }

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

@media (max-width: 640px) {
  main,
  .site-footer,
  .header-inner,
  .mobile-nav {
    width: min(100% - 20px, 1180px);
  }

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

  .content-section,
  .page-hero,
  .search-band {
    padding: 18px;
    border-radius: 20px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p,
  .card-tags {
    display: none;
  }

  .home-search {
    flex-direction: column;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    width: 100%;
  }
}
