:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --green-soft: #dcfce7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --page: #f9fafb;
  --dark: #0f172a;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.65;
}

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

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

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, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a 48%, #0f766e);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.24);
  font-size: 15px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-nav,
.mobile-categories {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
  display: grid;
  gap: 8px;
}

.mobile-categories {
  grid-template-columns: repeat(2, 1fr);
}

.mobile-categories a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
}

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

.hero-slide {
  min-height: 640px;
  display: none;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(34, 197, 94, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.30) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: center;
  padding: 76px 0 110px;
  color: #ffffff;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #86efac;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tag-row span,
.detail-tags span {
  background: #f3f4f6;
  color: #374151;
}

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

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

.primary-button {
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 16px 30px rgba(22, 163, 74, 0.32);
}

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

.primary-button:hover {
  background: var(--green-dark);
}

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

.ghost-button.dark {
  color: var(--ink);
  border-color: var(--line);
  background: #ffffff;
}

.hero-poster {
  position: relative;
  align-self: stretch;
  min-height: 440px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(1.4deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-dot {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
  text-align: left;
}

.hero-dot.is-active {
  border-color: rgba(134, 239, 172, 0.9);
  color: #ffffff;
  background: rgba(22, 101, 52, 0.74);
}

.hero-dot img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-dot span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.quick-search-card {
  position: relative;
  z-index: 2;
  margin-top: -44px;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.quick-search-card h2,
.section-heading h2,
.page-hero h1,
.detail-article h1,
.detail-article h2,
.panel-title h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-search-card p,
.section-heading p,
.page-hero p,
.detail-article p,
.overview-card p,
.movie-card p,
.compact-card p,
.related-card p,
.ranking-card p,
.site-footer p {
  color: var(--muted);
}

.home-search {
  display: flex;
  gap: 10px;
}

.home-search input,
.search-field input,
.select-group select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.home-search input,
.search-field input {
  padding: 0 15px;
}

.home-search button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
}

.section-block {
  padding: 72px 0;
}

.section-band {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

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

.section-heading p {
  margin: 6px 0 0;
}

.section-heading > a,
.text-link,
.panel-title a {
  color: var(--green-dark);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: var(--dark);
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.10));
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 20px;
  font-weight: 900;
}

.category-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

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

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

.catalog-grid {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card,
.compact-card,
.overview-card,
.ranking-card,
.detail-article,
.player-card,
.side-info,
.ranking-panel,
.filter-toolbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.poster-link img,
.related-card img,
.side-poster img,
.ranking-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2,
.compact-card h2,
.overview-card h2,
.related-card h3,
.ranking-card h2 {
  margin: 8px 0 8px;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.movie-card h2 {
  font-size: 18px;
}

.movie-card p,
.compact-card p,
.related-card p,
.ranking-card p {
  margin: 0 0 14px;
  font-size: 14px;
}

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

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

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.compact-card {
  padding: 12px;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
}

.compact-card img {
  width: 86px;
  height: 122px;
  object-fit: cover;
  border-radius: 14px;
}

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

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f9fafb;
}

.rank-item strong {
  color: var(--green-dark);
}

.rank-item a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-item span {
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  padding: 46px 0 80px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(134, 239, 172, 0.34), transparent 32%),
    linear-gradient(135deg, #0f172a, #14532d);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.page-hero p {
  max-width: 780px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.filter-toolbar {
  margin-bottom: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.select-group {
  display: flex;
  gap: 10px;
}

.select-group select {
  min-width: 138px;
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.empty-state.is-visible {
  display: block;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.overview-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

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

.ranking-card {
  padding: 12px 18px 12px 12px;
  display: grid;
  grid-template-columns: 58px 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.ranking-card strong {
  color: var(--green-dark);
  font-size: 22px;
}

.ranking-poster {
  width: 88px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--dark);
}

.heat-pill,
.category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 900;
  white-space: nowrap;
}

.detail-main {
  padding: 30px 0 80px;
}

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

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

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

.player-card {
  padding: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.10), rgba(2, 6, 23, 0.66));
}

.video-shell.is-playing .play-overlay {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  font-size: 28px;
}

.detail-article {
  padding: 26px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.detail-article h1 {
  margin-top: 6px;
  font-size: clamp(30px, 4vw, 48px);
}

.lead-text {
  margin: 18px 0;
  font-size: 18px;
  color: #374151;
}

.detail-article h2 {
  margin-top: 28px;
  font-size: 24px;
}

.detail-article h2 + p {
  margin-top: 10px;
}

.detail-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-poster {
  border-radius: 22px;
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.side-info {
  padding: 20px;
}

.side-info h2 {
  margin: 0 0 14px;
}

.side-info dl,
.side-info dd {
  margin: 0;
}

.side-info dl {
  display: grid;
  gap: 10px;
}

.side-info dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.side-info dt {
  color: var(--muted);
}

.side-info dd {
  text-align: right;
  font-weight: 800;
}

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

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

.related-card a:first-child {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--dark);
}

.related-card a:first-child span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(22, 163, 74, 0.9);
  font-size: 12px;
  font-weight: 900;
}

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

.site-footer {
  padding: 54px 0 24px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #86efac;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

  .ranking-panel,
  .detail-sidebar {
    position: static;
  }

  .hero-controls {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-section,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

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

  .hero-poster {
    min-height: 360px;
    transform: none;
  }

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

  .hero-dot:nth-child(n+4) {
    display: none;
  }

  .quick-search-card,
  .filter-toolbar,
  .footer-grid,
  .overview-card,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .home-search,
  .select-group {
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .compact-list,
  .overview-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-hero,
  .section-heading,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-card {
    padding: 16px;
  }
}

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

  .site-logo {
    font-size: 19px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .catalog-grid,
  .compact-list,
  .overview-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 78px 1fr;
  }

  .page-hero,
  .detail-article,
  .quick-search-card {
    padding: 22px;
  }
}
