:root {
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --rose-700: #be123c;
  --teal-600: #0d9488;
  --white: #ffffff;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 25px 80px rgba(15, 23, 42, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 38%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-800), var(--amber-700), var(--amber-900));
  box-shadow: 0 10px 30px rgba(120, 53, 15, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--amber-900);
  background: var(--white);
  box-shadow: inset 0 -5px 12px rgba(217, 119, 6, 0.18);
}

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

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

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 4px;
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.32), transparent 24%), linear-gradient(135deg, var(--amber-900), var(--amber-700), #7f1d1d);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(120, 53, 15, 0.62), rgba(15, 23, 42, 0.18));
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  padding: 96px 0 92px;
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: var(--amber-100);
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 42px);
  color: #fde68a;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

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

.hero-tags span,
.detail-badges span,
.card-badges span,
.detail-tags span,
.tag-row em {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.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 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: var(--amber-900);
  background: var(--white);
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.2);
}

.btn.ghost {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: rgba(120, 53, 15, 0.28);
}

.center-btn {
  width: fit-content;
  margin: 28px auto 0;
}

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

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

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

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

.home-search-wrap {
  position: relative;
  z-index: 5;
  margin-top: -44px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 220px;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: var(--slate-800);
  background: var(--white);
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.section-wrap {
  padding: 64px 0;
}

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

.section-title h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--slate-600);
}

.title-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-700), var(--rose-700));
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.24);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--slate-100);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.7), transparent);
}

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--rose-700);
  box-shadow: 0 8px 18px rgba(190, 18, 60, 0.34);
}

.card-body {
  padding: 16px;
}

.card-badges span {
  padding: 4px 9px;
  color: var(--amber-800);
  background: var(--amber-100);
  font-size: 12px;
}

.movie-card h3 {
  margin: 11px 0 8px;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--amber-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row em {
  padding: 3px 7px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-size: 12px;
}

.warm-panel {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.85), rgba(254, 243, 199, 0.75));
}

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

.category-tile {
  min-height: 128px;
  padding: 22px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), #0891b2);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.22);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.category-tile:hover {
  filter: brightness(1.05);
  transform: translateY(-5px) scale(1.01);
}

.category-tile span {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.ranking-entry {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  color: var(--white);
  background: linear-gradient(135deg, #172554, #312e81, #0f172a);
}

.light-title h2,
.light-title p {
  color: var(--white);
}

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

.mini-link {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
  min-height: 90px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-link:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.mini-link img {
  grid-row: 1 / span 2;
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.mini-link span {
  font-weight: 800;
}

.mini-link small {
  color: rgba(255, 255, 255, 0.65);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-800), var(--amber-900));
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

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

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
}

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

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-card-large p,
.category-card-large li {
  color: var(--slate-600);
  line-height: 1.7;
}

.category-card-large ul {
  padding-left: 18px;
  margin: 12px 0;
}

.text-link {
  color: var(--amber-700);
  font-weight: 900;
}

.detail-hero {
  min-height: 560px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(120, 53, 15, 0.76), rgba(15, 23, 42, 0.42));
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  filter: blur(2px) saturate(1.15);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.crumb {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
}

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

.detail-badges span {
  padding: 7px 12px;
  color: var(--amber-900);
  background: #fde68a;
}

.detail-info .one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0 30px;
}

.detail-tags span {
  padding: 6px 11px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.detail-main {
  padding-top: 52px;
}

.player-card,
.story-card,
.info-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.player-card {
  padding: 24px;
  margin-bottom: 34px;
}

.player-card h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.75));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: var(--amber-900);
  background: var(--white);
  font-size: 32px;
  box-shadow: 0 14px 35px rgba(255, 255, 255, 0.24);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
}

.story-card,
.info-card {
  padding: 28px;
}

.story-card h2,
.info-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 26px;
}

.story-card p {
  margin: 0 0 26px;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 1.95;
}

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

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-card span {
  color: var(--slate-600);
}

.info-card strong {
  text-align: right;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .content-layout,
  .category-list-large {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 560px;
  }

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

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

  .detail-poster {
    max-width: 280px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .brand-text {
    font-size: 17px;
  }

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

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

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

  .category-cover {
    max-width: 220px;
  }

  .section-wrap {
    padding: 44px 0;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }
}
