:root {
  --page-bg: #0f172a;
  --panel-bg: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.82);
  --panel-deep: #020617;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --emerald: #10b981;
  --emerald-deep: #059669;
  --teal: #0d9488;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, 0.12), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.25);
}

.brand-name {
  font-size: 20px;
  color: white;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #34d399;
}

.menu-button {
  display: none;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.18) 46%, transparent 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}

.hero-copy {
  width: min(660px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 18px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.25);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: white;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: 18px;
}

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

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

.hero-tags span,
.tag-row span {
  padding: 5px 10px;
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button {
  color: white;
  background: var(--emerald);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.25);
}

.primary-button:hover {
  background: var(--emerald-deep);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(15, 23, 42, 0.58);
}

.ghost-button:hover {
  border-color: rgba(52, 211, 153, 0.52);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-head h2,
.search-panel h2,
.content-panel h2 {
  margin: 0;
  color: white;
  font-size: 30px;
  line-height: 1.2;
}

.section-head p,
.search-panel p {
  margin: 8px 0 0;
  color: var(--subtle);
}

.section-more {
  flex: none;
  color: #34d399;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 26px 62px rgba(2, 6, 23, 0.34);
  transform: translateY(-6px) scale(1.015);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 48%);
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 8px;
  color: white;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 10px;
  min-width: 30px;
  text-align: center;
  background: rgba(245, 158, 11, 0.94);
}

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  color: white;
  font-size: 15px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h3 a:hover {
  color: #34d399;
}

.card-meta,
.card-line {
  margin: 6px 0 0;
  color: var(--subtle);
  font-size: 13px;
}

.card-line {
  display: -webkit-box;
  min-height: 40px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card .tag-row {
  margin-top: 10px;
}

.movie-card .tag-row span {
  font-size: 12px;
  padding: 3px 8px;
}

.category-band {
  padding: 72px 0;
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.18), rgba(15, 118, 110, 0.12));
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.84);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  border-color: rgba(52, 211, 153, 0.42);
  transform: translateY(-5px);
}

.category-card span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #34d399;
  font-weight: 800;
}

.category-card strong {
  display: block;
  color: white;
  font-size: 15px;
  line-height: 1.55;
}

.category-card div {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.category-card div a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.category-card div a:hover {
  color: #34d399;
}

.page-hero {
  padding: 90px 0 64px;
  background:
    linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0)),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.compact-hero h1 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.breadcrumb,
.crumbs a {
  color: #34d399;
  font-weight: 700;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.search-box span {
  color: #34d399;
  font-size: 22px;
}

.search-box input {
  width: 100%;
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 34px;
  padding: 0 14px;
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  background: var(--emerald);
}

.detail-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(16, 185, 129, 0.14), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--subtle);
}

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

.detail-line {
  max-width: 820px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.76);
}

.detail-tags {
  margin: 20px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.12));
  cursor: pointer;
}

.player-start span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding-left: 5px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 20px 50px rgba(16, 185, 129, 0.35);
  font-size: 34px;
}

.player-start strong {
  font-size: 20px;
}

.player-shell.is-playing .player-start {
  display: none;
}

.detail-content {
  display: grid;
  gap: 28px;
}

.content-panel {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.76);
  box-shadow: var(--shadow);
}

.content-panel h2 {
  margin-top: 30px;
  font-size: 26px;
}

.content-panel h2:first-child {
  margin-top: 0;
}

.content-panel p {
  margin: 12px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 40px;
  background: #020617;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
}

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

.footer-grid h3 {
  margin: 0 0 14px;
  color: white;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: #94a3b8;
  font-size: 14px;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
}

.footer-grid a:hover {
  color: #34d399;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
}

[hidden] {
  display: none !important;
}

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

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

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

  .menu-button {
    display: inline-flex;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 70px;
  }

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

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

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

  .detail-poster {
    width: min(270px, 100%);
  }

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

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

  .brand-name {
    font-size: 17px;
  }

  .hero {
    height: 540px;
  }

  .hero-mask {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.22));
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero p,
  .compact-hero p,
  .detail-line {
    font-size: 16px;
  }

  .section-block,
  .category-band {
    padding: 48px 0;
  }

  .section-head {
    display: grid;
    gap: 12px;
  }

  .movie-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .card-line,
  .movie-card .tag-row {
    display: none;
  }

  .content-panel {
    padding: 22px;
  }

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

  .footer-bottom {
    display: grid;
  }
}
