:root {
  --bg: #f8fafc;
  --bg-soft: #fff7ed;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.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: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 25px rgba(234, 88, 12, 0.28);
}

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

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

.nav-link,
.mobile-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--orange);
  background: #ffedd5;
}

.header-search {
  width: 285px;
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px 10px 16px;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search button {
  height: 100%;
  border: 0;
  padding: 10px 15px;
  color: #fff;
  background: var(--orange);
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--orange);
}

.mobile-nav {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid #f3f4f6;
}

.hero {
  background: #050505;
}

.hero-viewport {
  position: relative;
  height: min(72vh, 650px);
  min-height: 520px;
  overflow: hidden;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(234, 88, 12, 0.32), transparent 26%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 43%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1240px) / 2 + 22px));
  bottom: 82px;
  width: min(650px, calc(100% - 44px));
  color: #fff;
}

.hero-kicker,
.page-hero span,
.section-heading span {
  display: inline-block;
  margin-bottom: 12px;
  color: #fed7aa;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.75;
}

.hero-tags,
.card-meta,
.wide-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.card-meta span,
.wide-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 30px rgba(234, 88, 12, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.text-button {
  color: var(--orange);
  background: #fff7ed;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.2s ease;
}

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

.quick-search-block,
.content-section,
.category-section,
.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 28px;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.quick-search-inner h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.quick-search-inner p {
  margin: 0;
  color: var(--muted);
}

.large-search {
  display: flex;
  min-height: 58px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #fed7aa;
  background: #fff7ed;
}

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

.large-search button {
  border: 0;
  padding: 0 24px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
  cursor: pointer;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  letter-spacing: -0.05em;
}

.section-heading a {
  color: var(--orange);
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.card-cover img,
.wide-cover img,
.detail-poster img,
.catalog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.76));
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #fff;
  background: rgba(234, 88, 12, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: 0.2s ease;
}

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

.region-pill,
.rank-badge,
.small-rank {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.region-pill {
  right: 10px;
  top: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover,
.wide-info h2 a:hover,
.catalog-body h2 a:hover {
  color: var(--orange);
}

.card-desc {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-meta {
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.card-meta span {
  color: #6b7280;
  background: #f3f4f6;
}

.card-tags {
  margin-top: 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-section,
.warm-section {
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.category-section .section-heading,
.category-section .category-grid,
.warm-section .section-heading,
.warm-section .ranking-grid {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}

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

.category-box {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.category-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-box span {
  color: var(--orange);
  font-weight: 900;
}

.category-box strong {
  font-size: 20px;
  line-height: 1.35;
}

.category-box em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}

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

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

.side-list {
  grid-template-columns: 1fr;
}

.wide-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.wide-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 15px;
  background: #111827;
}

.small-rank {
  left: 8px;
  top: 8px;
  background: #111827;
}

.wide-info h2 {
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.wide-info p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.wide-meta span {
  color: #7c2d12;
  background: #ffedd5;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

.page-hero {
  min-height: 310px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 62px 22px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 24%),
    radial-gradient(circle at 82% 40%, rgba(255, 255, 255, 0.18), transparent 30%);
}

.page-hero > div {
  position: relative;
  max-width: 780px;
}

.page-hero.slim {
  min-height: 265px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.05em;
}

.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.75;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.crumbs a:hover {
  color: #fed7aa;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 190px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 24px;
  background: #fff7ed;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid #fdba74;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.movie-card.is-hidden,
.wide-card.is-hidden {
  display: none;
}

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

.catalog-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.catalog-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  min-height: 260px;
  background: #111827;
}

.catalog-body {
  padding: 24px;
}

.catalog-body h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.catalog-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.catalog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.catalog-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.detail-hero {
  min-height: 560px;
  background: #0f172a;
}

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

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
  opacity: 0.45;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68)),
    linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 55%);
}

.detail-content {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 78px 22px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  margin: 20px 0 16px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.75;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.13);
}

.player-section {
  max-width: 1240px;
  margin: -68px auto 0;
  padding: 0 22px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.35);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.48));
  cursor: pointer;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 20px 40px rgba(234, 88, 12, 0.35);
  font-size: 38px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.95fr);
  gap: 30px;
}

.detail-main,
.detail-side {
  min-width: 0;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.detail-main h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.detail-main p {
  margin: 0 0 26px;
  color: #374151;
  line-height: 1.95;
  font-size: 16px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-table div {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.info-table span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.info-table strong {
  color: var(--text);
}

.page-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-switch a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.related-block {
  padding-top: 0;
}

.site-footer {
  margin-top: 28px;
  color: #e5e7eb;
  background: #111827;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.75;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
}

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

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .ranking-grid,
  .ranking-list,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

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

@media (max-width: 820px) {
  .hero-viewport {
    min-height: 560px;
    height: 74vh;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-inner,
  .detail-content,
  .detail-layout,
  .footer-grid,
  .filter-panel,
  .catalog-card {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding-top: 44px;
  }

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

  .player-section {
    margin-top: -36px;
  }

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

@media (max-width: 620px) {
  .nav-wrap {
    padding: 12px 16px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }

  .hero-content p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

  .content-section,
  .category-section,
  .quick-search-block,
  .detail-layout {
    padding: 38px 16px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-desc {
    display: none;
  }

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

  .wide-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .wide-info p {
    display: none;
  }

  .catalog-cover {
    min-height: 220px;
  }

  .info-table {
    grid-template-columns: 1fr;
  }
}
