:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #111;
  --surface-2: #191919;
  --surface-3: #242424;
  --line: #2b2b2b;
  --text: #f5f5f5;
  --muted: #aaa;
  --accent: #ffae16;
  --accent-2: #ff9000;
  --good: #2f9bff;
  --danger: #ff5c5c;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scrollbar-color: #3a3a3a #070707;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  color: inherit;
}

a,
button,
.video-card,
.directory-card,
.info-card,
.category-tabs button,
.content-filter-chip,
.search-term-chip,
.home-pagination__button,
.content-actions button,
.admin-filters button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #0b0b0b;
  border-bottom: 1px solid #191919;
}

.utility-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  gap: clamp(18px, 4vw, 68px);
  padding: 0 20px;
  color: #bdbdbd;
  font-size: 0.76rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.utility-row a:hover {
  color: var(--accent);
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.language-picker select {
  min-height: 24px;
  border: 1px solid #303030;
  border-radius: 999px;
  background: #161616;
  color: #f0f0f0;
  font-size: 0.72rem;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 760px) minmax(180px, 1fr);
  align-items: center;
  width: min(1640px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  gap: 22px;
}

.masthead::after {
  content: "";
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: #202020;
}

.menu-toggle {
  display: none;
  gap: 5px;
  align-content: center;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: max-content;
  color: #fff;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

.brand strong {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-left: 5px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--accent-2);
  color: #080808;
  font-weight: 950;
}

.search-box {
  position: relative;
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-self: center;
  width: 100%;
  min-height: 52px;
  gap: 13px;
  padding: 0 18px;
  border: 1px solid #292929;
  border-radius: 999px;
  background: #262626;
  color: #cfcfcf;
}

.search-box:focus-within,
.search-box.is-search-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 174, 22, 0.14);
}

.search-box svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

.search-box input::placeholder {
  color: #a8a8a8;
}

.search-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 80;
  width: min(100vw - 32px, 760px);
  max-height: min(70vh, 430px);
  overflow-y: auto;
  border: 1px solid #181818;
  border-right: 4px solid var(--accent-2);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px 28px 26px;
  background: rgba(0, 0, 0, 0.96);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
  color: #f4f4f4;
  scrollbar-color: var(--accent-2) #090909;
}

.search-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.1;
}

.search-panel-list {
  display: grid;
  gap: 2px;
}

.search-panel-item {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 4px 0;
  background: transparent;
  color: #e9e9e9;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.3;
  text-align: left;
}

.search-panel-item:hover,
.search-panel-item:focus-visible {
  color: var(--accent);
  outline: 0;
}

.search-panel-empty {
  margin: 0;
  color: var(--muted);
}

.upload-button,
.primary-action,
.ghost-action,
.back-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
  white-space: nowrap;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.upload-button,
.primary-action {
  padding: 0 18px;
  background: var(--accent);
  color: #080808;
}

.upload-button:hover,
.primary-action:hover {
  background: #ffc34d;
  transform: translateY(-1px);
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: min(1640px, calc(100% - 48px));
  min-height: 54px;
  align-items: center;
  margin: 0 auto 10px;
  border: 1px solid #202020;
  border-radius: var(--radius);
  padding: 0 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    #101010;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.main-nav a {
  display: flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f0f0f0;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a.is-active {
  border-color: rgba(255, 174, 22, 0.38);
  background: rgba(255, 174, 22, 0.1);
  color: var(--accent);
}

.mobile-nav-extra {
  display: none;
}

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

.mobile-language-picker {
  display: none;
}

.notice-bar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 18px;
  border-bottom: 1px solid #1d1d1d;
  background: #171717;
  color: #d4d4d4;
  font-size: 0.88rem;
  text-align: center;
}

.notice-bar strong {
  color: var(--accent);
}

.page-shell {
  width: min(1640px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 64px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  width: min(1640px, calc(100% - 48px));
  margin: 0 auto;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 0 36px;
  border-top: 1px solid #1c1c1c;
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  max-width: 520px;
  margin: 6px 0 0;
  line-height: 1.5;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-ad-slot {
  flex: 1 0 100%;
  order: 3;
}

.footer-ad-slot .ad-slot {
  margin: 4px 0 0;
}

.footer-ad-slot:empty {
  display: none;
}

.catalog-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 0 4px;
}

.catalog-hero__text {
  min-width: 0;
}

.catalog-hero h1,
.info-page h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.65rem, 3.2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.catalog-hero p,
.info-page p,
.info-card p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-action,
.back-link {
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #151515;
  color: #f0f0f0;
}

.ghost-action:hover,
.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.eyebrow,
.pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(255, 174, 22, 0.4);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 174, 22, 0.11);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 0 26px;
  padding: 0 0 4px;
  scrollbar-width: none;
}

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

.category-tabs button {
  min-height: 48px;
  flex: 0 0 auto;
  border: 1px solid #2e2e2e;
  border-radius: 999px;
  padding: 0 20px;
  background: #1b1b1d;
  color: #f0f0f0;
  cursor: pointer;
  font-weight: 780;
}

.category-tabs button:hover,
.category-tabs button.is-active {
  border-color: var(--accent);
  background: #2b2418;
  color: var(--accent);
  transform: translateY(-1px);
}

.content-filter-panel,
.search-insights {
  display: grid;
  gap: 12px;
  margin: -8px 0 24px;
  padding: 14px;
  border: 1px solid #242424;
  border-radius: var(--radius);
  background: #111;
}

.content-filter-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.content-filter-head h2 {
  margin: 0;
  font-size: 1rem;
}

.content-filter-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.content-filter-list,
.search-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-filter-chip,
.search-term-chip,
.search-empty-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 0 12px;
  background: #1b1b1b;
  color: #eeeeee;
  font-size: 0.82rem;
  font-weight: 820;
}

.content-filter-chip {
  cursor: pointer;
}

.content-filter-chip:hover,
.content-filter-chip.is-active,
.search-term-chip:hover {
  border-color: rgba(255, 174, 22, 0.55);
  background: rgba(255, 174, 22, 0.1);
  color: var(--accent);
  transform: translateY(-1px);
}

.search-insights {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.search-insight-group {
  min-width: 0;
}

.search-insight-title {
  margin-bottom: 9px;
  color: #f4f4f4;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search-empty-chip {
  color: var(--muted);
  font-weight: 650;
}

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

.section-meta h2 {
  margin: 0;
  font-size: 1.2rem;
}

.section-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.ad-slot {
  display: grid;
  min-height: 88px;
  align-content: center;
  gap: 4px;
  margin: 0 0 22px;
  padding: 16px;
  border: 1px dashed #3a3a3a;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 174, 22, 0.08), transparent),
    #121212;
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ad-slot strong {
  color: var(--text);
}

.ad-slot p {
  margin: 0;
  font-size: 0.84rem;
}

.ad-slot.has-banner {
  padding: 8px;
  border-style: solid;
  background: #090909;
}

.ad-slot__media {
  display: block;
  overflow: hidden;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
  background: #050505;
}

.ad-slot__image {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  background: #050505;
}

.ad-slot__fallback {
  display: grid;
  gap: 4px;
}

.ad-slot.has-banner .ad-slot__fallback {
  display: none;
}

.ad-slot.has-banner.has-banner-error .ad-slot__media {
  display: none;
}

.ad-slot.has-banner.has-banner-error .ad-slot__fallback {
  display: grid;
}

.adblock-probe {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  min-height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.site-access-lock {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
}

.site-access-lock[hidden] {
  display: none;
}

.site-access-lock__panel {
  display: grid;
  width: min(520px, 100%);
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255, 174, 22, 0.38);
  border-radius: var(--radius);
  background: #101010;
  box-shadow: var(--shadow);
}

.site-access-lock__eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-access-lock h2 {
  margin: 0;
  font-size: 1.45rem;
}

.site-access-lock p,
.site-access-lock small,
.site-access-lock__steps {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-access-lock__steps {
  padding-left: 20px;
}

.site-access-lock__steps li + li {
  margin-top: 6px;
}

html.is-adblock-locked,
body.is-adblock-locked {
  overflow: hidden;
}

body.is-age-locked {
  overflow: hidden;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(10px);
}

.age-gate__panel {
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #121212;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
}

.age-gate__panel h2 {
  margin: 8px 0 10px;
  font-size: 1.55rem;
}

.age-gate__panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.age-gate__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.is-adblock-locked .site-header,
body.is-adblock-locked .page-shell,
body.is-adblock-locked .site-footer {
  pointer-events: none;
  user-select: none;
  filter: blur(2px);
}

.top-ad-slot {
  display: grid !important;
  width: 100%;
  min-height: 92px;
  margin: 0 0 18px;
}

.video-grid .ad-slot {
  grid-column: 1 / -1;
  min-height: 96px;
  aspect-ratio: auto;
  margin: 0;
}

.video-grid .ad-slot--in-feed {
  margin: 2px 0 8px;
}

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

.video-card {
  min-width: 0;
  animation: cardIn 360ms ease both;
}

.home-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 0;
}

.home-pagination__slides {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.home-pagination__button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #151515;
  color: #f0f0f0;
  cursor: pointer;
  font-weight: 850;
}

.home-pagination__arrow {
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
  color: #f0f0f0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
}

.home-pagination__button:hover,
.home-pagination__button.is-active,
.home-pagination__arrow:hover {
  border-color: var(--accent);
  background: rgba(255, 174, 22, 0.1);
  color: var(--accent);
}

.home-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.delay-1 {
  animation-delay: 35ms;
}

.delay-2 {
  animation-delay: 70ms;
}

.delay-3 {
  animation-delay: 105ms;
}

.delay-4 {
  animation-delay: 140ms;
}

.delay-5 {
  animation-delay: 175ms;
}

.delay-6 {
  animation-delay: 210ms;
}

.delay-7 {
  animation-delay: 245ms;
}

.delay-8 {
  animation-delay: 280ms;
}

.thumb-link {
  display: block;
}

.thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}

.thumb-video,
.content-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
}

.thumb-video {
  z-index: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.thumb.is-video-ready .thumb-video {
  opacity: 1;
}

.thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #111;
  pointer-events: none;
}

.thumb.is-loading-thumb::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent),
    #111;
  background-size: 220% 100%;
  animation: thumbLoading 1.1s ease-in-out infinite;
}

.thumb.is-video-ready::before {
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, 0.5));
}

.thumb.is-fallback::before {
  background: #111;
}

.thumb::after {
  content: "Memuat";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.42);
  color: #d8d8d8;
  font-size: 0.76rem;
  font-weight: 850;
  transform: translate(-50%, -50%);
}

.thumb.is-video-ready::after {
  display: none;
}

.thumb.is-thumb-error::after {
  content: "Thumbnail belum siap";
}

.tone-amber {
  background: linear-gradient(135deg, #ffb000, #34230d 56%, #0a0a0a);
}

.tone-orange {
  background: linear-gradient(135deg, #e27f00, #343434 50%, #080808);
}

.tone-blue {
  background: linear-gradient(135deg, #009dff, #24313a 54%, #070707);
}

.tone-rose {
  background: linear-gradient(135deg, #ff6f61, #33201f 55%, #090909);
}

.tone-green {
  background: linear-gradient(135deg, #86c927, #25351b 52%, #070707);
}

.tone-violet {
  background: linear-gradient(135deg, #9d4edd, #27213a 52%, #080808);
}

.tone-red {
  background: linear-gradient(135deg, #f43f3f, #3d1919 52%, #070707);
}

.tone-cyan {
  background: linear-gradient(135deg, #2ec4b6, #193231 52%, #070707);
}

.thumb.has-video-source,
.thumb.is-fallback {
  background: #111;
}

@keyframes thumbLoading {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

.duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 0.78rem;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

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

.video-content {
  display: grid;
  gap: 6px;
  padding-top: 8px;
}

.creator-row,
.card-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.creator-row {
  justify-content: space-between;
}

.creator-meta {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.creator-meta span:first-child,
.creator-link {
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.verified {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 999px;
  background: var(--good);
  color: #fff;
  font-size: 0.52rem;
  font-weight: 950;
}

.video-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.62em;
  color: #f4f4f4;
  font-size: 0.96rem;
  font-weight: 780;
  line-height: 1.31;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-title:hover {
  color: var(--accent);
}

.video-view-count {
  flex: 0 0 auto;
  max-width: 86px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.15;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-card-description {
  display: none;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-foot {
  justify-content: space-between;
}

.dots {
  color: #efefef;
  font-weight: 950;
}

.empty-state {
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  color: var(--muted);
  text-align: center;
}

.player-layout,
.info-page {
  display: grid;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid #1d1d1d;
  border-radius: var(--radius);
  background: #000;
  color-scheme: dark;
  isolation: isolate;
  box-shadow: var(--shadow);
}

.player-frame video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000 !important;
  object-fit: contain;
}

.bunny-player {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000 !important;
  color-scheme: dark;
}

.player-frame:fullscreen,
.player-frame:-webkit-full-screen {
  display: flex;
  width: 100vw;
  height: 100vh;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: #000 !important;
  color-scheme: dark;
}

.player-frame:fullscreen video,
.player-frame:fullscreen .bunny-player,
.player-frame:-webkit-full-screen video,
.player-frame:-webkit-full-screen .bunny-player {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.player-watermark {
  position: absolute;
  right: auto;
  bottom: clamp(34px, 7%, 58px);
  left: 50%;
  z-index: 3;
  max-width: min(70vw, 360px);
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  transform: translateX(-50%);
}

.player-watermark.has-image {
  display: block;
  width: min(38vw, 260px);
  max-width: 260px;
  min-width: 120px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0.88;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.75));
}

.player-watermark img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
}

.player-fullscreen-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 30;
  min-width: 50px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.player-frame:fullscreen .player-fullscreen-button,
.player-frame:-webkit-full-screen .player-fullscreen-button {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 2147483647;
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.player-fullscreen-button:hover,
.player-fullscreen-button:focus-visible {
  border-color: rgba(255, 174, 22, 0.65);
  color: var(--accent);
}

.player-status {
  margin: -4px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 174, 22, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 174, 22, 0.08);
  color: #ffd98c;
  line-height: 1.5;
}

.player-detail {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 36px;
}

.player-detail h1 {
  margin: 12px 0 0;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.player-detail p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.report-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.report-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.report-page-form {
  width: min(760px, 100%);
}

.report-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.report-form select,
.report-form input,
.report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f1f1f;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.report-form textarea {
  min-height: 110px;
  resize: vertical;
}

.report-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
}

.player-recommendations {
  display: grid;
  gap: 10px;
  width: min(1640px, 100%);
  margin: 18px auto 0;
}

.recommendation-subtitle {
  max-width: 760px;
  margin: -2px 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.recommendation-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 14px;
  margin-top: 2px;
}

.recommendation-grid .empty-state {
  grid-column: 1 / -1;
}

.recommendation-grid .creator-row,
.recommendation-grid .card-foot {
  font-size: 0.68rem;
}

.recommendation-grid .video-content {
  gap: 5px;
}

.recommendation-grid .video-title {
  order: -1;
}

.recommendation-grid .video-title {
  font-size: 0.82rem;
  line-height: 1.28;
}

.recommendation-actions {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 4px;
}

.recommendation-sentinel {
  width: 1px;
  height: 1px;
}

.recommendation-actions .ghost-action[hidden],
.recommendation-sentinel[hidden] {
  display: none;
}

.video-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
  margin: 0;
}

.video-stats div,
.info-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151515;
}

.video-stats dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.video-stats dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 900;
}

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

.info-head {
  display: grid;
  gap: 12px;
}

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

.directory-card {
  display: grid;
  min-height: 116px;
  align-content: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 174, 22, 0.12), transparent 46%),
    #151515;
}

.directory-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.directory-card strong {
  font-size: 1.1rem;
}

.directory-card span {
  color: var(--muted);
}

.library-page {
  width: min(1280px, 100%);
}

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

.library-meta {
  align-items: flex-start;
  gap: 18px;
}

.library-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.library-meta > span {
  max-width: 420px;
  border: 1px solid rgba(255, 174, 22, 0.26);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 174, 22, 0.08);
  color: #ffd78a;
  line-height: 1.45;
  text-transform: none;
}

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

.library-collection-block,
.library-all-names {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #151515;
}

.library-collection-head {
  display: grid;
  gap: 6px;
}

.library-collection-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.library-collection-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.library-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-name-list--wide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.library-name-pill {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 1px solid #303030;
  border-radius: 999px;
  padding: 9px 12px;
  background: #1d1d1d;
}

.library-name-pill:hover {
  border-color: rgba(255, 174, 22, 0.54);
  color: var(--accent);
}

.library-name-pill strong {
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-name-pill span,
.library-empty {
  color: var(--muted);
  font-size: 0.76rem;
}

.library-page .library-name-pill span {
  display: none;
}

.library-empty {
  margin: 0;
  line-height: 1.5;
}

.not-found-page {
  display: grid;
  width: min(860px, 100%);
  min-height: 420px;
  align-content: center;
  gap: 16px;
  margin: 0 auto;
  text-align: center;
}

.not-found-page h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.not-found-page p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.not-found-page .catalog-hero__actions {
  justify-content: center;
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.admin-body {
  background: #050505;
}

.admin-shell {
  min-height: 100vh;
}

.admin-login {
  display: grid;
  width: min(520px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  place-content: center;
  gap: 18px;
}

.admin-brand {
  justify-self: start;
}

.admin-login h1,
.admin-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.admin-login p,
.admin-header p,
.content-panel__head p,
.content-body p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-message {
  min-height: 20px;
  margin: -8px 0 16px;
  color: #ffd98c;
  font-size: 0.9rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #131313;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #131313;
  box-shadow: var(--shadow);
}

.admin-login .admin-card,
.video-form,
.content-panel,
.category-manager,
.bulk-upload-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-card label {
  display: grid;
  gap: 7px;
  color: #ededed;
  font-size: 0.9rem;
  font-weight: 750;
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
}

.admin-card input,
.admin-card select,
.admin-card textarea,
.content-panel__head input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #303030;
  border-radius: var(--radius);
  padding: 0 12px;
  background: #202020;
  color: #fff;
  outline: 0;
}

.admin-card textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.admin-card input:focus,
.admin-card select:focus,
.admin-card textarea:focus,
.content-panel__head input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 174, 22, 0.12);
}

.admin-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.login-message {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-right: 1px solid #1f1f1f;
  background: #0f0f0f;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-sidebar nav a {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 12px;
  color: #ddd;
  font-weight: 800;
}

.admin-sidebar nav a:hover {
  background: #1f1f1f;
  color: var(--accent);
}

.admin-sidebar nav a.is-active {
  border-color: rgba(255, 174, 22, 0.36);
  background: rgba(255, 174, 22, 0.1);
  color: var(--accent);
}

.admin-sidebar .ghost-action {
  margin-top: auto;
}

.admin-main {
  min-width: 0;
  padding: 24px;
}

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

.admin-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.import-button {
  position: relative;
  overflow: hidden;
}

.import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.video-form h2,
.content-panel h2,
.bulk-upload-panel h2 {
  margin: 0;
}

.anchor-target {
  position: relative;
  top: -20px;
}

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

.form-row--single {
  grid-template-columns: 1fr;
}

.date-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.date-control .ghost-action {
  min-height: 42px;
  padding: 0 14px;
}

.date-control input[readonly] {
  color: #dcdcdc;
}

.date-control input.is-editable {
  border-color: var(--accent);
  color: #fff;
}

.checkbox-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.admin-preview {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

.content-panel__head {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 360px);
  gap: 12px;
  align-items: end;
}

.content-tools {
  display: grid;
  gap: 9px;
}

.category-manager {
  margin-bottom: 18px;
}

.category-editor {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.collection-editor {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.content-panel__head .collection-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-panel__head .collection-editor button {
  grid-column: 1 / -1;
}

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

.category-admin-item {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #252525;
  border-radius: var(--radius);
  background: #181818;
}

.category-admin-item h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-admin-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.category-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.category-admin-actions button {
  min-height: 32px;
  border: 1px solid #343434;
  border-radius: 999px;
  padding: 0 10px;
  background: #202020;
  color: #f0f0f0;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.category-admin-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-admin-actions .danger-button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.report-list,
.system-health-list {
  display: grid;
  gap: 12px;
}

.report-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.report-item__body {
  display: grid;
  gap: 7px;
}

.report-item h3 {
  margin: 0;
  font-size: 0.98rem;
}

.report-item p,
.report-item small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

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

.system-health-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.system-health-card span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.system-health-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.bulk-upload-panel {
  margin-bottom: 18px;
}

.bulk-upload-panel textarea {
  min-height: 180px;
  line-height: 1.5;
}

.bunny-url-panel #bunnyUrlHeadersInput {
  min-height: 86px;
}

.bunny-file-panel input[type="file"] {
  min-height: auto;
  padding: 10px 12px;
  line-height: 1.4;
}

.bulk-preview-list {
  display: grid;
  gap: 10px;
}

.bulk-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #252525;
  border-radius: var(--radius);
  background: #181818;
}

.bulk-preview-item h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
}

.bulk-preview-item p,
.bulk-preview-item small {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.bulk-preview-item small {
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.bulk-preview-meta {
  min-width: 120px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: right;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-filters button {
  min-height: 32px;
  border: 1px solid #343434;
  border-radius: 999px;
  padding: 0 10px;
  background: #202020;
  color: #ddd;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-filters button:hover,
.admin-filters button.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.content-list {
  display: grid;
  gap: 10px;
}

.content-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #252525;
  border-radius: var(--radius);
  background: #181818;
}

.content-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #202020;
}

.content-body {
  min-width: 0;
}

.content-body h3 {
  overflow: hidden;
  margin: 0;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-note,
.bulk-preview-note {
  color: #ffb36f;
  overflow-wrap: anywhere;
}

.duplicate-review {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 174, 22, 0.28);
  border-radius: 8px;
  background: rgba(255, 174, 22, 0.06);
  color: var(--text);
  font-size: 0.82rem;
}

.duplicate-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.duplicate-review__actions a,
.duplicate-review__actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #1a1a1a;
  color: var(--text);
  padding: 7px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.duplicate-review__actions a:hover,
.duplicate-review__actions button:hover {
  border-color: rgba(255, 174, 22, 0.5);
  color: var(--accent);
}

.ads-admin-list,
.duplicate-review-list {
  display: grid;
  gap: 12px;
}

.ads-admin-item,
.duplicate-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
}

.ads-admin-item h3,
.duplicate-review-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.duplicate-review-card p,
.duplicate-review-card small {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.status-badge {
  min-width: 78px;
  border: 1px solid rgba(255, 174, 22, 0.45);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
  text-align: center;
}

.status-badge.is-published {
  border-color: rgba(47, 155, 255, 0.46);
  color: #7fc4ff;
}

.status-badge.is-draft {
  border-color: rgba(255, 92, 92, 0.45);
  color: #ff9696;
}

.status-badge.is-default {
  border-color: #3a3a3a;
  color: #aaa;
}

.status-badge.is-override {
  border-color: rgba(255, 174, 22, 0.45);
  color: var(--accent);
}

.content-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.content-actions button {
  min-height: 34px;
  border: 1px solid #343434;
  border-radius: 999px;
  padding: 0 10px;
  background: #202020;
  color: #f0f0f0;
  cursor: pointer;
}

.content-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.content-actions .danger-button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.content-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #343434;
  border-radius: 999px;
  padding: 7px 10px;
  background: #202020;
  color: #f0f0f0;
  font-size: 0.84rem;
  font-weight: 700;
}

.content-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-pagination {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}

.admin-pagination__info {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #101010;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1280px) {
  .masthead {
    grid-template-columns: minmax(150px, 0.8fr) minmax(230px, 1fr) minmax(80px, 0.4fr);
  }

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

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

@media (max-width: 960px) {
  .utility-row {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .masthead {
    grid-template-columns: 44px 1fr 44px;
    justify-content: stretch;
    gap: 12px;
    min-height: auto;
    padding: 12px 0;
  }

  .masthead::after {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .brand {
    justify-self: center;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 46px;
    border-radius: var(--radius);
  }

  .search-panel {
    width: 100%;
    max-height: 58vh;
    padding: 18px 20px 20px;
  }

  .upload-button {
    display: none;
  }

  .main-nav {
    display: none;
    grid-template-columns: 1fr;
    width: min(100% - 24px, 1640px);
    gap: 6px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #202020;
    border-radius: var(--radius);
    background: #101010;
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 14px;
  }

  .mobile-nav-extra {
    display: grid;
    gap: 10px;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #242424;
  }

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

  .mobile-nav-extra a {
    border-color: #252525;
    background: #171717;
    font-size: 0.78rem;
  }

  .mobile-language-picker {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    border: 1px solid #252525;
    border-radius: var(--radius);
    padding: 0 12px;
    background: #171717;
    color: #dcdcdc;
    font-size: 0.82rem;
    font-weight: 850;
  }

  .mobile-language-picker select {
    min-height: 32px;
    border: 1px solid #303030;
    border-radius: 999px;
    background: #101010;
    color: #fff;
  }

  .catalog-hero,
  .player-detail {
    align-items: stretch;
    flex-direction: column;
  }

  .report-item {
    grid-template-columns: 1fr;
  }

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

  .catalog-hero__actions {
    justify-content: flex-start;
  }

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

  .library-summary-grid,
  .library-collection-grid,
  .library-name-list--wide {
    grid-template-columns: 1fr;
  }

  .library-meta {
    display: grid;
  }

  .library-meta > span {
    max-width: none;
  }

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

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

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-header,
  .admin-grid,
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .content-panel__head,
  .category-editor,
  .collection-editor,
  .bulk-preview-item,
  .content-item {
    grid-template-columns: 1fr;
  }

  .bulk-preview-meta {
    min-width: 0;
    text-align: left;
  }

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

  .content-thumb {
    width: min(180px, 100%);
  }
}

@media (min-width: 721px) and (max-width: 960px) {
  .masthead {
    grid-template-columns: minmax(150px, 0.7fr) minmax(260px, 1fr) minmax(80px, 0.3fr);
    gap: 18px;
    min-height: 72px;
    padding: 0;
  }

  .menu-toggle {
    display: none;
  }

  .brand {
    justify-self: start;
  }

  .search-box {
    grid-column: 2;
    grid-row: auto;
    min-height: 50px;
    border-radius: 999px;
  }

  .search-panel {
    width: min(100vw - 48px, 760px);
  }

  .main-nav,
  .main-nav.is-open {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: min(1640px, calc(100% - 48px));
    border-top: 1px solid #202020;
  }

  .main-nav a {
    justify-content: center;
    padding: 0;
  }

  .mobile-nav-extra,
  .mobile-language-picker {
    display: none;
  }
}

@media (max-width: 620px) {
  .system-health-list {
    grid-template-columns: 1fr;
  }

  .utility-row {
    display: none;
  }

  .masthead,
  .page-shell,
  .site-footer {
    width: min(100% - 18px, 1640px);
  }

  .brand {
    font-size: 1.5rem;
  }

  .brand strong {
    min-height: 34px;
    padding: 0 6px;
  }

  .notice-bar {
    justify-content: flex-start;
    text-align: left;
  }

  .page-shell {
    padding-top: 18px;
  }

  .catalog-hero {
    margin-bottom: 12px;
    padding-top: 4px;
  }

  .top-ad-slot {
    min-height: 76px;
    margin-bottom: 14px;
    padding: 12px;
  }

  .top-ad-slot p {
    font-size: 0.74rem;
  }

  .ad-slot.has-banner {
    padding: 6px;
  }

  .ad-slot__image {
    max-height: 86px;
  }

  .site-access-lock {
    padding: 12px;
  }

  .site-access-lock__panel {
    gap: 12px;
    padding: 18px;
  }

  .site-access-lock h2 {
    font-size: 1.18rem;
  }

  .player-watermark {
    top: max(9px, env(safe-area-inset-top));
    bottom: auto;
    right: auto;
    left: 50%;
    max-width: min(48vw, 180px);
    padding: 5px 10px;
    font-size: 0.62rem;
  }

  .player-watermark.has-image {
    width: min(48vw, 180px);
    min-width: 96px;
    max-width: 180px;
    padding: 0;
    opacity: 0.84;
  }

  .player-watermark img {
    max-height: 34px;
  }

  .player-fullscreen-button {
    top: 8px;
    right: 8px;
    min-width: 44px;
    min-height: 30px;
    font-size: 0.64rem;
  }

  .catalog-hero h1 {
    font-size: 1.35rem;
  }

  .catalog-hero p,
  .catalog-hero__actions,
  .creator-row .verified,
  .card-foot {
    display: none;
  }

  .category-tabs {
    gap: 7px;
    margin-bottom: 16px;
  }

  .category-tabs button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.8rem;
  }

  .content-filter-panel,
  .search-insights {
    margin: -2px 0 16px;
    padding: 11px;
  }

  .search-panel {
    top: calc(100% + 6px);
    width: 100%;
    max-height: 62vh;
    padding: 16px;
    border-right-width: 3px;
  }

  .search-panel h2 {
    font-size: 1.12rem;
  }

  .search-panel-item {
    min-height: 33px;
    font-size: 0.92rem;
  }

  .content-filter-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .content-filter-head p {
    display: none;
  }

  .content-filter-list,
  .search-chip-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .content-filter-list::-webkit-scrollbar,
  .search-chip-row::-webkit-scrollbar {
    display: none;
  }

  .content-filter-chip,
  .search-term-chip,
  .search-empty-chip {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .search-insights {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-meta h2 {
    font-size: 1rem;
  }

  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 8px;
  }

  .home-pagination {
    gap: 8px;
    margin-top: 22px;
  }

  .home-pagination__slides {
    order: -1;
    width: 100%;
  }

  .home-pagination__arrow,
  .home-pagination__button {
    min-width: 38px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .player-recommendations {
    gap: 8px;
    margin-top: 10px;
  }

  .player-recommendations .section-meta {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 4px;
  }

  .player-recommendations .section-meta h2 {
    font-size: 1rem;
  }

  .player-recommendations .section-meta span,
  .recommendation-subtitle {
    font-size: 0.78rem;
  }

  .recommendation-subtitle {
    margin: -2px 0 6px;
    line-height: 1.42;
  }

  .recommendation-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .recommendation-grid .video-card {
    display: grid;
    grid-template-columns: minmax(128px, 40%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e1e1e;
  }

  .recommendation-grid .thumb-link {
    min-width: 0;
  }

  .recommendation-grid .video-content {
    min-width: 0;
    gap: 5px;
    padding-top: 0;
  }

  .recommendation-grid .creator-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.66rem;
  }

  .recommendation-grid .creator-meta {
    overflow: hidden;
  }

  .recommendation-grid .video-view-count {
    max-width: 68px;
    font-size: 0.62rem;
  }

  .recommendation-grid .creator-row span:first-child {
    max-width: 100%;
  }

  .recommendation-grid .creator-row span:last-child {
    display: inline;
  }

  .recommendation-grid .card-foot {
    display: flex;
    font-size: 0.64rem;
  }

  .recommendation-grid .video-title {
    min-height: auto;
    font-size: 0.82rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .recommendation-grid .recommendation-card-description {
    display: none;
  }

  .video-grid .ad-slot {
    grid-column: 1 / -1;
    aspect-ratio: auto;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

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

  .thumb::after {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .duration {
    right: 4px;
    bottom: 4px;
    min-height: 18px;
    padding: 1px 4px;
    font-size: 0.62rem;
  }

  .play-badge {
    display: none;
  }

  .video-content {
    gap: 3px;
    padding-top: 5px;
  }

  .creator-row {
    gap: 4px;
    font-size: 0.66rem;
  }

  .creator-meta {
    gap: 4px;
  }

  .video-title {
    min-height: 2.5em;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .video-view-count {
    max-width: 64px;
    font-size: 0.58rem;
  }

  .player-layout {
    gap: 12px;
  }

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

@media (min-width: 480px) and (max-width: 620px) {
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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