:root {
  --bg: #fff8ed;
  --panel: #ffffff;
  --panel-soft: #fff3dc;
  --text: #2f261f;
  --muted: #74665c;
  --line: #f4d2a1;
  --orange: #f97316;
  --amber: #f59e0b;
  --gold: #fbbf24;
  --shadow: 0 22px 50px rgba(180, 83, 9, 0.16);
  --shadow-soft: 0 12px 26px rgba(180, 83, 9, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(251, 191, 36, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 3%, rgba(249, 115, 22, 0.16), transparent 28rem),
    linear-gradient(180deg, #fffaf0 0%, #fff7eb 42%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 237, 0.92);
  border-bottom: 1px solid rgba(251, 146, 60, 0.25);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.3);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(135deg, #ea580c, #d97706);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #5d4a3b;
  font-weight: 700;
  transition: all 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #c2410c;
  background: #ffedd5;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff;
}

.top-search input,
.local-filter,
.sort-select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: #fff;
}

.top-search input {
  width: 210px;
  padding: 9px 8px 9px 14px;
}

.top-search button,
.btn-primary,
.btn-soft,
.section-more {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
}

.top-search button,
.btn-primary {
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.btn-soft,
.section-more {
  padding: 10px 18px;
  color: #c2410c;
  background: #ffedd5;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 22px;
}

.hero {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 30px auto 18px;
  overflow: hidden;
  border-radius: 34px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5 52%, #fef3c7);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 42px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(14px) saturate(1.2);
}

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

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-kicker,
.detail-category,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #c2410c;
  background: rgba(255, 237, 213, 0.92);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 12px;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: #c2410c;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.18;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.movie-card p,
.detail-one-line,
.detail-text p,
.site-footer p {
  color: var(--muted);
  line-height: 1.78;
}

.hero-copy p {
  max-width: 620px;
  font-size: 18px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-tags span,
.tag-list span {
  padding: 8px 12px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 700;
}

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

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
}

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

.hero-poster span,
.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  color: #ea580c;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.hero-poster span {
  width: 78px;
  height: 78px;
  font-size: 30px;
}

.hero-controls {
  position: absolute;
  left: 64px;
  bottom: 42px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(194, 65, 12, 0.24);
}

.hero-dot.active {
  width: 54px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.quick-panel,
.content-section,
.page-shell,
.detail-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
  margin-bottom: 38px;
}

.quick-panel a {
  padding: 22px 18px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  text-align: center;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-text h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.2);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #fed7aa, #fef3c7);
}

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

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

.play-dot {
  width: 54px;
  height: 54px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
}

.type-badge,
.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  left: 12px;
  top: 12px;
  background: rgba(249, 115, 22, 0.92);
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  background: linear-gradient(135deg, #f97316, #f59e0b);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #2f261f;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: #ea580c;
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 50px;
  margin: 8px 0 14px;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8a7565;
  font-size: 13px;
}

.meta-line span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff7ed;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffedd5, #fef3c7);
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
  display: block;
}

.category-tile span {
  color: #9a3412;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  max-width: 280px;
  margin-top: 12px;
  color: #5d4a3b;
  font-style: normal;
  line-height: 1.65;
}

.page-shell,
.detail-shell {
  padding: 34px 0 64px;
}

.page-hero {
  overflow: hidden;
  margin-bottom: 30px;
  padding: 52px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5 52%, #fef3c7);
  box-shadow: var(--shadow-soft);
}

.rank-hero {
  background: radial-gradient(circle at 76% 10%, rgba(249, 115, 22, 0.22), transparent 24rem), linear-gradient(135deg, #fff7ed, #fef3c7);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 4vw, 54px);
}

.filter-bar {
  position: sticky;
  top: 90px;
  z-index: 10;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  background: rgba(255, 247, 237, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.local-filter {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
}

.sort-select {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #8a7565;
  font-size: 14px;
}

.breadcrumb a {
  color: #c2410c;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 36px;
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5 54%, #fef3c7);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fed7aa, #fef3c7);
  box-shadow: var(--shadow-soft);
}

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

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

.detail-one-line {
  max-width: 760px;
  font-size: 18px;
}

.player-section,
.detail-text,
.related-section {
  margin-bottom: 34px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.player-section h2,
.detail-text h2 {
  margin-bottom: 18px;
  font-size: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #17100c;
  aspect-ratio: 16 / 9;
}

.player-box video,
.player-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  background: #080604;
}

.player-overlay {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.player-overlay span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: #ea580c;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

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

.detail-text p {
  margin: 0 0 20px;
  font-size: 17px;
}

.detail-text dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.detail-text dl div {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff7ed;
}

.detail-text dt {
  color: #9a3412;
  font-weight: 900;
}

.detail-text dd {
  margin: 5px 0 0;
  color: var(--muted);
}

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

.movie-card-compact .movie-title {
  min-height: auto;
}

.movie-card-compact p {
  display: none;
}

.site-footer {
  margin-top: 48px;
  padding: 48px 0 24px;
  border-top: 1px solid rgba(251, 146, 60, 0.24);
  background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 36px;
}

.footer-brand,
.site-footer h3 {
  margin-bottom: 14px;
  color: #9a3412;
  font-size: 20px;
  font-weight: 900;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(251, 146, 60, 0.22);
  color: #8a7565;
  font-size: 14px;
  text-align: center;
}

.is-filtered-out {
  display: none;
}

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

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

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

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

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

  .brand-text em {
    display: none;
  }

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

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid #fed7aa;
    border-radius: 20px;
    background: #fff7ed;
    box-shadow: var(--shadow-soft);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 16px;
  }

  .hero {
    min-height: 760px;
    border-radius: 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 24px 74px;
  }

  .hero-poster {
    width: min(280px, 76vw);
    margin: 0 auto;
    transform: none;
  }

  .hero-controls {
    left: 24px;
    bottom: 28px;
  }

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

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

  .section-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .detail-cover {
    width: min(320px, 88vw);
    margin: 0 auto;
  }

  .footer-grid,
  .detail-text dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero,
  .quick-panel,
  .content-section,
  .page-shell,
  .detail-shell {
    width: min(100% - 22px, 1200px);
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .movie-grid,
  .catalog-grid,
  .category-grid,
  .related-grid,
  .quick-panel {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .player-section,
  .detail-text,
  .related-section {
    padding: 22px;
    border-radius: 22px;
  }

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