:root {
  --bg: #fff7ed;
  --surface: #ffffff;
  --surface-soft: #fff1e8;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --accent: #ea580c;
  --accent-strong: #dc2626;
  --accent-soft: #ffedd5;
  --shadow: 0 18px 45px rgba(127, 29, 29, 0.12);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 146, 60, 0.22), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(251, 146, 60, 0.22);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section-block,
.search-strip,
.page-hero,
.detail-hero,
.player-section,
.filter-bar,
.search-page {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--accent-strong);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

.brand-text {
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ea580c, #dc2626);
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 700;
  color: #4b5563;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active,
.footer-links a:hover {
  color: var(--accent);
}

.header-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(251, 146, 60, 0.12);
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  width: 210px;
  padding: 12px 8px 12px 18px;
}

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--accent-soft);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--accent-strong);
}

.mobile-panel {
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #ffffff;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  font-weight: 700;
}

.mobile-search input {
  padding: 12px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 60px;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: translateY(12px);
}

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

.hero-backdrop {
  position: absolute;
  inset: 0 calc((100% - 100vw) / 2);
  z-index: -2;
  background: linear-gradient(135deg, #7c2d12, #111827);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(3px) saturate(1.2);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 72% 30%, rgba(249, 115, 22, 0.42), transparent 30rem),
    linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(127, 29, 29, 0.78), rgba(17, 24, 39, 0.88));
}

.hero-content {
  max-width: 720px;
  padding: 110px 0 120px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content .eyebrow,
.detail-hero .eyebrow {
  color: #fed7aa;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-summary,
.detail-one-line,
.page-hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.tag-row,
.detail-tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-tag-links a {
  border: 1px solid rgba(249, 115, 22, 0.26);
  border-radius: 999px;
  padding: 6px 12px;
  color: #9a3412;
  background: rgba(255, 237, 213, 0.92);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary,
.btn.small {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.25);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
}

.btn.text {
  color: #fed7aa;
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.hero-poster,
.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 30px;
  background: linear-gradient(135deg, #ffedd5, #fecaca);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

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

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - var(--max)) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.active {
  width: 30px;
  background: #ffffff;
}

.search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -48px;
  padding: 28px;
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 5;
}

.search-strip h2,
.section-heading h2,
.rank-panel-title h2,
.content-main h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.wide-search input {
  padding: 15px 18px;
}

.wide-search button {
  padding: 15px 26px;
}

.section-block {
  margin-top: 72px;
}

.section-block.tinted {
  padding: 40px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.82), rgba(255, 255, 255, 0.92));
}

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

.section-heading > a {
  color: var(--accent);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.18);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.46);
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(127, 29, 29, 0.14);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #ffedd5, #fecaca);
}

.poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-year {
  right: 12px;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.card-meta a {
  color: var(--accent);
}

.card-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.card-title a:hover,
.ranking-info a:hover,
.compact-link:hover strong {
  color: var(--accent);
}

.card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
}

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

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

.category-card {
  display: block;
  min-height: 170px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 26px;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.16), transparent 12rem),
    #ffffff;
  box-shadow: 0 16px 38px rgba(127, 29, 29, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 52px rgba(127, 29, 29, 0.14);
}

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.2;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 94px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: #fff7ed;
}

.compact-link span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-weight: 800;
}

.compact-link strong,
.compact-link em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  margin-top: 36px;
  border-radius: 32px;
  color: #ffffff;
  background:
    radial-gradient(circle at 76% 20%, rgba(251, 146, 60, 0.45), transparent 28rem),
    linear-gradient(135deg, #7c2d12, #111827 72%);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  padding: 44px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.breadcrumbs b {
  font-weight: 400;
  opacity: 0.55;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 18px;
  margin-top: 28px;
  align-items: center;
}

.filter-search input {
  border: 1px solid rgba(251, 146, 60, 0.32);
  border-radius: 999px;
  padding: 14px 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(127, 29, 29, 0.08);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons button {
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--accent);
  background: #ffffff;
  cursor: pointer;
}

.filter-buttons button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 24px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(127, 29, 29, 0.08);
}

.ranking-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-weight: 900;
}

.ranking-poster {
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffedd5, #fecaca);
}

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

.ranking-info h2 {
  margin: 0;
  font-size: 22px;
}

.ranking-info p {
  margin: 7px 0 10px;
  color: var(--muted);
}

.detail-hero {
  padding: 34px 44px 44px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: center;
}

.detail-copy h1 {
  max-width: 820px;
}

.detail-tags span {
  color: #fed7aa;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.26);
}

.player-box video {
  width: 100%;
  min-height: min(64vw, 660px);
  max-height: 720px;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.34));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.36);
  font-size: 34px;
}

.player-box.playing .play-overlay {
  display: none;
}

.player-message {
  position: absolute;
  left: 20px;
  bottom: 18px;
  max-width: calc(100% - 40px);
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.68);
  font-size: 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.player-message.show {
  opacity: 1;
  transform: translateY(0);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.content-main,
.detail-side {
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 28px;
  padding: 30px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(127, 29, 29, 0.08);
}

.content-main h2:not(:first-child) {
  margin-top: 28px;
}

.content-main p {
  margin: 14px 0 0;
  color: #4b5563;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}

.detail-side dl div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  font-weight: 800;
}

.detail-tag-links a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.search-page {
  margin-top: 30px;
}

.main-search {
  max-width: 760px;
  margin-bottom: 34px;
}

.site-footer {
  margin-top: 86px;
  border-top: 1px solid rgba(251, 146, 60, 0.22);
  background: rgba(255, 255, 255, 0.76);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: flex-end;
  font-weight: 700;
}

.footer-bottom {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  border-top: 1px solid rgba(251, 146, 60, 0.16);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: block;
  }

  .hero-slide,
  .detail-layout,
  .split-layout,
  .detail-content,
  .footer-inner,
  .search-strip,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 28px;
    padding: 70px 0 120px;
  }

  .hero-content {
    padding: 0;
  }

  .hero-poster,
  .detail-poster {
    width: min(320px, 72vw);
  }

  .rank-panel {
    position: static;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .section-block,
  .search-strip,
  .page-hero,
  .detail-hero,
  .player-section,
  .filter-bar,
  .search-page {
    width: min(100% - 24px, var(--max));
  }

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

  .hero-carousel {
    min-height: auto;
  }

  .hero-slide {
    padding: 54px 0 110px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

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

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .section-block.tinted,
  .page-hero.slim,
  .detail-hero,
  .content-main,
  .detail-side {
    padding: 22px;
    border-radius: 24px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 16px;
  }

  .ranking-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
  }

  .ranking-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .ranking-number {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 13px;
  }

  .player-box video {
    min-height: 56vw;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .catalog-grid,
  .latest-grid,
  .related-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-poster,
  .detail-poster {
    width: 100%;
  }
}
