:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --amber-500: #f59e0b;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --shadow-soft: 0 12px 35px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 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(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.65;
}

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

img {
  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: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 229, 229, 0.9);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.nav-container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.28);
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(135deg, var(--sky-600), var(--emerald-600));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--neutral-700);
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky-600);
  background: var(--sky-50);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input,
.mobile-search input,
.hero-search input,
.catalog-toolbar input,
.catalog-toolbar select {
  border: 0;
  outline: 0;
  border-radius: 14px;
  padding: 11px 14px;
  background: var(--neutral-100);
  color: var(--neutral-800);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input {
  width: 210px;
}

.search-form input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

.search-form button,
.mobile-search button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--neutral-700);
  background: #fff;
}

.hero-shell {
  padding: 34px 0 56px;
  background: linear-gradient(180deg, #fff, var(--neutral-50));
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  border-radius: 32px;
  box-shadow: var(--shadow-card);
  background: var(--neutral-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.46) 45%, rgba(0, 0, 0, 0.16)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 42%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(34px, 8vw, 88px);
  width: min(640px, calc(100% - 48px));
  color: #fff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--sky-100);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sky-700, #0369a1);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
  box-shadow: 0 14px 32px rgba(14, 165, 233, 0.25);
}

.btn-secondary {
  color: var(--sky-700, #0369a1);
  background: var(--sky-50);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn.full {
  width: 100%;
  margin-top: 10px;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-dots button.active {
  width: 36px;
  background: #fff;
}

.quick-links {
  margin-top: -28px;
  position: relative;
  z-index: 3;
}

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

.quick-grid a {
  padding: 18px;
  border-radius: var(--radius-lg);
  color: var(--neutral-700);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  text-align: center;
}

.section {
  padding: 78px 0;
}

.section.white,
.category-lane {
  background: #fff;
}

.section.soft-gradient {
  background: linear-gradient(135deg, var(--sky-50), var(--emerald-50));
}

.section.dark {
  color: #fff;
  background: var(--neutral-900);
}

.category-lane {
  padding: 76px 0;
}

.category-lane:nth-of-type(even) {
  background: var(--neutral-50);
}

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

.section-head.center {
  justify-content: center;
  text-align: center;
}

.section-head h2,
.rank-layout h2,
.info-card h2,
.filter-panel h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-head p,
.rank-layout p {
  margin: 8px 0 0;
  color: var(--neutral-600);
}

.dark .section-head p,
.dark .rank-layout p {
  color: rgba(255, 255, 255, 0.68);
}

.section-kicker {
  color: var(--sky-600);
}

.text-link {
  color: var(--sky-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

.horizontal-list {
  display: grid;
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: var(--shadow-card);
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--neutral-900);
}

.horizontal .poster-link {
  aspect-ratio: auto;
  min-height: 220px;
}

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

.movie-card:hover .poster-link img,
.compact-card:hover img,
.side-poster:hover img {
  transform: scale(1.06);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 42%);
  opacity: 0.9;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 999px;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  padding: 7px 9px;
  text-align: center;
  background: linear-gradient(135deg, var(--amber-500), #ef4444);
}

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

.category-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--sky-600);
  background: var(--sky-50);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.32;
}

.movie-card h2 a:hover {
  color: var(--sky-600);
}

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--neutral-500);
  font-size: 13px;
  font-weight: 700;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: auto 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  color: var(--neutral-200);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(3px);
}

.soft-gradient .compact-card,
.white .compact-card {
  color: var(--neutral-800);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.compact-card img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.compact-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
  font-weight: 900;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card em {
  color: var(--neutral-500);
  font-style: normal;
  font-size: 12px;
}

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

.category-tile,
.category-overview-card {
  min-height: 160px;
  padding: 24px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.category-tile strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--neutral-900);
  font-size: 22px;
}

.category-tile span,
.category-overview-card p {
  color: var(--neutral-600);
}

.category-overview-card ul {
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.category-overview-card li + li {
  margin-top: 8px;
}

.category-overview-card li a {
  color: var(--neutral-700);
}

.page-hero {
  padding: 76px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--sky-500), var(--emerald-500));
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.search-hero,
.rank-hero {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 34%), linear-gradient(135deg, var(--emerald-500), var(--sky-500));
}

.hero-search {
  width: min(680px, 100%);
  margin-top: 28px;
}

.hero-search input {
  flex: 1;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.92);
}

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

.filter-panel,
.info-card {
  position: sticky;
  top: 100px;
  padding: 20px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.filter-panel h2,
.info-card h2 {
  margin-bottom: 16px;
  font-size: 20px;
}

.filter-panel nav {
  display: grid;
  gap: 6px;
}

.filter-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--neutral-700);
  font-weight: 700;
}

.filter-panel a:hover,
.filter-panel a.active {
  color: var(--sky-600);
  background: var(--sky-50);
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.catalog-toolbar.standalone {
  justify-content: flex-end;
}

.catalog-toolbar input {
  flex: 1;
  min-width: 220px;
}

.detail-topbar {
  background: var(--neutral-900);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  color: var(--neutral-300);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

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

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

.detail-main,
.detail-side {
  min-width: 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-card);
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: #000;
  cursor: pointer;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(1.06);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent 62%);
}

.big-play {
  position: relative;
  z-index: 2;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: var(--sky-600);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  padding-left: 4px;
}

.player-cover strong {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 2;
  font-size: clamp(22px, 4vw, 38px);
  text-align: left;
}

.detail-copy {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  background: #fff;
}

.detail-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.12;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0;
  color: var(--neutral-700);
}

.detail-copy .lead {
  color: var(--neutral-600);
  font-size: 18px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.side-poster {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

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

.info-card {
  position: static;
}

.info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-200);
}

.info-card li:last-child {
  border-bottom: 0;
}

.info-card span {
  color: var(--neutral-500);
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.prev-next a {
  padding: 16px;
  border-radius: var(--radius-lg);
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-weight: 700;
}

.site-footer {
  color: var(--neutral-300);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 58px 0;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
}

.footer-brand p {
  max-width: 520px;
  color: var(--neutral-400);
}

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

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

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  color: var(--neutral-500);
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .search-form {
    display: none;
  }

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

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

  .filter-panel {
    position: static;
  }
}

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

  .logo-text {
    font-size: 20px;
  }

  .nav-container {
    min-height: 64px;
  }

  .hero-slider {
    min-height: 520px;
    border-radius: 22px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 62px;
    width: auto;
  }

  .hero-content p {
    font-size: 16px;
  }

  .quick-grid,
  .movie-grid.three,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .prev-next {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    grid-template-columns: 1fr;
  }

  .horizontal .poster-link {
    aspect-ratio: 16 / 10;
  }

  .section,
  .category-lane {
    padding: 54px 0;
  }

  .section-head,
  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar.standalone {
    justify-content: stretch;
  }

  .detail-copy {
    padding: 20px;
  }

  .detail-tags a {
    font-size: 11px;
  }

  .player-cover strong {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
}
