:root {
  --primary: rgb(17 94 89);
  --primary-light: rgb(20 184 166);
  --primary-dark: rgb(13 74 71);
  --secondary: rgb(217 119 6);
  --secondary-light: rgb(251 191 36);
  --accent: rgb(14 116 144);
  --ink: #17201f;
  --muted: #5f6f6c;
  --line: #dce8e5;
  --soft: #f2fbf9;
  --paper: #ffffff;
  --dark: #061817;
  --shadow: 0 24px 70px rgba(15, 118, 110, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fffd 0%, #eefaf7 52%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .84);
  border-bottom: 1px solid rgba(17, 94, 89, .12);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary-dark);
  letter-spacing: -.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 10px 24px rgba(20, 184, 166, .28);
}

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

.nav-link {
  padding: 9px 14px;
  color: #31524e;
  border-radius: 999px;
  font-weight: 700;
  transition: .22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--primary);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 14px;
  background: #ecfbf8;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

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

.mobile-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.mobile-cat-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eefaf7;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) saturate(1.18);
  transform: scale(1.12);
  opacity: .58;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(20, 184, 166, .45), transparent 32%),
    linear-gradient(90deg, rgba(6, 24, 23, .96), rgba(6, 24, 23, .72) 48%, rgba(6, 24, 23, .28));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 390px;
  align-items: center;
  gap: 46px;
  padding: 94px 0 130px;
}

.hero-copy {
  max-width: 760px;
  color: white;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--secondary-light);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: clamp(17px, 2vw, 22px);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 10px;
  color: var(--primary-dark);
  border-radius: 999px;
  background: #dff7f3;
  font-size: 12px;
  font-weight: 800;
}

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

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: .22s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 14px 32px rgba(20, 184, 166, .28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(20, 184, 166, .34);
}

.btn-ghost {
  color: white;
  border-color: rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .08);
}

.btn-soft {
  color: #143c39;
  background: #ffedbb;
}

.btn.wide {
  width: 100%;
  margin-top: 12px;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: 0 38px 90px rgba(0, 0, 0, .48);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .4);
}

.hero-dots button.active {
  width: 28px;
  background: white;
}

.section {
  padding: 78px 0;
}

.section.alt {
  background: rgba(255, 255, 255, .66);
}

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

.section-head h2,
.content-article h2,
.side-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.section-head p,
.side-panel p,
.page-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.text-link {
  color: var(--primary);
  font-weight: 900;
}

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

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

.category-card {
  min-height: 144px;
  padding: 22px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, .13), rgba(6, 182, 212, .08)),
    white;
  box-shadow: 0 16px 40px rgba(15, 118, 110, .08);
  transition: .22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 118, 110, .14);
}

.category-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
}

.category-card strong {
  color: #486662;
  font-size: 14px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(15, 118, 110, .09);
  transition: .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(15, 118, 110, .15);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #dbf5ef;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .45s ease;
}

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

.score-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
  color: #422006;
  border-radius: 999px;
  background: #fde68a;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6c7e7a;
  font-size: 12px;
  font-weight: 800;
}

.card-body h3,
.rank-info h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.26;
}

.card-body p,
.rank-info p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.compact-head {
  width: auto;
  margin-bottom: 20px;
}

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

.rank-list.full {
  margin-top: 28px;
}

.rank-card {
  display: grid;
  grid-template-columns: auto 82px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 36px rgba(15, 118, 110, .08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  border-radius: 12px;
  background: var(--primary);
  font-weight: 900;
}

.rank-cover img {
  width: 82px;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  object-fit: cover;
}

.side-panel {
  position: sticky;
  top: 98px;
  padding: 24px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #eefaf7);
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 92px 0 62px;
  background:
    radial-gradient(circle at 80% 10%, rgba(20, 184, 166, .28), transparent 34%),
    linear-gradient(135deg, #effdf9, #ffffff 56%, #e9fbff);
  border-bottom: 1px solid rgba(17, 94, 89, .12);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 210px 210px;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 42px rgba(15, 118, 110, .08);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #486662;
  font-size: 13px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #d6e7e3;
  border-radius: 16px;
  outline: 0;
  background: #fbfffe;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .14);
}

.browse-grid {
  margin-top: 28px;
}

.detail-hero {
  padding: 44px 0 70px;
  background:
    radial-gradient(circle at 86% 22%, rgba(20, 184, 166, .24), transparent 34%),
    linear-gradient(135deg, #f7fffd, #ffffff);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  color: var(--primary-dark);
}

.lead {
  max-width: 800px;
  margin: 20px 0;
  color: #415f5a;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf9f6;
  color: #31524e;
  font-weight: 800;
}

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

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .62));
  cursor: pointer;
  transition: opacity .24s ease, visibility .24s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  color: var(--primary-dark);
  border-radius: 50%;
  background: white;
  font-size: 28px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .28);
}

.content-article {
  max-width: 920px;
  padding: 34px;
  border: 1px solid rgba(17, 94, 89, .12);
  border-radius: 30px;
  background: white;
  box-shadow: 0 18px 44px rgba(15, 118, 110, .08);
}

.content-article p {
  margin: 14px 0 28px;
  color: #405c58;
  font-size: 18px;
}

.site-footer {
  padding: 42px 0;
  color: #d7eeeb;
  background: #071b1a;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  margin: 8px 0 0;
  color: #a5c7c2;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 70px 0 110px;
  }

  .hero-poster {
    width: min(280px, 76vw);
    justify-self: center;
  }

  .section-head,
  .footer-grid {
    align-items: start;
    flex-direction: column;
  }

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

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

  .side-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

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

  .rank-card {
    grid-template-columns: auto 70px minmax(0, 1fr);
  }

  .rank-cover img {
    width: 70px;
  }

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

  .section {
    padding: 56px 0;
  }
}
