:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --amber: #f59e0b;
  --orange: #ea580c;
  --amber-soft: #fffbeb;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #fff7ed 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 21px;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.03em;
}

.brand-text small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

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

.nav-link {
  padding: 9px 15px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.header-search {
  width: 250px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 8px 4px 8px 10px;
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search button,
.search-page-form button {
  border: 0;
  border-radius: 11px;
  padding: 8px 13px;
  background: var(--amber);
  color: #ffffff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.84);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.96);
}

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

.hero-slider {
  position: relative;
  height: clamp(500px, 60vw, 640px);
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 7s ease;
}

.hero-slide.is-active img {
  transform: scale(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.25) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 96px 0 86px;
  color: #ffffff;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-tags span {
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero-tags span:first-child {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-color: transparent;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.hero-content p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.36);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.82);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(12px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: 0.22s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.07);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.22s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber);
}

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

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.section-title > span {
  width: 5px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--orange));
}

.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.section-title p {
  margin: 7px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.09);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 62%);
  transition: opacity 0.24s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-year,
.card-genre,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(10px);
}

.card-year {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
}

.card-genre {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.card-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.4);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span:first-child {
  padding: 3px 8px;
  border-radius: 8px;
  color: #b45309;
  background: #fffbeb;
  font-weight: 700;
}

.card-meta i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #cbd5e1;
}

.movie-card h2 {
  margin: 0;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.42;
  transition: color 0.22s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover h2 {
  color: #d97706;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.warm-panel {
  width: min(1180px, calc(100% - 32px));
  padding: 36px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.22);
}

.dark-panel {
  width: min(1180px, calc(100% - 32px));
  padding: 36px;
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.dark-panel .section-title h2,
.dark-panel .section-title p {
  color: #ffffff;
}

.dark-panel .movie-card {
  background: rgba(255, 255, 255, 0.96);
}

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

.category-tile,
.category-card-large a {
  display: block;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b 58%, #92400e);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.category-tile strong,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile span,
.category-card-large p {
  display: block;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-preview span {
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 168px;
}

.movie-card-horizontal .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card-horizontal .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(32px, 6vw, 62px);
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.55), transparent 35%), linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.small-hero {
  min-height: 260px;
  display: flex;
  align-items: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: #fcd34d;
  font-size: 14px;
  font-weight: 700;
}

.crumb a:hover {
  color: #ffffff;
}

.filter-bar,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.search-page-form input {
  width: min(100%, 620px);
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.filter-bar input:focus,
.search-page-form input:focus {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.filter-bar span,
.filter-state {
  display: none;
  color: #b45309;
  font-weight: 700;
}

.filter-bar span.is-visible,
.filter-state.is-visible {
  display: inline-flex;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

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

.player-shell {
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.42);
  transform: translate(-50%, -50%);
  transition: 0.2s ease;
}

.player-start span {
  margin-left: 5px;
  font-size: 34px;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-article {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.detail-article h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

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

.detail-article p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.lead-text {
  padding: 18px 20px;
  border-radius: 18px;
  color: #78350f !important;
  background: #fffbeb;
  font-size: 18px !important;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
  font-size: 13px;
}

.poster-card,
.side-box {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.07);
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.poster-card strong,
.poster-card span {
  display: block;
  padding: 0 20px;
}

.poster-card strong {
  padding-top: 18px;
  font-size: 20px;
}

.poster-card span {
  padding-bottom: 20px;
  color: var(--muted);
}

.side-box {
  margin-top: 20px;
  padding: 22px;
}

.side-box h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.side-box ul,
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-box li + li {
  margin-top: 12px;
}

.side-box a {
  display: block;
  color: #334155;
}

.side-box a:hover {
  color: #d97706;
}

.section-more {
  margin-top: 26px;
  text-align: center;
}

.site-footer {
  margin-top: 58px;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
}

.brand-footer .brand-text strong {
  font-size: 20px;
}

.footer-brand p {
  max-width: 430px;
  margin: 18px 0 0;
  color: #94a3b8;
}

.footer-col h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 16px;
}

.footer-col li + li {
  margin-top: 9px;
}

.footer-col a {
  color: #94a3b8;
}

.footer-col a:hover {
  color: #fbbf24;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

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

@media (max-width: 1050px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .side-box {
    margin-top: 0;
  }

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    padding: 80px 0 70px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .warm-panel,
  .dark-panel,
  .page-hero,
  .detail-layout,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .warm-panel,
  .dark-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .catalogue-grid,
  .category-grid,
  .category-list-grid,
  .detail-side,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal .card-cover {
    aspect-ratio: 16 / 10;
  }

  .filter-bar,
  .search-page-form {
    flex-direction: column;
    align-items: stretch;
  }

  .player-start {
    width: 68px;
    height: 68px;
  }

  .player-start span {
    font-size: 28px;
  }

  .detail-article {
    padding: 22px;
  }
}
