:root {
  --color-ink: #1f2937;
  --color-muted: #6b7280;
  --color-soft: #fff7ed;
  --color-soft-strong: #ffedd5;
  --color-brand: #d97706;
  --color-brand-dark: #b45309;
  --color-gold: #f59e0b;
  --color-line: #e5e7eb;
  --color-card: #ffffff;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(217, 119, 6, 0.16);
  --radius-large: 24px;
  --radius-medium: 16px;
  --page-width: 1180px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 420px, #f8fafc 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  color: #111827;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-brand), #fbbf24);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-brand-dark);
  background: var(--color-soft-strong);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f9fafb;
  border: 1px solid var(--color-line);
  border-radius: 999px;
}

.top-search input {
  width: 190px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
}

.top-search button,
.large-search button,
.filter-panel button,
.primary-button,
.round-link {
  border: 0;
  color: #ffffff;
  background: var(--color-brand);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
  padding: 8px 16px;
}

.top-search button:hover,
.large-search button:hover,
.filter-panel button:hover,
.primary-button:hover,
.round-link:hover {
  background: var(--color-brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 12px;
  border: 1px solid var(--color-line);
  background: #ffffff;
  border-radius: 10px;
  font-weight: 700;
}

.hero-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-missing {
  opacity: 0;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.4), transparent 32%),
    linear-gradient(135deg, #111827 0%, #5b3416 48%, #111827 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 46%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - var(--page-width)) / 2));
  right: 32px;
  bottom: 64px;
  max-width: 780px;
  color: #ffffff;
}

.hero-tags,
.card-meta,
.tag-row,
.detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.9);
  color: #fff7ed;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #f3f4f6;
  font-size: 19px;
}

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

.primary-button,
.ghost-button,
.round-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search-band,
.page-shell {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
}

.home-search-band {
  margin-top: -36px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 440px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.home-search-band h2,
.page-hero h1,
.section-heading h2,
.detail-info h1,
.text-section h2 {
  margin: 0;
  color: #111827;
}

.home-search-band p,
.section-heading p,
.page-hero p,
.category-overview-head p,
.filter-count,
.player-note,
.site-footer p {
  color: var(--color-muted);
}

.large-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--color-line);
  border-radius: 18px;
}

.large-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 14px;
}

.large-search button {
  padding: 0 22px;
}

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

.content-section {
  margin-bottom: 64px;
}

.highlight-section,
.category-overview-card,
.text-section,
.player-section,
.filter-panel,
.detail-hero {
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #ffffff;
  border-radius: var(--radius-large);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.highlight-section {
  padding: 28px;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
}

.section-heading,
.section-topline,
.category-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading > div,
.category-overview-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-overview-head > div {
  display: block;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--color-brand-dark);
  background: var(--color-soft-strong);
  font-weight: 900;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.more-link {
  color: var(--color-brand-dark);
  font-weight: 800;
}

.more-link:hover {
  color: #92400e;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  background: var(--color-card);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.68), transparent 35%),
    linear-gradient(135deg, #1f2937, #78350f);
}

.detail-poster.poster-wrap {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.poster-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
  pointer-events: none;
}

.poster-fallback {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 1;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(17, 24, 39, 0.76);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--color-muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--color-brand-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

.page-shell {
  padding: 36px 0 72px;
}

.page-hero {
  margin-bottom: 28px;
  padding: 34px;
  overflow: hidden;
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 86% 12%, rgba(251, 191, 36, 0.42), transparent 30%),
    linear-gradient(135deg, #fff7ed 0%, #ffffff 62%, #fffbeb 100%);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-brand-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.breadcrumb a {
  color: var(--color-brand-dark);
  font-weight: 700;
}

.category-overview-list {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 26px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.filter-panel {
  position: sticky;
  top: 86px;
  z-index: 10;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  outline: 0;
  background: #ffffff;
  padding: 0 12px;
  color: var(--color-ink);
}

.filter-grid input:focus,
.filter-grid select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.filter-panel button {
  min-height: 44px;
  padding: 0 18px;
}

.filter-count {
  margin: 12px 0 0;
  font-weight: 700;
}

.no-results {
  padding: 32px;
  text-align: center;
  color: var(--color-muted);
  background: #ffffff;
  border-radius: var(--radius-medium);
  border: 1px dashed var(--color-line);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  margin-bottom: 30px;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.detail-one-line {
  margin: 0 0 22px;
  color: #374151;
  font-size: 18px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.meta-list div {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
}

.meta-list dt {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.meta-list dd {
  margin: 4px 0 0;
  color: #111827;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section,
.text-section {
  margin-bottom: 30px;
  padding: 28px;
}

.compact-heading {
  margin-bottom: 18px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 32px;
  box-shadow: 0 16px 40px rgba(251, 191, 36, 0.36);
}

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

.player-start.is-hidden {
  display: none;
}

.player-note {
  word-break: break-all;
  font-size: 13px;
}

.text-section h2 {
  margin-bottom: 12px;
  font-size: 26px;
}

.text-section p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  padding: 46px 0 26px;
  background: #111827;
  color: #f9fafb;
}

.footer-grid {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.1fr;
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 12px;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.footer-links a {
  color: #d1d5db;
}

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

.copyright {
  width: min(var(--page-width), calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

[hidden],
.searchable-card.is-hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .top-search {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    border-radius: 12px;
  }

  .home-search-band,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

  .site-logo {
    font-size: 19px;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 58px;
  }

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

  .hero-control {
    display: none;
  }

  .home-search-band,
  .highlight-section,
  .page-hero,
  .category-overview-card,
  .detail-hero,
  .player-section,
  .text-section {
    padding: 20px;
  }

  .section-heading,
  .section-topline,
  .category-overview-head {
    display: block;
  }

  .section-heading > div {
    margin-bottom: 8px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p {
    min-height: auto;
  }

  .filter-panel {
    position: static;
  }

  .filter-grid,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .large-search {
    flex-direction: column;
  }

  .large-search button {
    min-height: 44px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .page-shell,
  .home-search-band {
    width: min(100% - 22px, var(--page-width));
  }
}
