:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f1f5f9;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --amber: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  font-family: Inter, 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;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 38%, #eef2f7 100%);
  color: var(--ink);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--orange);
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.28);
  font-size: 15px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-bar input {
  width: 190px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus {
  border-color: #fdba74;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

.header-search button,
.mobile-search button,
.big-search button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  cursor: pointer;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 18px 20px;
  background: #ffffff;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #111827;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(251, 146, 60, 0.18), transparent 32%), linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  transform: translateY(-50%);
  width: min(660px, calc(100% - 48px));
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--orange);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.hero-kicker {
  background: rgba(249, 115, 22, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(234, 88, 12, 0.3);
}

.hero h1 {
  margin: 26px 0 18px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 0;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.detail-pills,
.card-meta,
.tag-row,
.detail-tags,
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.detail-pills span,
.detail-tags span,
.tag-row span,
.quick-tags a {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn,
.more-link,
.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 26px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 34px rgba(234, 88, 12, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.more-link:hover,
.pill-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.hero-nav {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

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

.hero-dot.active {
  width: 56px;
  background: #ffffff;
}

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

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

.section-heading h2,
.sub-hero h1,
.detail-card h1,
.search-panel h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading.simple {
  align-items: flex-start;
}

.more-link,
.pill-link {
  padding: 10px 16px;
  color: var(--orange);
  background: #fff7ed;
}

.horizontal-row {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 22px;
}

.horizontal-row .movie-card {
  flex: 0 0 292px;
  scroll-snap-align: start;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #f8fafc, #fed7aa);
  overflow: hidden;
}

.poster-wrap img,
.side-poster img,
.player-cover img {
  height: 100%;
  object-fit: cover;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  background: #f1f5f9;
  color: #475569;
}

.warm-band {
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fde68a;
}

.band-inner {
  padding-top: 64px;
  padding-bottom: 64px;
}

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

.channel-card {
  position: relative;
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.channel-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.channel-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.84));
}

.channel-card span,
.channel-card strong {
  position: relative;
  z-index: 1;
}

.channel-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(249, 115, 22, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.channel-card strong {
  margin-top: 10px;
  line-height: 1.45;
}

.split-section,
.ranking-layout,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.search-panel,
.side-panel,
.detail-card,
.player-card,
.category-overview-card,
.side-poster {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.search-panel {
  padding: 28px;
  position: sticky;
  top: 92px;
}

.big-search {
  margin-top: 24px;
}

.big-search input {
  width: min(420px, 100%);
  height: 48px;
}

.big-search button {
  height: 48px;
  padding: 0 22px;
}

.quick-tags {
  margin-top: 18px;
}

.quick-tags a {
  color: #9a3412;
  background: #ffedd5;
}

.rank-list,
.mini-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, border 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: #fdba74;
}

.compact-card img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #fed7aa;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-no {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-size: 13px;
  font-weight: 900;
}

.sub-hero {
  min-height: 310px;
  display: grid;
  place-items: center;
  padding: 54px 18px;
  text-align: center;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.35), transparent 28%), linear-gradient(135deg, #111827, #7c2d12 72%, #f97316);
}

.sub-hero p {
  max-width: 720px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  font-size: 18px;
}

.sub-hero .section-kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.category-hero.purple {
  background: linear-gradient(135deg, #2e1065, #7e22ce, #f97316);
}

.category-hero.blue {
  background: linear-gradient(135deg, #0f172a, #1d4ed8, #f97316);
}

.category-hero.emerald {
  background: linear-gradient(135deg, #064e3b, #059669, #f59e0b);
}

.category-hero.slate {
  background: linear-gradient(135deg, #020617, #334155, #f97316);
}

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

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

.category-overview-head {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input {
  width: min(420px, 100%);
  height: 46px;
}

.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

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

.breadcrumb a {
  color: var(--orange);
  font-weight: 800;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  padding: 12px;
  background: #0f172a;
}

.movie-player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.76));
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 20px 48px rgba(234, 88, 12, 0.35);
  transform: translate(-50%, -50%);
  font-size: 34px;
  padding-left: 5px;
}

.movie-player-wrap.is-playing .player-cover {
  display: none;
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin-top: 0;
}

.detail-pills {
  margin: 18px 0 28px;
}

.detail-pills span,
.detail-tags span {
  color: #475569;
  background: #f1f5f9;
}

.detail-card h2 {
  margin: 26px 0 12px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  color: #334155;
  line-height: 1.85;
  font-size: 16px;
}

.lead-text {
  color: var(--orange) !important;
  font-weight: 800;
}

.detail-tags {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-section {
  padding-top: 16px;
}

.detail-side {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 92px;
}

.side-poster {
  padding: 12px;
}

.side-poster img {
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: #fed7aa;
}

.primary-btn.full {
  width: 100%;
  margin-top: 14px;
}

.side-panel {
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

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

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-weight: 800;
}

.hidden-card {
  display: none;
}

.no-results {
  padding: 44px;
  border: 1px dashed #fdba74;
  border-radius: var(--radius);
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .split-section,
  .ranking-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
    height: 64px;
  }

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

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-tags span {
    font-size: 12px;
  }

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

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

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

  .card-body {
    padding: 13px;
  }

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

  .card-body p {
    min-height: 54px;
    font-size: 13px;
  }

  .sub-hero {
    min-height: 260px;
  }

  .detail-card {
    padding: 22px;
  }

  .play-circle {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .category-overview-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-row .movie-card {
    flex-basis: 260px;
  }

  .hero-actions,
  .big-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .big-search input,
  .mobile-search input,
  .big-search button,
  .mobile-search button {
    width: 100%;
  }

  .compact-card {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }
}
