:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-100: #d1fae5;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --white: #ffffff;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1180px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--slate-900);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--white);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.dropdown-toggle {
  border: 0;
  background: transparent;
  color: var(--slate-700);
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: var(--emerald-600);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  right: 0;
  width: 180px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--slate-700);
  font-weight: 650;
}

.dropdown-menu a:hover,
.mobile-nav a:hover {
  color: var(--emerald-700);
  background: var(--emerald-100);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  padding: 11px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--slate-800);
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 18px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 24px;
  background: radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.28), transparent 32%), var(--slate-950);
}

.hero-stage {
  position: relative;
  min-height: 632px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.66), transparent 48%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 78px);
  bottom: clamp(36px, 8vw, 92px);
  max-width: 700px;
  color: var(--white);
}

.hero-eyebrow,
.section-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-100);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-main-title {
  margin: 18px 0 8px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
}

.hero-content p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 16px 28px rgba(5, 150, 105, 0.28);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 78px);
  bottom: 30px;
  display: flex;
  gap: 9px;
  z-index: 3;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--emerald-500);
}

.hero-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.hero-search-card,
.side-panel,
.detail-card,
.filter-panel,
.intro-strip {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}

.hero-search-card {
  padding: 22px;
}

.hero-search-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--slate-900);
  font-weight: 850;
}

.hero-search-card input,
.search-box input,
.select-box select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--slate-800);
  outline: none;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.hero-search-card input:focus,
.search-box input:focus,
.select-box select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

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

.hero-category-links a,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  color: var(--emerald-700);
  background: var(--emerald-100);
  font-size: 13px;
  font-weight: 750;
}

.hero-thumbs {
  display: grid;
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.hero-thumb img {
  width: 88px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  font-weight: 760;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-thumb:hover,
.hero-thumb.active {
  transform: translateX(-4px);
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.18);
}

main {
  min-height: 60vh;
}

.section-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

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

.section-head h2,
.intro-strip h2,
.page-hero h1 {
  margin: 4px 0 0;
  color: var(--slate-900);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head a,
.section-link {
  color: var(--emerald-700);
  font-weight: 800;
}

.intro-strip {
  padding: 28px;
  align-items: center;
}

.intro-strip p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--slate-600);
}

.section-link {
  flex: 0 0 auto;
  color: var(--white);
  background: var(--slate-900);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 18px;
  margin-bottom: 24px;
}

.search-box span,
.select-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 760;
}

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

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

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

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

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

.movie-card,
.category-tile {
  min-width: 0;
}

.card-link,
.category-tile a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover,
.category-tile a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  height: 270px;
  background: var(--slate-200);
}

.movie-card.compact .poster-wrap,
.ranking-list .poster-wrap {
  height: 230px;
}

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

.card-link:hover .poster-wrap img,
.category-tile a:hover img {
  transform: scale(1.08);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.72));
  opacity: 0.82;
}

.year-chip,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 850;
}

.year-chip {
  top: 12px;
  left: 12px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  top: 12px;
  right: 12px;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--emerald-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: all 0.25s ease;
}

.card-link:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 820;
}

.card-meta span:not(:first-child) {
  color: var(--slate-500);
}

.card-body h3 {
  min-height: 54px;
  margin: 8px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--emerald-700);
}

.card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-collage {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
  overflow: hidden;
  background: var(--slate-900);
}

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

.category-tile-body {
  padding: 22px;
}

.category-tile-body h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: 24px;
}

.category-tile-body p {
  min-height: 76px;
  color: var(--slate-600);
}

.category-tile-body span {
  color: var(--emerald-700);
  font-weight: 850;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-700), var(--teal-600));
  padding: 80px 24px;
}

.page-hero.dark {
  background: radial-gradient(circle at 30% 0%, rgba(16, 185, 129, 0.3), transparent 30%), var(--slate-950);
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  color: var(--white);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.detail-content .breadcrumb {
  margin: 0 0 18px;
  color: var(--slate-500);
}

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

.player-band {
  background: var(--slate-950);
  padding: 28px 24px;
}

.player-shell {
  position: relative;
  max-width: 1180px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.22);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}

.player-start {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-500));
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.36);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.player-start:hover {
  transform: scale(1.08);
}

.player-start span {
  display: inline-block;
  margin-left: 6px;
  font-size: 36px;
}

.detail-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 24px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-card {
  padding: 30px;
}

.detail-meta span {
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--emerald-100);
}

.detail-card h1 {
  margin: 18px 0 16px;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.one-line {
  margin: 0 0 18px;
  padding: 18px;
  border-left: 4px solid var(--emerald-500);
  border-radius: 14px;
  color: var(--slate-700);
  background: var(--emerald-100);
  font-weight: 650;
}

.detail-card h2,
.side-panel h2,
.related-block h2,
.site-footer h2 {
  color: var(--slate-900);
  font-size: 22px;
}

.detail-card p {
  color: var(--slate-700);
  font-size: 16px;
  white-space: pre-line;
}

.related-block {
  margin-top: 30px;
}

.compact-head {
  align-items: center;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-panel {
  padding: 22px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: var(--slate-100);
}

.mini-card img {
  width: 78px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-card span {
  color: var(--slate-800);
  font-weight: 750;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-links {
  display: grid;
  grid-template-columns: 1fr;
}

.site-footer {
  margin-top: 76px;
  color: var(--slate-300);
  background: var(--slate-950);
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 24px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  color: var(--slate-400);
}

.site-footer h2 {
  margin-top: 0;
  color: var(--white);
  font-size: 18px;
}

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

.footer-links a {
  color: var(--slate-400);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--slate-500);
  font-size: 14px;
  text-align: center;
}

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

@media (max-width: 1120px) {
  .hero-carousel {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-thumb img {
    width: 100%;
    height: 86px;
  }

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

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

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

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

  .mobile-toggle {
    display: block;
  }

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

  .nav-wrap {
    height: 64px;
    padding: 0 18px;
  }

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

  .hero-carousel {
    min-height: auto;
    padding: 14px;
  }

  .hero-stage {
    min-height: 620px;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 70px;
  }

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

  .hero-actions {
    gap: 10px;
  }

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

  .hero-dots {
    left: 22px;
    bottom: 26px;
  }

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

  .hero-thumb {
    grid-template-columns: 78px 1fr;
  }

  .section-wrap {
    padding: 44px 18px 0;
  }

  .section-head,
  .intro-strip {
    display: grid;
    align-items: start;
  }

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

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    height: 320px;
  }

  .page-hero {
    padding: 56px 18px;
  }

  .player-band {
    padding: 14px;
  }

  .player-shell {
    border-radius: 18px;
  }

  .detail-layout {
    padding: 28px 18px 0;
  }

  .detail-card {
    padding: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 42px 18px 24px;
  }
}
