:root {
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --rose: #f43f5e;
  --orange: #f97316;
  --gold: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
  --radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #f9fafb 0%, #ecfdf5 48%, #ecfeff 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--emerald-dark), var(--teal), var(--cyan));
  box-shadow: 0 10px 30px rgba(6, 95, 70, 0.24);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--white);
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease;
}

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

.brand-icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.desktop-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #ecfdf5;
  transform: translateY(-1px);
}

.global-search {
  position: relative;
  width: 268px;
  max-width: 28vw;
}

.global-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
}

.global-search input {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
}

.global-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(440px, 90vw);
  max-height: 470px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 185, 129, 0.14);
  display: none;
}

.search-results.active {
  display: block;
}

.search-results a,
.search-empty {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.search-results a:hover {
  background: #ecfdf5;
}

.search-results strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}

.search-results span,
.search-empty {
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  background: rgba(4, 120, 87, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav a {
  display: block;
  color: var(--white);
  padding: 10px 4px;
  font-weight: 650;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) saturate(1.12);
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.85)), linear-gradient(90deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding: 90px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 22px 0 0;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.hero-chips,
.detail-chips,
.category-tags,
.tag-cloud {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips {
  margin: 28px 0;
}

.hero-chips span,
.detail-chips span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero-chips span {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-chips span:first-child,
.detail-chips span:first-child {
  background: var(--emerald);
  color: var(--white);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  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(90deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

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

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 42px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 66px;
  background: var(--emerald);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(90deg, var(--emerald-dark), var(--teal), var(--cyan));
  color: var(--white);
}

.section.warm {
  background: linear-gradient(135deg, #fff7ed, #fef3c7, #fffbeb);
}

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

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.alt .section-lead,
.alt .section-title {
  color: var(--white);
}

.view-more {
  color: var(--emerald-dark);
  font-weight: 800;
}

.alt .view-more {
  color: var(--white);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #0f172a);
}

.compact-card .poster-link {
  height: 190px;
}

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

.movie-card:hover img,
.side-item:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.68));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(16, 185, 129, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.corner-badge,
.rank-badge,
.small-rank {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.corner-badge {
  top: 14px;
  right: 14px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--rose);
  font-size: 12px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), #db2777);
}

.small-rank {
  top: -8px;
  left: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), #db2777);
  font-size: 13px;
}

.card-body {
  padding: 20px;
}

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

.card-body h3 a:hover {
  color: var(--emerald-dark);
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #64748b;
  font-size: 13px;
}

.meta-line span:first-child {
  color: var(--emerald-dark);
  font-weight: 800;
}

.tag-line {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.glass-grid .movie-card {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.glass-grid .card-body h3,
.glass-grid .card-body p,
.glass-grid .meta-line,
.glass-grid .tag-line {
  color: var(--white);
}

.masonry-grid {
  columns: 4 220px;
  column-gap: 22px;
}

.masonry-grid .movie-card {
  break-inside: avoid;
  margin-bottom: 22px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-item:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.side-thumb {
  position: relative;
  height: 90px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.side-copy strong,
.side-copy em,
.side-copy span {
  display: block;
}

.side-copy strong {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.35;
}

.side-copy em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-copy span {
  margin-top: 6px;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  padding: 70px 0;
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-dark), var(--teal), var(--cyan));
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
  padding: 28px 0 0;
}

.breadcrumb a {
  color: var(--emerald-dark);
  font-weight: 750;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 34px 0 28px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.filter-panel input,
.filter-panel select {
  background: #f1f5f9;
  color: var(--ink);
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  border-radius: 24px;
  color: var(--white);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transition: transform 0.45s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.82));
}

.category-card > *:not(img) {
  position: relative;
  z-index: 2;
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.category-tags {
  margin-top: 18px;
}

.category-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 30px;
  padding: 30px 0 70px;
}

.panel,
.player-card,
.related-panel {
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  background: #020617;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.54));
  cursor: pointer;
  font: inherit;
}

.player-overlay.hidden {
  display: none;
}

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.34);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.panel {
  padding: 30px;
  margin-bottom: 24px;
}

.panel h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.panel h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 23px;
}

.panel p {
  color: #374151;
  line-height: 1.88;
  font-size: 16px;
}

.detail-chips {
  margin-bottom: 22px;
}

.detail-chips span {
  background: #f1f5f9;
  color: #334155;
}

.tag-cloud {
  margin-top: 12px;
}

.tag-cloud span {
  color: #047857;
  background: #d1fae5;
}

.related-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.related-panel .side-item {
  grid-template-columns: 116px 1fr;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

.related-panel .side-thumb {
  height: 74px;
}

.related-panel .side-copy em {
  -webkit-line-clamp: 1;
}

.no-results {
  display: none;
  padding: 32px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.no-results.active {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

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

.site-footer p,
.site-footer li {
  color: #9ca3af;
  line-height: 1.75;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  text-align: center;
  color: #9ca3af;
}

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

  .global-search {
    margin-left: auto;
    max-width: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.active {
    display: block;
  }

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

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

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

  .related-panel {
    position: static;
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-wrap {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .brand-text em {
    display: none;
  }

  .global-search {
    order: 3;
    width: 100%;
  }

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

  .hero-copy {
    padding: 70px 0 100px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .movie-grid.four,
  .movie-grid.two,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .poster-link {
    height: 220px;
  }

  .side-item {
    grid-template-columns: 118px 1fr;
  }

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

  .panel {
    padding: 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
