:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --teal: #14b8a6;
  --teal-soft: rgba(20, 184, 166, 0.18);
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(20, 184, 166, 0.14), transparent 34rem),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.10), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.24);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--muted-2);
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #5eead4;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
}

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

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.54);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 42%),
    var(--hero-image) center / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-content {
  position: relative;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.72fr);
  align-items: center;
  gap: 54px;
  padding: 76px 0 92px;
}

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

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5eead4;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.meta-line span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--muted-2);
}

.hero-meta span {
  padding: 8px 13px;
}

.meta-line span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  box-shadow: 0 16px 34px rgba(20, 184, 166, 0.24);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.35), transparent 42%);
}

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

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

.hero-arrow,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  color: white;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  background: var(--teal);
}

.content-section,
.quick-search-section {
  padding: 42px 0;
}

.page-main {
  padding: 38px 0 70px;
}

.page-hero {
  margin: 20px 0 30px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.14), transparent 48%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(32px, 4vw, 52px);
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-more {
  color: #5eead4;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.54);
  background: rgba(30, 41, 59, 0.82);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #0f172a;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.045);
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.92);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

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

.movie-card h3,
.rank-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
  color: #5eead4;
}

.movie-card p,
.rank-info span,
.category-tile h3 {
  color: var(--muted);
  line-height: 1.7;
}

.movie-card p {
  min-height: 74px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 4px 9px;
  font-size: 12px;
}

.big-tags span {
  padding: 7px 12px;
  font-size: 14px;
}

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

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

.category-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.category-main-link {
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 22px 22px 10px;
}

.category-tile span {
  color: #5eead4;
  font-weight: 900;
}

.category-tile h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-samples a {
  color: var(--muted-2);
  font-size: 13px;
}

.category-samples a:hover {
  color: #5eead4;
}

.filter-panel,
.global-search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16);
}

.global-search-panel {
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

.global-filter-row {
  display: grid;
  grid-template-columns: 190px 190px;
  gap: 14px;
}

.filter-panel label,
.global-search-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.58);
  color: white;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(45, 212, 191, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-poster {
  position: relative;
}

.rank-poster img {
  width: 120px;
  height: 100%;
  min-height: 146px;
  object-fit: cover;
  background: #0f172a;
}

.rank-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  font-weight: 900;
}

.rank-info {
  padding: 14px 14px 14px 0;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #5eead4;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.14), transparent 48%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
}

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

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

.detail-meta {
  margin: 18px 0;
}

.player-section {
  padding-top: 38px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.42)),
    rgba(2, 6, 23, 0.62);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: white;
  font-size: 34px;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.28);
}

.player-cover strong {
  font-size: 26px;
}

.player-cover span {
  color: var(--muted-2);
}

.detail-story {
  display: grid;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.detail-story h2 {
  margin: 0;
  font-size: 26px;
}

.detail-story p {
  margin: 0 0 16px;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.56);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 44px 0 30px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-grid a:hover {
  color: #5eead4;
}

.footer-bottom {
  padding: 0 0 28px;
  font-size: 14px;
}

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

.empty-result {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted-2);
  text-align: center;
  background: rgba(15, 23, 42, 0.68);
}

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

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-content,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: auto;
    padding: 54px 0 96px;
  }

  .hero-poster {
    max-width: 320px;
    transform: none;
  }

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

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

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

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

  .hero-slider {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

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

  .hero-bg {
    position: absolute;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

  .movie-grid,
  .home-grid,
  .catalog-grid,
  .category-grid,
  .large-category-grid,
  .rank-list,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 98px 1fr;
  }

  .rank-poster img {
    width: 98px;
    min-height: 132px;
  }

  .page-hero,
  .detail-hero,
  .detail-story {
    padding: 22px;
  }
}
