:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: rgba(16, 185, 129, 0.14);
  --accent: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(16, 185, 129, 0.1),
      transparent 34rem
    ),
    linear-gradient(135deg, #f8fafc 0%, #ffffff 44%, #f1f5f9 100%);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: #ffffff;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.site-header.is-scrolled,
body:not(.page-home) .site-header {
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

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

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 8px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: inherit;
  opacity: 0.9;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
  color: #ffffff;
  background: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.56fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: 100%;
  padding: 118px max(24px, calc((100vw - 1200px) / 2)) 92px;
  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-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.88) 0%,
      rgba(2, 6, 23, 0.62) 46%,
      rgba(2, 6, 23, 0.2) 100%
    ),
    var(--hero-image) center / cover no-repeat,
    radial-gradient(
      circle at 20% 10%,
      rgba(16, 185, 129, 0.42),
      transparent 36rem
    ),
    #020617;
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.8)),
    radial-gradient(
      circle at 74% 24%,
      rgba(16, 185, 129, 0.35),
      transparent 22rem
    );
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-heading span,
.section-label,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 24px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.movie-tags,
.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-tags span,
.genre-cloud span,
.movie-tags span {
  border-radius: 999px;
  color: #047857;
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span,
.genre-cloud span {
  padding: 8px 12px;
}

.movie-tags span {
  padding: 6px 10px;
}

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

.primary-button,
.ghost-button,
.search-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.primary-button,
.search-link {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.search-link:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  border-radius: 36px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.56)),
    var(--poster-image) center / cover no-repeat,
    #0f172a;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
}

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

.poster-image.is-empty {
  opacity: 0;
}

.hero-poster figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

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

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

.panel-section,
.split-section,
.page-hero,
.breadcrumbs,
.detail-hero,
.player-section,
.detail-switcher {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

.panel-section {
  margin-top: 44px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px);
}

.quick-search {
  margin-top: -70px;
  position: relative;
  z-index: 4;
}

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

.section-heading.centered {
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1,
.detail-content h2 {
  margin: 0 0 12px;
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.detail-one-line,
.detail-content p,
.category-tile p,
.category-card-large p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.search-bar,
.filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-bar.wide {
  max-width: 820px;
  margin-inline: auto;
}

.search-bar input,
.filter-panel input,
.filter-panel select {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
}

.search-bar input,
.filter-panel input {
  flex: 1;
  padding: 0 20px;
}

.filter-panel select {
  padding: 0 18px;
}

.category-links,
.filter-buttons,
.hero-inline-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.category-links a,
.filter-buttons button,
.hero-inline-links a {
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  padding: 10px 15px;
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
  font-weight: 800;
  cursor: pointer;
}

.filter-buttons button.is-active,
.filter-buttons button:hover,
.category-links a:hover,
.hero-inline-links a:hover {
  color: #ffffff;
  background: var(--primary);
}

.movie-grid {
  display: grid;
  gap: 22px;
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.full-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.movie-card-link {
  display: grid;
  height: 100%;
}

.poster-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(15, 23, 42, 0.54)),
    var(--poster-image) center / cover no-repeat,
    #0f172a;
}

.movie-score {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

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

.movie-card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.26;
}

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 28px;
  margin-top: 44px;
}

.split-section .panel-section {
  width: 100%;
  margin: 0;
}

.rank-panel {
  padding: 28px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(4, 120, 87, 0.92)),
    #0f172a;
  box-shadow: var(--shadow);
}

.rank-panel .section-heading p,
.rank-panel .section-heading h2,
.rank-panel .text-link {
  color: #ffffff;
}

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

.rank-row {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.wide-rank-list .rank-row {
  background: #ffffff;
  border: 1px solid var(--line);
}

.rank-row-link {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  color: var(--accent);
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.rank-poster {
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.54)),
    var(--poster-image) center / cover no-repeat,
    #0f172a;
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 950;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-panel .rank-info p,
.rank-panel .rank-meta {
  color: rgba(255, 255, 255, 0.72);
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.category-tile,
.category-card-large a {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(
      circle at top right,
      rgba(16, 185, 129, 0.16),
      transparent 15rem
    ),
    #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
}

.category-tile span,
.card-more {
  color: var(--primary-dark);
  font-weight: 950;
}

.category-tile strong,
.category-card-large h2 {
  font-size: 22px;
  font-weight: 950;
}

.category-sample-links {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.page-hero {
  min-height: 320px;
  display: grid;
  align-items: center;
  padding: clamp(40px, 7vw, 80px);
  border-radius: var(--radius-xl);
  color: #ffffff;
  background:
    radial-gradient(
      circle at top right,
      rgba(16, 185, 129, 0.45),
      transparent 24rem
    ),
    linear-gradient(135deg, #020617, #0f172a 55%, #064e3b);
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 280px;
}

.category-hero {
  min-height: 340px;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a,
.breadcrumbs strong {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 62px);
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.56)),
    var(--poster-image) center / cover no-repeat,
    #0f172a;
}

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

.detail-one-line {
  font-size: 18px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-top: 36px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.hls-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(
      circle at center,
      rgba(16, 185, 129, 0.24),
      rgba(2, 6, 23, 0.58)
    ),
    rgba(2, 6, 23, 0.24);
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.36);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.82);
  font-weight: 800;
}

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

.detail-content article {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface-soft);
}

.detail-content p {
  margin: 0;
  font-size: 16px;
}

.genre-cloud {
  margin-top: 24px;
}

.detail-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.detail-switcher a {
  padding: 18px 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  font-weight: 900;
}

.no-results {
  margin: 28px 0 0;
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
}

.site-footer {
  margin-top: 70px;
  color: rgba(255, 255, 255, 0.78);
  background: #020617;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 220px;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

.footer-links h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
}

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

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 110px;
  }

  .hero-poster {
    display: none;
  }

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

  .rank-panel {
    order: -1;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 68px;
  }

  .brand-text {
    max-width: 180px;
    font-size: 15px;
    line-height: 1.2;
  }

  .hero-slider {
    min-height: 92vh;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions,
  .search-bar,
  .filter-panel,
  .detail-switcher {
    flex-direction: column;
    display: flex;
  }

  .primary-button,
  .ghost-button,
  .search-link {
    width: 100%;
  }

  .panel-section,
  .page-hero,
  .detail-hero {
    border-radius: 24px;
  }

  .full-grid,
  .compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

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

  .movie-card-body p {
    min-height: 42px;
    font-size: 13px;
  }

  .rank-row-link {
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 10px;
  }

  .detail-meta span,
  .detail-tags span,
  .genre-cloud span {
    font-size: 12px;
  }
}
