:root {
  --bg: #0f1117;
  --bg-soft: #171b25;
  --surface: #1e2431;
  --surface-2: #262d3d;
  --paper: #f3f6fb;
  --text: #f3f6fb;
  --muted: #a3adbf;
  --line: rgba(243, 246, 251, 0.1);
  --accent: #ec4b6c;
  --accent-2: #8ebcff;
  --shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
  --radius: 20px;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="light"] {
  --bg: #eef3fa;
  --bg-soft: #e5ebf5;
  --surface: #ffffff;
  --surface-2: #f3f7fc;
  --paper: #ffffff;
  --text: #141925;
  --muted: #667086;
  --line: rgba(20, 25, 37, 0.1);
  --accent: #cc3354;
  --accent-2: #316fda;
  --shadow: 0 18px 34px rgba(23, 32, 48, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(236, 75, 108, 0.12), transparent 18%),
    radial-gradient(circle at top right, rgba(73, 131, 236, 0.1), transparent 20%),
    linear-gradient(180deg, #0d1016 0%, var(--bg) 22%, var(--bg) 100%);
  font-family: var(--sans);
  line-height: 1.5;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(201, 53, 85, 0.08), transparent 24%),
    linear-gradient(180deg, #f6f9fc 0%, var(--bg) 26%, var(--bg) 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.site-header,
.section,
.footer-main,
.footer-bottom,
.legal-main {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header { padding-top: 18px; }

.utility-row,
.brand-row,
.category-ribbon {
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.utility-row {
  padding: 14px 20px;
  justify-content: space-between;
}

.brand-row {
  margin-top: 14px;
  padding: 22px 24px;
  align-items: end;
}

.category-ribbon {
  margin-top: 14px;
  padding: 12px 16px;
}

.utility-copy,
.brand-deck {
  margin: 0;
  color: var(--muted);
}

.utility-copy {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.06em;
}

.mark-brand > span {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: var(--paper);
  background: linear-gradient(135deg, #ec4b6c, #6b62ff);
  font-size: 18px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 5px;
  max-width: 560px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.search {
  width: 320px;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: #151a24;
}

:root[data-theme="dark"] .search,
html:not([data-theme]) .search {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.search svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  opacity: 0.65;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.search input::placeholder { color: var(--muted); }

.icon-button,
.menu-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.icon-button:hover,
.menu-button:hover,
.nav-link:hover,
.pagination button:hover {
  transform: translateY(-1px);
  border-color: rgba(236, 75, 108, 0.5);
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.menu-button {
  display: none;
  padding: 11px;
  gap: 4px;
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
}

.category-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
}

.category-nav::-webkit-scrollbar { display: none; }

.nav-link {
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.nav-link.active {
  color: #fff;
  border-color: rgba(236, 75, 108, 0.74);
  background: linear-gradient(180deg, rgba(236, 75, 108, 0.96), rgba(145, 54, 169, 0.96));
}

.home-main { padding-bottom: 36px; }
.section { padding: 34px 0 0; }

.lead-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 24px;
}

.lead-panel,
.status-board article,
.featured-card,
.video-card,
.loading-state,
.empty-state,
.ad-shell,
.player-frame,
.related-panel,
.legal-main,
.video-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lead-panel {
  padding: 34px;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    linear-gradient(135deg, rgba(236, 75, 108, 0.22), rgba(30, 34, 48, 0.98) 44%, rgba(15, 17, 23, 1) 100%);
}

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

.lead-panel h1,
.video-details h1,
.legal-main h1 {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 0.94;
}

.lead-panel h1 {
  font-size: clamp(40px, 4.6vw, 72px);
  max-width: 760px;
}

.lead-panel p:last-child {
  margin: 20px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
}

.status-board {
  display: grid;
  gap: 16px;
}

.status-board article {
  padding: 22px;
}

.board-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status-board strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.status-board p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.loading-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 22px;
}

.featured-grid,
.video-grid {
  display: grid;
  gap: 22px;
}

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

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

.featured-card,
.video-card {
  overflow: hidden;
}

.featured-card:hover,
.video-card:hover,
.related-item:hover {
  border-color: rgba(236, 75, 108, 0.42);
}

.video-poster {
  min-height: 200px;
  position: relative;
  overflow: hidden;
  background: #232838;
}

.poster-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.featured-card:hover .poster-image,
.video-card:hover .poster-image,
.related-item:hover .poster-image {
  transform: scale(1.04);
}

.video-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 17, 23, 0.04), rgba(15, 17, 23, 0.82) 86%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%);
}

.tone-rose { background: linear-gradient(140deg, #593448, #222738 65%, #12151e); }
.tone-violet { background: linear-gradient(140deg, #444682, #20253f 65%, #12151d); }
.tone-blue { background: linear-gradient(140deg, #2f5a82, #1e2d44 65%, #111722); }
.tone-amber { background: linear-gradient(140deg, #765147, #31212b 65%, #15121a); }
.tone-coral { background: linear-gradient(140deg, #804452, #2f2331 65%, #14131b); }
.tone-cyan { background: linear-gradient(140deg, #396a7b, #1d3342 65%, #10161d); }

.poster-category {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.duration {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 10, 16, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.large-play,
.card-play,
.small-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(8, 10, 16, 0.55);
  backdrop-filter: blur(8px);
}

.card-play,
.small-play {
  width: 58px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.card-play::after,
.small-play::after,
.large-play::after {
  content: "";
  position: absolute;
  left: 44%;
  top: 34%;
  border-left: 12px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.small-play {
  width: 30px;
}

.small-play::after {
  left: 45%;
  top: 33%;
  border-left-width: 7px;
  border-top-width: 5px;
  border-bottom-width: 5px;
}

.video-card-body {
  padding: 18px;
}

.video-card h3,
.featured-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.video-card p,
.featured-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.ad-shell {
  position: relative;
  margin-top: 38px;
  color: var(--muted);
}

.ad-shell-wide,
.ad-shell-box {
  display: grid;
  place-items: center;
  border-style: dashed;
}

.ad-shell-wide { min-height: 110px; }
.ad-shell-box { min-height: 280px; }

.ad-label {
  position: absolute;
  left: 14px;
  top: 9px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-placeholder {
  padding: 25px;
  text-align: center;
  font-size: 13px;
}

.ad-shell[data-active="true"] {
  border-style: solid;
  background: transparent;
}

.pagination {
  padding: 32px 0 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination button {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.pagination button.active {
  color: #fff;
  border-color: rgba(236, 75, 108, 0.84);
  background: linear-gradient(180deg, #ec4b6c, #9136a9);
}

.pagination .pager-nav {
  color: var(--muted);
}

.pagination .pager-nav.disabled {
  opacity: 0.4;
  cursor: default;
}

.pager-ellipsis {
  color: var(--muted);
  font-size: 14px;
  padding: 0 4px;
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
  border-style: dashed;
}

.empty-state h3 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.empty-state p { color: var(--muted); }

.compact-header { padding-top: 20px; }

.compact-header .utility-row {
  justify-content: space-between;
}

.minimal-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  color: var(--muted);
}

.minimal-nav a:hover { color: var(--text); }

.player-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  padding-top: 34px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
}

.back-link:hover { color: var(--accent-2); }

.player-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050404;
}

.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, #39486e, #0a0d14 60%);
}

.player-placeholder .large-play {
  width: 76px;
  aspect-ratio: 1;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.large-play::after {
  border-left-width: 16px;
  border-top-width: 10px;
  border-bottom-width: 10px;
}

.player-placeholder p {
  max-width: 480px;
  margin: 8px 20px 0;
  color: var(--muted);
}

.video-details {
  margin-top: 24px;
  padding: 28px;
}

.video-details h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 4.2vw, 60px);
}

.video-details > p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
}

.video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-stats span {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-stack {
  display: grid;
  align-content: start;
  gap: 24px;
  padding-top: 42px;
}

.related-panel {
  padding: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px;
  border-radius: 16px;
}

.related-item .video-poster {
  min-height: 76px;
  border-radius: 12px;
}

.related-item .poster-category {
  display: none;
}

.related-item .duration {
  right: 8px;
  bottom: 8px;
  font-size: 10px;
}

.related-item strong,
.related-item span {
  display: block;
}

.related-item strong {
  line-height: 1.2;
  font-size: 17px;
  letter-spacing: -0.04em;
}

.related-item span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  margin-top: 42px;
  padding-bottom: 28px;
}

.footer-main {
  padding: 32px 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 36px;
  border-top: 1px solid var(--line);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.footer-links a:hover,
.text-button:hover {
  color: var(--text);
}

.footer-bottom {
  padding: 18px 0 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.legal-main {
  min-height: 70vh;
  margin-top: 28px;
  padding: 44px;
}

.legal-main h1 {
  margin-bottom: 14px;
  font-size: clamp(40px, 5vw, 64px);
}

.legal-main h2 { margin-top: 34px; }
.legal-main p,
.legal-main li { color: var(--muted); }
.legal-main a { color: var(--accent); }

@media (max-width: 1120px) {
  .featured-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .lead-stage,
  .player-stage {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    padding-top: 0;
  }
}

@media (max-width: 820px) {
  .utility-row,
  .brand-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions,
  .minimal-nav {
    width: 100%;
  }

  .header-actions {
    justify-content: space-between;
  }

  .search {
    width: calc(100% - 56px);
  }

  .menu-button { display: grid; }
}

@media (max-width: 720px) {
  .site-header,
  .section,
  .footer-main,
  .footer-bottom,
  .legal-main {
    width: calc(100% - 24px);
  }

  .category-nav {
    display: none;
    flex-direction: column;
  }

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

  .featured-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-poster {
    min-height: 220px;
  }

  .footer-main,
  .footer-bottom {
    flex-direction: column;
  }

  .video-details {
    padding: 22px;
  }
}
