:root {
  color-scheme: dark;
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.82);
  --surface-strong: #0f172a;
  --surface-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --danger: #f43f5e;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shell: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.18), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

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

.nav-shell {
  width: var(--shell);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
}

.brand-name {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

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

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

.mobile-nav {
  display: none;
  width: var(--shell);
  margin: 0 auto 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.42) 100%),
    radial-gradient(circle at 72% 32%, rgba(52, 211, 153, 0.22), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: var(--shell);
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 54px;
  padding: 64px 0;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(44px, 8vw, 86px);
}

.hero-copy p {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 18px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.26);
  font-size: 12px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  color: var(--soft);
  background: rgba(15, 23, 42, 0.64);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-button:hover,
.section-more:hover {
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.44);
  background: rgba(16, 185, 129, 0.1);
}

.hero-poster {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster:before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 1;
}

.hero-poster img,
.card-poster img,
.detail-poster img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 30px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
}

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

.section {
  padding: 72px 0 0;
}

.page-main {
  padding-top: 42px;
}

.section-heading {
  margin-bottom: 24px;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.filter-panel {
  margin: 24px 0 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.62);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.7);
}

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

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--accent);
  border-color: rgba(52, 211, 153, 0.5);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.card-poster img {
  transition: transform 0.35s ease;
}

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

.play-corner,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-corner {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #022c22;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.32);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 16px;
}

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

.card-body h2 {
  margin: 10px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

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

.card-body p {
  min-height: 64px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.movie-card-compact .card-body p {
  min-height: 44px;
}

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

.category-pill,
.category-card-large {
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), transparent),
    rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-pill:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.5);
}

.category-pill strong,
.category-card-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.category-pill span,
.category-card-large p {
  color: var(--muted);
  font-size: 14px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-links a {
  color: var(--accent);
  font-size: 13px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr;
  gap: 22px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 68px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.rank-row span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #022c22;
  background: var(--accent);
  font-weight: 900;
}

.rank-row img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
}

.rank-row strong,
.rank-row small {
  grid-column: 3;
}

.rank-row small {
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 8%, rgba(52, 211, 153, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(6, 78, 59, 0.34));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(38px, 5vw, 68px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 10%, rgba(52, 211, 153, 0.16), transparent 34%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.detail-one-line {
  max-width: 780px;
  margin: 18px 0;
  color: var(--soft);
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0;
}

.detail-meta span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.74);
}

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

.movie-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #022c22;
  background: var(--accent);
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.34);
}

.player-overlay strong {
  font-size: clamp(20px, 3vw, 34px);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.64);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
}

.content-card p {
  margin: 14px 0 0;
  color: var(--soft);
}

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

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

.site-footer {
  margin-top: 86px;
  padding: 44px 0 26px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  width: var(--shell);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 36px;
}

.footer-grid p,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
}

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

.footer-bottom {
  width: var(--shell);
  margin: 32px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

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

  .hero-content {
    grid-template-columns: 1fr 0.6fr;
  }
}

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

  .menu-button {
    display: block;
  }

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

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

  .hero-content {
    align-content: center;
    gap: 28px;
  }

  .hero-poster {
    max-width: 260px;
    justify-self: start;
  }

  .hero-arrow {
    display: none;
  }

  .split-heading {
    display: grid;
    align-items: start;
  }

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

  .page-hero,
  .detail-hero {
    padding: 26px;
  }

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

@media (max-width: 560px) {
  :root {
    --shell: min(100vw - 22px, 1180px);
  }

  .nav-shell {
    min-height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

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

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .rank-main,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 62px 1fr;
  }

  .page-main {
    padding-top: 24px;
  }

  .section {
    padding-top: 52px;
  }
}
