:root {
  --amber: #f59e0b;
  --rose: #e11d48;
  --sky: #0284c7;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #fff7ed;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #fffbeb 0%, #fff1f2 52%, #f0f9ff 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.94), rgba(255, 241, 242, 0.94), rgba(240, 249, 255, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 10px 20px rgba(225, 29, 72, 0.24);
}

.brand-name {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, #d97706, #e11d48, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  font-size: 15px;
  font-weight: 700;
  color: #475569;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--rose);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
  border-radius: 4px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  background: white;
  border-top: 1px solid var(--line);
}

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

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.38), transparent 36%),
    linear-gradient(90deg, rgba(120, 53, 15, 0.92), rgba(136, 19, 55, 0.88), rgba(12, 74, 110, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 660px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 108px 16px 160px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.1;
}

.hero-content p {
  width: min(760px, 100%);
  margin: 22px auto 0;
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.7;
  color: #ffedd5;
}

.hero-actions,
.hero-chips,
.filter-group,
.detail-meta,
.tag-cloud,
.genre-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.hero-actions {
  margin-top: 32px;
}

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

.primary-btn {
  color: white;
  background: linear-gradient(90deg, var(--amber), var(--rose));
  box-shadow: 0 18px 28px rgba(225, 29, 72, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.channel-panel:hover,
.wide-card:hover {
  transform: translateY(-3px);
}

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

.ghost-btn {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-search-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 48px;
  width: min(860px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search input,
.search-field input {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  outline: none;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

.hero-search button {
  min-width: 104px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--rose));
  cursor: pointer;
}

.hero-chips {
  justify-content: flex-start;
  margin-top: 14px;
}

.hero-chips a {
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  z-index: 6;
  right: 28px;
  bottom: 58px;
  display: grid;
  gap: 10px;
}

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

.hero-dot.is-active {
  height: 34px;
  background: white;
}

.section-block {
  padding: 70px 0;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  background: linear-gradient(90deg, #d97706, #e11d48, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover img,
.category-card:hover img,
.channel-panel:hover img,
.wide-card:hover img {
  transform: scale(1.08);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), transparent);
}

.card-rating {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.96);
  font-size: 13px;
  font-weight: 900;
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.movie-card-body strong {
  min-height: 44px;
  font-size: 16px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.tag-cloud span,
.genre-cloud span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
}

.soft-section {
  padding: 68px 0;
  background: linear-gradient(90deg, rgba(255, 241, 242, 0.92), rgba(255, 247, 237, 0.92), rgba(240, 249, 255, 0.92));
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.rank-list,
.wide-list,
.content-card,
.detail-card,
.player-card,
.side-card,
.channel-panel {
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

.rank-list {
  padding: 14px;
  counter-reset: ranking;
}

.rank-row {
  counter-increment: ranking;
  display: grid;
  grid-template-columns: 42px 96px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 13px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: linear-gradient(90deg, #fffbeb, #fff1f2);
}

.rank-index::before {
  content: counter(ranking);
}

.rank-index {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #475569;
  background: #e2e8f0;
  font-weight: 900;
}

.rank-row:nth-child(1) .rank-index {
  color: white;
  background: var(--amber);
}

.rank-row:nth-child(2) .rank-index {
  color: white;
  background: #94a3b8;
}

.rank-row:nth-child(3) .rank-index {
  color: white;
  background: #ea580c;
}

.rank-row img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rank-info strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.rating {
  color: var(--amber);
  font-weight: 900;
}

.wide-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.wide-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.wide-card:hover {
  background: linear-gradient(90deg, #fffbeb, #fff1f2);
}

.wide-card img {
  width: 104px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.wide-card strong {
  display: block;
  margin-bottom: 6px;
}

.wide-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wide-card span {
  color: #94a3b8;
  font-size: 12px;
}

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

.category-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-thumbs,
.channel-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: hidden;
}

.category-thumbs img,
.channel-images img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.category-card strong,
.channel-panel h2 {
  font-size: 22px;
}

.category-card em,
.channel-panel p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.page-main {
  padding-top: 68px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #78350f, #881337, #0c4a6e);
}

.compact-hero .container {
  padding: 86px 0;
  text-align: center;
}

.compact-hero h1,
.page-hero-content h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

.compact-hero p,
.page-hero-content p {
  width: min(760px, 100%);
  margin: 18px auto 0;
  color: #ffedd5;
  line-height: 1.8;
  font-size: 18px;
}

.image-hero {
  min-height: 460px;
}

.image-hero > img {
  position: absolute;
  inset: 0;
}

.page-hero-content {
  min-height: 460px;
  align-items: flex-start;
  text-align: left;
  padding-bottom: 80px;
}

.page-hero-content p {
  margin-left: 0;
}

.toolbar {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.filter-bar,
.search-toolbar {
  display: grid;
  gap: 15px;
}

.search-field.full {
  display: block;
  width: 100%;
}

.filter-group {
  justify-content: flex-start;
}

.filter-group button {
  border: 0;
  padding: 9px 13px;
  border-radius: 999px;
  color: #475569;
  background: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.filter-group button.is-active,
.filter-group button:hover {
  color: white;
  background: linear-gradient(90deg, var(--amber), var(--rose));
  box-shadow: none;
}

.empty-state {
  margin: 24px 0;
  padding: 22px;
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: white;
  box-shadow: var(--shadow-soft);
}

.channel-panel {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.channel-images {
  padding: 14px;
  background: linear-gradient(135deg, #fffbeb, #fff1f2);
}

.channel-panel-body {
  padding: 24px;
}

.channel-panel-body span {
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.channel-panel-body h2 {
  margin: 8px 0 8px;
}

.full-rank-list {
  max-width: 920px;
  margin: 0 auto;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 30px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--rose);
}

.player-card {
  padding: 12px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  aspect-ratio: 16 / 9;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.24);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-ring {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  box-shadow: 0 20px 40px rgba(225, 29, 72, 0.38);
  font-size: 34px;
  transform: translateX(2px);
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.lead-text {
  margin: 0 0 18px;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  justify-content: flex-start;
  margin: 0 0 20px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.tag-cloud,
.genre-cloud {
  justify-content: flex-start;
  margin: 0 0 22px;
}

.detail-card h2,
.side-card h2,
.content-card h2 {
  margin: 24px 0 12px;
  font-size: 22px;
}

.detail-card p,
.content-card p {
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.9;
}

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

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

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
  position: sticky;
  top: 88px;
}

.side-card {
  padding: 18px;
}

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 14px;
}

.compact-wide-list {
  padding: 0;
  box-shadow: none;
}

.narrow-content {
  max-width: 900px;
}

.content-card {
  padding: 34px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1e293b, #111827);
}

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

.footer-brand {
  color: white;
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

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

  .detail-sidebar {
    position: static;
    grid-template-columns: 280px 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .hero-search {
    grid-template-columns: 1fr;
  }

  .hero-search button {
    height: 46px;
  }

  .hero-dots {
    right: 18px;
    bottom: 30px;
  }

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

  .split-layout,
  .category-grid,
  .channel-grid,
  .footer-grid,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 34px 74px 1fr;
  }

  .rank-row img {
    width: 74px;
    height: 54px;
  }

  .rank-row .rating {
    grid-column: 3;
  }

  .page-hero-content {
    align-items: center;
    text-align: center;
  }

  .page-hero-content p {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-content {
    padding-top: 98px;
    padding-bottom: 210px;
  }

  .hero-search-panel {
    bottom: 74px;
  }

  .hero-chips {
    max-height: 78px;
    overflow: hidden;
  }

  .poster-grid,
  .large-grid,
  .catalog-grid,
  .related-grid {
    gap: 14px;
  }

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

  .movie-card-body strong {
    font-size: 14px;
  }

  .wide-card {
    grid-template-columns: 84px 1fr;
  }

  .wide-card img {
    width: 84px;
    height: 62px;
  }

  .detail-card,
  .content-card {
    padding: 22px;
  }

  .play-ring {
    width: 70px;
    height: 70px;
  }
}
