:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --dark: #020617;
  --dark-2: #0f172a;
  --accent: #059669;
  --accent-light: #34d399;
  --accent-dark: #047857;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #0891b2);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #cbd5e1;
  font-size: 15px;
}

.main-nav a {
  padding: 8px 2px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent-light);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background: var(--dark);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.7s ease,
    transform 1.2s ease;
}

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 22% 24%,
      rgba(16, 185, 129, 0.28),
      transparent 32%
    ),
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.95) 0%,
      rgba(15, 23, 42, 0.82) 42%,
      rgba(15, 23, 42, 0.35) 100%
    ),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 42%);
}

.hero-content {
  position: relative;
  height: 100%;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 150px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.32);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 14px;
  color: var(--accent-light);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 800;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.32);
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.btn.light {
  color: var(--accent-dark);
  background: #ecfdf5;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 10;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr auto;
  gap: 14px;
  align-items: center;
}

.hero-search-box {
  display: flex;
  min-height: 54px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.hero-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 20px;
  color: var(--ink);
  background: transparent;
}

.hero-search-box button {
  border: 0;
  padding: 0 24px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

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

.hero-category-links a,
.hero-dots button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}

.hero-category-links a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 13px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

.hero-dots button.is-active {
  width: 30px;
  background: var(--accent-light);
}

.main-section {
  padding: 56px 0;
}

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

.section-head h2,
.filter-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.filter-panel p,
.category-card p,
.footer-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -38px;
  position: relative;
  z-index: 12;
}

.stat-card,
.category-card,
.filter-panel,
.content-panel,
.player-panel,
.info-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  color: var(--accent);
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

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

.category-card {
  padding: 22px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.category-card .count {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 150, 105, 0.22), rgba(8, 145, 178, 0.22)),
    #0f172a;
}

.poster-frame::after {
  content: attr(data-fallback-title);
  position: absolute;
  inset: auto 16px 14px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  opacity: 0.74;
  pointer-events: none;
}

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

.card-link:hover .poster-frame img,
.small-card:hover .poster-frame img {
  transform: scale(1.08);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(5, 150, 105, 0.35);
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 28px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--soft);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  background: #fff;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.filter-count {
  color: var(--muted);
  white-space: nowrap;
  font-weight: 800;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.ranking-list,
.side-list,
.category-preview {
  display: grid;
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 140px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-no {
  color: var(--accent);
  font-size: 30px;
  font-weight: 900;
}

.rank-item .poster-frame {
  border-radius: 12px;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.small-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.small-card .poster-frame {
  border-radius: 10px;
}

.small-card span {
  display: block;
  font-weight: 800;
  line-height: 1.4;
}

.small-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: stretch;
}

.player-panel {
  overflow: hidden;
  background: #020617;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(
      circle at center,
      rgba(16, 185, 129, 0.24),
      transparent 28%
    ),
    linear-gradient(135deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.84));
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 48px rgba(5, 150, 105, 0.35);
  font-size: 32px;
}

.player-status {
  padding: 14px 18px;
  color: #cbd5e1;
  background: #0f172a;
  font-size: 14px;
}

.detail-info {
  padding: 26px;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(
      circle at top right,
      rgba(16, 185, 129, 0.26),
      transparent 42%
    ),
    #0f172a;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.detail-info p {
  color: #cbd5e1;
  line-height: 1.8;
}

.info-line {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  margin-top: 10px;
  color: #e2e8f0;
}

.info-line strong {
  color: #a7f3d0;
}

.content-panel {
  padding: 28px;
  margin-top: 28px;
}

.content-panel h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.info-card {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

.copyright {
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow);
  font-size: 22px;
  font-weight: 900;
}

.back-to-top.is-visible {
  display: block;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

  .filter-panel,
  .split-layout,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .info-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

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

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

  .hero-dots {
    justify-content: flex-start;
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .rank-item {
    grid-template-columns: 42px 110px 1fr;
  }
}

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

  .logo {
    font-size: 17px;
  }

  .hero p {
    font-size: 17px;
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .footer-grid,
  .filter-controls {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .rank-item,
  .small-card {
    grid-template-columns: 96px 1fr;
  }

  .rank-no {
    grid-column: 1 / -1;
  }
}
