:root {
  --bg: #050506;
  --bg-soft: #0b0b0e;
  --panel: #111116;
  --panel-2: #171820;
  --panel-3: #20222d;
  --card: #101014;
  --card-hover: #181820;
  --text: #f8fafc;
  --muted: #9ca8b8;
  --faint: #667286;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(255, 184, 77, 0.34);
  --gold: #ffd166;
  --orange: #ff8a00;
  --rose: #ff2e63;
  --cyan: #2dd4bf;
  --danger: #ff6575;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Premium responsive refresh */
:root {
  color-scheme: dark;
  --bg: #07080c;
  --panel: #11141b;
  --panel-2: #171b24;
  --text: #f7f8fb;
  --muted: #aeb6c5;
  --line: rgba(255,255,255,.09);
  --accent: #ff8a00;
  --accent-2: #ff2f68;
  --shadow: 0 18px 55px rgba(0,0,0,.45);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #edf0f6;
  --text: #151821;
  --muted: #5e6878;
  --line: rgba(15,20,30,.12);
  --accent: #ff7a00;
  --accent-2: #d71955;
  --shadow: 0 16px 40px rgba(15,20,30,.12);
}

html, body {
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.topbar {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: 0;
}

.brand-logo {
  filter: drop-shadow(0 8px 20px rgba(255, 90, 0, .2));
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.theme-toggle span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent) 50%, var(--text) 50%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact {
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.content {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 16%, transparent), transparent 30vw),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 32vw),
    var(--bg);
}

.category-rail {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.chip, .nav-item, .ghost-btn, .link-btn {
  border-color: var(--line);
}

.primary-btn,
.search button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: 0;
}

.section {
  margin-block: 22px;
}

.section-head h2,
.page-title h1,
.video-detail h1,
.account-head h1 {
  letter-spacing: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.video-card,
.category-card,
.premium-tile,
.form-card,
.table-card,
.dashboard-card,
.user-card,
.approval-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.video-card {
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--panel-2);
}

.thumb {
  aspect-ratio: 16 / 9;
  background: #050609;
}

.thumb img,
.category-card img,
.premium-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  padding: 10px;
  gap: 8px;
}

.video-title {
  font-size: 15px;
  line-height: 1.3;
}

.like-count,
.tag-badge,
.status-pill {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
}

.uploader-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.category-card {
  min-height: 124px;
  overflow: hidden;
}

.category-card span {
  font-size: 17px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.video-detail,
.player-sidebar {
  min-width: 0;
}

.player-box {
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.player-box video,
.player-box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.ad-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, max-content));
  gap: 12px;
  align-items: center;
  overflow: hidden;
}

.ad-mini-card,
.watch-ad-card,
.pause-ad-card {
  max-width: 100%;
  overflow: hidden;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.user-card {
  padding: 16px;
  display: grid;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 62vh;
}

.auth-card {
  width: min(460px, 100%);
}

.account-head {
  padding: 18px 0;
}

.approval-card {
  padding: 14px;
  margin-top: 16px;
}

.approval-player video,
.approval-player iframe {
  width: 100%;
  max-height: 360px;
  background: #000;
}

.status-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.pending {
  background: rgba(255, 186, 73, .15);
}

.status-pill.rejected {
  background: rgba(255, 47, 104, .15);
}

.external-player {
  position: relative;
  display: grid;
  min-height: 320px;
  overflow: hidden;
  background: #000;
  color: #fff;
  text-decoration: none;
  place-items: center;
}

.external-player img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
}

.external-player strong,
.external-player small {
  position: relative;
  z-index: 1;
}

.external-player small {
  max-width: 360px;
  text-align: center;
  color: rgba(255,255,255,.76);
}

.fetch-pill.ok {
  color: #38d996;
  border-color: rgba(56,217,150,.45);
}

.fetch-pill.bad {
  color: #ff6a7a;
  border-color: rgba(255,106,122,.45);
}

.tag-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.tag-chip-list button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 0;
  padding: 7px 9px;
  cursor: pointer;
}

.upload-progress {
  position: relative;
  height: 28px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
  margin: 12px 0;
}

.upload-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .15s ease;
}

.upload-progress strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: #fff;
  font-size: 12px;
}

.pause-related-grid {
  width: min(720px, 94%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pause-related-grid .video-card {
  background: rgba(20,20,24,.94);
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 42px minmax(110px, 1fr) 42px;
  }

  .search {
    grid-column: 1 / -1;
    order: 5;
  }

  .member-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .member-actions .ghost-btn,
  .member-actions .primary-btn {
    flex: 1;
    justify-content: center;
  }

  .player-layout {
    display: block;
  }

  .player-sidebar {
    margin-top: 18px;
  }

  .watch-ad-section {
    display: none;
  }
}

@media (max-width: 620px) {
  .content {
    padding-inline: 10px;
  }

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

  .video-title {
    font-size: 13px;
  }

  .video-info {
    display: block;
    padding: 8px;
  }

  .like-count {
    margin-top: 7px;
    display: inline-flex;
    font-size: 12px;
  }

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

  .category-card {
    min-height: 94px;
  }

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

  .ad-strip {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .data-table {
    min-width: 720px;
  }

  .table-card {
    overflow-x: auto;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 46, 99, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(255, 209, 102, 0.14), transparent 32%),
    linear-gradient(180deg, #0d0d12 0, #050506 380px);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 46px 230px minmax(240px, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 12px 28px;
  background: rgba(5, 7, 11, 0.82);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px);
}

.admin-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.icon-btn {
  display: grid;
  gap: 5px;
  align-content: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel-2), #0b0f16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.icon-btn span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--orange) 42%, var(--rose));
  color: #08090d;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(255, 122, 24, 0.28);
}

.brand-logo {
  width: 176px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.brand-accent {
  color: var(--gold);
}

.search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 20, 29, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.search input,
.search button {
  min-width: 0;
  border: 0;
  color: var(--text);
}

.search input {
  padding: 14px 18px;
  background: transparent;
  outline: none;
}

.search input::placeholder {
  color: #778397;
}

.search button {
  background: linear-gradient(135deg, var(--panel-3), #202b3b);
  color: var(--gold);
  font-weight: 900;
}

.primary-btn,
.ghost-btn,
.link-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  padding: 10px 15px;
  font-weight: 900;
  text-decoration: none;
  line-height: 1;
}

.primary-btn {
  border: 0;
  background: linear-gradient(135deg, var(--gold), var(--orange) 48%, var(--rose));
  color: #08090d;
  box-shadow: 0 14px 34px rgba(255, 122, 24, 0.28);
}

.notify-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
}

.notify-modal[hidden] {
  display: none;
}

.notify-card {
  position: relative;
  width: min(94vw, 460px);
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 10px;
  padding: 22px 22px 20px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
  color: #202124;
}

.notify-card img {
  width: min(260px, 86%);
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.notify-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.notify-card p {
  margin: 0;
  color: #5f6368;
  line-height: 1.55;
}

.notify-status {
  min-height: 18px;
  margin-top: 10px !important;
  color: #b42318 !important;
  font-size: 13px;
}

.notify-card.saving .primary-btn {
  opacity: 0.72;
  pointer-events: none;
}

.notify-x {
  position: absolute;
  right: 10px;
  top: 8px;
  border: 0;
  background: transparent;
  color: #5f6368;
  font-size: 22px;
  line-height: 1;
}

.notify-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.ghost-btn,
.link-btn {
  border: 1px solid var(--line);
  background: rgba(16, 22, 32, 0.86);
  color: var(--text);
}

.danger-btn {
  border: 1px solid rgba(255, 101, 117, 0.45);
  background: rgba(255, 101, 117, 0.13);
  color: #ffd0d6;
}

.sidebar {
  position: fixed;
  top: 76px;
  bottom: 0;
  left: 0;
  z-index: 40;
  width: 280px;
  padding: 16px 12px;
  overflow-y: auto;
  background: rgba(7, 10, 15, 0.98);
  border-right: 1px solid var(--line);
  box-shadow: 28px 0 80px rgba(0, 0, 0, 0.45);
  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.sidebar.open {
  transform: translateX(0);
}

.nav-item {
  display: flex;
  width: 100%;
  margin-bottom: 7px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--text);
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(255, 184, 77, 0.1), rgba(255, 53, 106, 0.07));
}

.content {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 104px 28px 54px;
}

.admin-content {
  max-width: 1440px;
}

.chips,
.category-rail {
  position: sticky;
  top: 76px;
  z-index: 20;
  display: flex;
  gap: 10px;
  margin: -6px 0 24px;
  padding: 0 0 14px;
  overflow-x: auto;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.95), rgba(8, 9, 13, 0.92));
  scrollbar-width: none;
}

.chips::-webkit-scrollbar,
.category-rail::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(16, 22, 32, 0.86);
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 184, 77, 0.09);
}

.premium-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.category-card {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.82));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.category-card:hover img {
  transform: scale(1.04);
}

.category-card span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  font-size: 19px;
  font-weight: 950;
}

.premium-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.premium-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 22%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.9)),
    linear-gradient(90deg, rgba(255, 184, 77, 0.14), transparent 50%);
}

.premium-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: transform 220ms ease, opacity 220ms ease;
}

.premium-tile:hover img {
  opacity: 0.95;
  transform: scale(1.045);
}

.premium-tile div {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 20px;
}

.premium-tile h3 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.2px;
}

.section {
  margin: 0 0 38px;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.muted,
.video-meta {
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.video-card {
  min-width: 0;
  border-radius: 16px;
  transition: transform 180ms ease;
}

.video-card:hover {
  transform: translateY(-3px);
}

.thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #030509;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.34));
  opacity: 0;
  transition: opacity 180ms ease;
}

.thumb:hover::after {
  opacity: 1;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 190ms ease;
}

.thumb:hover img {
  transform: scale(1.035);
}

.play-badge,
.tag-badge {
  position: absolute;
  z-index: 2;
  border-radius: 9px;
  font-weight: 950;
}

.play-badge {
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 66px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold), var(--orange), var(--rose));
  color: #08090d;
  transform: translate(-50%, -50%);
  font-size: 12px;
  box-shadow: 0 14px 32px rgba(255, 53, 106, 0.28);
}

.tag-badge {
  left: 9px;
  top: 9px;
  padding: 5px 8px;
  background: rgba(5, 7, 11, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.video-info {
  display: flex;
  gap: 8px;
  align-items: start;
  justify-content: space-between;
  padding: 10px 3px 0;
}

.video-title {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.video-meta {
  margin: 0;
  font-size: 13px;
}

.like-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(255, 184, 77, 0.28);
  border-radius: 999px;
  background: rgba(255, 184, 77, 0.1);
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
}

.banner {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 290px;
  margin-bottom: 24px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
}

.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.banner div {
  position: relative;
  z-index: 1;
}

.banner h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
}

.player-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow);
}

.pause-ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.pause-ad-overlay.show {
  display: grid;
}

.pause-ad-card {
  display: block;
  width: min(92%, 520px);
  max-height: 90%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.pause-ad-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pause-ad-card span {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-weight: 850;
}

.pause-ad-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 9;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(16, 22, 32, 0.88);
  color: var(--text);
  font-weight: 900;
}

.player-box video,
.player-box iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.player-message {
  display: grid;
  place-items: center;
  min-height: min(56vw, 520px);
  padding: 28px;
  background: #05070b;
  text-align: center;
}

.video-detail h1 {
  margin: 18px 0 8px;
  font-size: clamp(24px, 3vw, 38px);
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip.small {
  padding: 7px 10px;
  font-size: 12px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.ad-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 34px;
}

.ad-card,
.watch-ad-card,
.ad-mini-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.ad-card img,
.watch-ad-card img,
.ad-mini-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ad-card span,
.watch-ad-card span,
.ad-mini-card span {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-weight: 850;
}

.ad-code {
  padding: 10px;
}

.ad-code iframe,
.ad-code img,
.ad-code video {
  max-width: 100%;
  border: 0;
  border-radius: 12px;
}

.ad-hidden-code {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.ad-execute-section {
  display: grid;
  gap: 16px;
  margin: 18px 0 30px;
}

.ad-execute-card {
  display: block;
  width: 100%;
  min-height: 90px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(16, 22, 32, 0.62);
  color: var(--text);
  text-decoration: none;
}

.ad-execute-card.ad-code {
  padding: 14px;
}

.ad-execute-card iframe,
.ad-execute-card img,
.ad-execute-card video,
.ad-execute-card ins {
  max-width: 100%;
}

.ad-script-runner {
  display: contents;
}

.ad-script-runner.ad-code {
  padding: 0;
  border: 0;
  background: transparent;
}

.side-menu-ad {
  margin-top: 14px;
}

.side-menu-ad img {
  aspect-ratio: 300 / 250;
}

.ad-code iframe {
  width: 100%;
  min-height: 220px;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 7, 11, 0.96);
}

.age-gate[hidden] {
  display: none;
}

.age-card {
  width: min(100%, 520px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.age-badge {
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin-bottom: 16px;
  background: var(--rose);
  font-size: 24px;
  font-weight: 950;
}

.age-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.admin-tabs,
.form-card,
.table-card,
.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 22, 32, 0.92);
  padding: 18px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.24);
}

.admin-tab {
  display: block;
  margin-bottom: 8px;
  padding: 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 850;
}

.admin-tab:hover {
  background: var(--panel-2);
  color: var(--text);
}

.admin-panel {
  display: grid;
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1018;
  color: var(--text);
  padding: 12px;
  outline: none;
}

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

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-row label {
  display: inline-flex;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: #0b1018;
  color: var(--muted);
  font-weight: 800;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

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

.stat {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1018;
}

.stat strong {
  display: block;
  font-size: 26px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
}

.fetch-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fetch-preview {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1018;
  padding: 10px;
}

.fetch-preview img {
  width: 160px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
  background: #05070b;
}

.error-box {
  padding: 12px;
  border: 1px solid rgba(255, 101, 117, 0.45);
  border-radius: 12px;
  background: rgba(255, 101, 117, 0.12);
  color: #ffd4d4;
}

.success-box {
  padding: 12px;
  border: 1px solid rgba(56, 214, 199, 0.4);
  border-radius: 12px;
  background: rgba(56, 214, 199, 0.12);
  color: #bcfff8;
}

.seo-preview {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1018;
}

.seo-preview h3 {
  margin: 4px 0;
  color: #8ab4f8;
  font-size: 20px;
  font-weight: 500;
}

.seo-preview span {
  color: #7ddc98;
  font-size: 13px;
}

.seo-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 28px 42px;
  color: var(--faint);
  font-size: 13px;
}

.empty-state {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 46px 1fr;
    min-height: 124px;
    padding: 10px 14px;
  }

  .search {
    grid-column: 1 / -1;
  }


  .sidebar {
    top: 124px;
    width: min(84vw, 320px);
  }

  .content {
    padding: 148px 14px 36px;
  }

  .chips,
  .category-rail {
    top: 124px;
  }

  .premium-strip,
  .admin-layout,
  .ad-strip {
    grid-template-columns: 1fr;
  }

  .premium-tile {
    min-height: 170px;
  }

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

@media (max-width: 620px) {
  .brand {
    font-size: 20px;
  }

  .brand-logo {
    width: 140px;
    height: 38px;
  }

  .brand-mark {
    width: 48px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head h2,
  .page-title h1 {
    font-size: 24px;
  }

  .video-grid,
  .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .category-card {
    min-height: 112px;
  }

  .video-title {
    font-size: 13px;
  }

  .video-meta {
    font-size: 12px;
  }

  .play-badge {
    width: 48px;
    height: 34px;
    font-size: 10px;
  }

  .tag-badge {
    font-size: 10px;
  }

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

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .fetch-preview {
    grid-template-columns: 1fr;
  }

  .fetch-preview img {
    width: 100%;
  }
}

/* Final compact tube polish */
body {
  background:
    linear-gradient(180deg, #0c0d11 0, #07070a 300px),
    linear-gradient(135deg, rgba(255, 42, 96, 0.12), transparent 42%),
    #07070a;
}

body::before {
  opacity: 0.32;
}

.topbar {
  background: rgba(10, 10, 13, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(17, 17, 22, 0.98), rgba(10, 10, 13, 0.98));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 20px 0 48px rgba(0, 0, 0, 0.38);
}

.nav-item {
  margin-bottom: 6px;
  padding: 11px 12px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: #d8dee8;
}

.nav-item:hover {
  border-color: rgba(255, 209, 102, 0.35);
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.16), rgba(255, 46, 99, 0.1));
}

.category-rail {
  top: 76px;
  margin: -10px -28px 22px;
  padding: 10px 28px 12px;
  background: rgba(7, 7, 10, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

.chip {
  padding: 8px 13px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: #d9e0ea;
  font-size: 13px;
}

.chip:hover {
  background: rgba(255, 138, 0, 0.14);
}

.premium-strip {
  gap: 14px;
  margin-bottom: 26px;
}

.premium-tile {
  min-height: 156px;
  border-radius: 14px;
}

.premium-tile div {
  padding: 16px;
}

.premium-tile h3 {
  font-size: 22px;
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.category-card {
  min-height: 92px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.category-card::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.76));
}

.category-card span {
  left: 11px;
  right: 11px;
  bottom: 9px;
  font-size: 15px;
  line-height: 1.1;
}

.section {
  margin-bottom: 32px;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2,
.page-title h1 {
  font-size: 26px;
}

.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.thumb,
.ad-card,
.watch-ad-card,
.ad-mini-card {
  border-radius: 12px;
}

.ad-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0 28px;
}

.ad-mini-card img {
  aspect-ratio: 21 / 8;
}

.ad-mini-card span {
  padding: 8px 10px;
  font-size: 12px;
}

.watch-ad-card img,
.ad-card img {
  aspect-ratio: 16 / 7;
}

@media (max-width: 980px) {
  .category-rail {
    top: 124px;
    margin: -12px -14px 18px;
    padding: 9px 14px 11px;
  }

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

  .premium-tile {
    min-height: 116px;
  }

  .premium-tile h3 {
    font-size: 16px;
  }

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

@media (max-width: 620px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .premium-tile {
    min-height: 84px;
    border-radius: 10px;
  }

  .premium-tile div {
    padding: 9px;
  }

  .premium-tile h3 {
    font-size: 13px;
  }

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

  .category-card {
    min-height: 74px;
    border-radius: 10px;
  }

  .category-card span {
    font-size: 12px;
  }

  .video-grid,
  .related-list {
    gap: 10px;
  }

  .ad-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

/* Final responsive fixes */
.topbar {
  grid-template-columns: 46px minmax(156px, 230px) minmax(220px, 1fr);
}

.brand {
  max-width: 100%;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 210px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.player-box {
  width: 100%;
}

.player-box video,
.player-box iframe {
  min-height: 240px;
  max-height: 78vh;
  object-fit: contain;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .brand-logo {
    max-width: 188px;
    height: 44px;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 112px;
    gap: 8px;
  }

  .brand-logo {
    max-width: 156px;
    height: 38px;
  }

  .sidebar {
    top: 112px;
  }

  .content {
    padding-top: 134px;
  }

  .category-rail {
    top: 112px;
  }

  .search {
    grid-template-columns: minmax(0, 1fr) 82px;
    border-radius: 12px;
  }

  .search input {
    padding: 11px 12px;
  }

  .search button {
    font-size: 13px;
  }

  .player-box video,
  .player-box iframe {
    min-height: 190px;
  }

  .notify-card {
    width: min(94vw, 390px);
    padding: 20px 16px 18px;
  }

  .notify-card img {
    width: min(220px, 82%);
    height: 54px;
  }
}

/* Final premium locks */
html[data-theme="light"] body,
html[data-theme="light"] .content {
  background: #f6f7fb;
  color: #151821;
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .sidebar,
html[data-theme="light"] .video-card,
html[data-theme="light"] .category-card,
html[data-theme="light"] .premium-tile,
html[data-theme="light"] .form-card,
html[data-theme="light"] .table-card,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .user-card,
html[data-theme="light"] .approval-card {
  background: #ffffff;
  color: #151821;
  border-color: rgba(15,20,30,.12);
}

.theme-toggle {
  flex: 0 0 42px;
}

.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.category-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.thumb,
.player-box video,
.player-box iframe {
  aspect-ratio: 16 / 9;
}

.thumb img,
.category-card img,
.premium-tile img {
  object-fit: cover;
}

.player-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

@media (max-width: 980px) {
  .player-layout {
    display: block;
  }
}

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

  .watch-ad-section {
    display: none;
  }
}

/* Tight tube grid, sharp and compact */
.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 3px;
}

.video-card {
  border-radius: 0;
  border-color: #000;
  background: #222;
}

.video-card:hover {
  transform: none;
}

.thumb {
  aspect-ratio: 4 / 3;
}

.play-badge {
  border-radius: 0;
  padding: 3px 7px;
  font-size: 11px;
}

.video-info {
  padding: 4px 5px 6px;
}

.video-title {
  font-size: 12px;
  line-height: 1.08;
  max-height: 26px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 11px;
  line-height: 1.1;
}

@media (min-width: 1220px) {
  .video-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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

  .video-info {
    padding: 4px;
  }

  .video-title {
    font-size: 11px;
    max-height: 24px;
  }

  .video-meta {
    font-size: 10px;
  }
}

/* Header/menu visibility locks */
.topbar {
  min-height: 64px;
  z-index: 80;
}

.category-rail {
  position: sticky;
  top: 64px;
  z-index: 60;
  min-height: 42px;
  overflow-x: auto;
}

.content {
  padding-top: 76px;
}

.sidebar {
  z-index: 90;
}

.external-player strong,
.external-player small {
  display: none;
}

.external-player {
  min-height: 0;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.external-player img {
  opacity: .72;
}

@media (max-width: 980px) {
  .topbar {
    min-height: 106px;
  }

  .category-rail {
    top: 106px;
  }

  .content {
    padding-top: 130px;
  }
}

/* THE FINAL CODE visual locks */
:root {
  --accent: #ff3155;
  --accent-2: #8f5cff;
}

.topbar {
  display: grid;
  grid-template-columns: 42px minmax(120px, 170px) minmax(220px, 1fr) 42px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}

.brand {
  height: 40px;
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  max-width: 160px;
  height: 36px;
  object-fit: contain;
}

.search {
  min-width: 0;
}

.member-actions {
  flex-wrap: nowrap;
}

.account-pill {
  gap: 7px;
}

.account-icon {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}

.category-rail {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
}

.category-rail .chip {
  border-radius: 0;
  min-height: 30px;
  padding: 7px 12px;
  white-space: nowrap;
}

.play-badge {
  display: none;
}

.video-card {
  box-shadow: none;
}

.video-card .thumb {
  border-radius: 0;
}

.video-card .thumb img {
  transition: filter .16s ease;
}

.video-card:hover .thumb img {
  filter: brightness(1.08);
}

.video-detail h1 {
  max-width: 980px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
}

.player-layout .ad-strip,
.video-detail .ad-strip {
  margin: 16px 0;
}

.auth-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.auth-cats span {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-cats a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.auth-cats a:hover {
  border-color: rgba(255,49,85,.55);
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    min-height: 118px;
  }

  .brand {
    justify-self: start;
  }

  .theme-toggle {
    justify-self: end;
  }

  .search {
    grid-column: 1 / -1;
    order: 4;
  }

  .member-actions {
    grid-column: 1 / -1;
    order: 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-rail {
    top: 118px;
  }

  .content {
    padding-top: 146px;
  }
}

/* September 2026 final black, white and red UI. This block intentionally wins over older theme rules. */
:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0a0a0a;
  --panel: #0d0d0d;
  --panel-2: #151515;
  --panel-3: #202020;
  --card: #101010;
  --card-hover: #171717;
  --text: #ffffff;
  --muted: #a8a8a8;
  --faint: #747474;
  --line: #292929;
  --line-strong: #d71935;
  --gold: #ffffff;
  --orange: #d71935;
  --rose: #d71935;
  --accent: #d71935;
  --accent-2: #9f1026;
  --shadow: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f4;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f0f0;
  --panel-3: #e4e4e4;
  --card: #ffffff;
  --card-hover: #f8f8f8;
  --text: #111111;
  --muted: #5f5f5f;
  --faint: #767676;
  --line: #d6d6d6;
  --line-strong: #d71935;
  --gold: #111111;
}

html, body, body::before, .content {
  background: var(--bg);
}

body {
  background: var(--bg) !important;
  color: var(--text);
}

body::before {
  display: none;
}

.content {
  background: var(--bg) !important;
}

.topbar,
.sidebar,
.category-rail,
.site-footer {
  background: #080808 !important;
  border-color: var(--line);
  box-shadow: none;
}

.topbar {
  min-height: 64px;
}

.brand-logo {
  filter: none;
}

.primary-btn,
.search button {
  background: #d71935 !important;
  color: #ffffff !important;
  box-shadow: none;
}

.ghost-btn,
.link-btn,
.icon-btn,
.theme-toggle,
.search,
.chip,
.nav-item {
  border-radius: 0;
  background: #111111;
  color: var(--text);
}

.icon-btn,
.theme-toggle {
  border-color: var(--line);
}

.category-rail .chip {
  border-radius: 0;
  background: #111111;
  color: #ffffff;
}

.category-rail .chip:hover,
.nav-item:hover,
.ghost-btn:hover,
.link-btn:hover {
  background: #1b1b1b;
  border-color: #d71935;
  color: #ffffff;
}

.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 5px;
}

.video-card {
  border: 1px solid #262626;
  border-radius: 0;
  background: #101010;
  box-shadow: none;
}

.video-card:hover {
  border-color: #d71935;
  background: #101010;
  transform: none;
}

.thumb,
.video-card .thumb {
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #000000;
}

.video-info {
  min-height: 43px;
  padding: 5px 6px 6px;
}

.video-title {
  margin: 0 0 3px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.video-meta {
  color: #b5b5b5;
  font-size: 11px;
}

.like-count,
.video-card .like-count {
  display: none;
}

.player-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
  align-items: start;
}

.player-box {
  border: 1px solid #252525;
  border-radius: 0;
  background: #000000;
  box-shadow: none;
}

.player-box video,
.player-box iframe,
.external-player {
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #000000;
}

.external-player img {
  opacity: 1;
}

.player-sidebar,
.player-side-ads {
  min-width: 0;
}

.player-side-ads .ad-strip {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.ad-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  overflow: visible;
}

.ad-card,
.watch-ad-card,
.ad-mini-card,
.pause-ad-card {
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ad-card img,
.watch-ad-card img,
.ad-mini-card img,
.pause-ad-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.ad-card span,
.watch-ad-card span,
.ad-mini-card span,
.pause-ad-card span {
  display: none;
}

.ad-code {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.ad-code iframe,
.ad-code img,
.ad-code video,
.ad-code ins,
.ad-code > div {
  display: block;
  max-width: 100% !important;
  margin-inline: auto;
  border: 0;
}

.pause-ad-overlay {
  padding: 28px 14px 14px;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: none;
}

.pause-ad-close {
  right: 8px;
  top: 8px;
  border: 1px solid #3a3a3a;
  border-radius: 0;
  background: #111111;
  color: #ffffff;
}

.pause-thumb-grid {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pause-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #333333;
  background: #000000;
}

.pause-thumb:hover {
  border-color: #d71935;
}

.pause-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-card,
.table-card,
.dashboard-card,
.approval-card,
.user-card,
.admin-tabs {
  border-radius: 0;
  background: var(--panel);
  border-color: var(--line);
  box-shadow: none;
}

.field input,
.field select,
.field textarea,
.check-row label {
  border-radius: 0;
  border-color: var(--line);
  background: #101010;
  color: #ffffff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #d71935;
  box-shadow: 0 0 0 2px rgba(215, 25, 53, .15);
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .sidebar,
:root[data-theme="light"] .category-rail,
:root[data-theme="light"] .site-footer,
:root[data-theme="light"] .video-card,
:root[data-theme="light"] .form-card,
:root[data-theme="light"] .table-card,
:root[data-theme="light"] .dashboard-card,
:root[data-theme="light"] .approval-card,
:root[data-theme="light"] .user-card,
:root[data-theme="light"] .admin-tabs {
  background: #ffffff !important;
  color: #111111;
}

:root[data-theme="light"] .video-title,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .nav-item,
:root[data-theme="light"] .ghost-btn,
:root[data-theme="light"] .link-btn,
:root[data-theme="light"] .field label,
:root[data-theme="light"] .data-table th,
:root[data-theme="light"] .data-table td {
  color: #111111;
}

:root[data-theme="light"] .ghost-btn,
:root[data-theme="light"] .link-btn,
:root[data-theme="light"] .icon-btn,
:root[data-theme="light"] .theme-toggle,
:root[data-theme="light"] .search,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .nav-item,
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field select,
:root[data-theme="light"] .field textarea {
  background: #ffffff;
  color: #111111;
}

@media (min-width: 1220px) {
  .video-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .player-layout {
    display: block;
  }

  .player-sidebar {
    margin-top: 12px;
  }

  .player-side-ads .ad-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 112px;
  }

  .content {
    padding: 136px 8px 34px;
  }

  .category-rail {
    top: 112px;
    padding-inline: 8px;
  }

  .sidebar {
    top: 112px;
  }

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

  .video-info {
    min-height: 40px;
    padding: 4px;
  }

  .video-title {
    font-size: 11px;
  }

  .video-meta {
    font-size: 10px;
  }

  .pause-thumb-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .player-side-ads .ad-strip,
  .ad-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

.theme-toggle span {
  background: linear-gradient(90deg, #d71935 50%, #ffffff 50%);
}

.ad-code iframe {
  min-height: 0;
}

.category-admin-thumb {
  display: block;
  width: 84px;
  height: 48px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
}

.home-layout-table {
  margin-top: 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-layout-table input[type="number"] {
  width: 92px;
}

.bulk-lines {
  min-height: 360px !important;
  line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.home-category-section .section-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

@media (max-width: 620px) {
  .category-admin-thumb {
    width: 64px;
    height: 38px;
  }
}

/* Final contrast lock: every visible control stays readable in both themes. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f4;
  --panel: #ffffff;
  --panel-2: #eeeeee;
  --text: #121212;
  --muted: #555555;
  --line: #d7d7d7;
  --accent: #d71935;
  --accent-2: #ef2445;
}

html[data-theme="light"] body,
html[data-theme="light"] .content {
  background: #f4f4f4 !important;
  color: #121212 !important;
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .sidebar,
html[data-theme="light"] .category-rail,
html[data-theme="light"] .site-footer,
html[data-theme="light"] .video-card,
html[data-theme="light"] .category-card,
html[data-theme="light"] .form-card,
html[data-theme="light"] .table-card,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .approval-card,
html[data-theme="light"] .user-card,
html[data-theme="light"] .admin-tabs,
html[data-theme="light"] .stat {
  background: #ffffff !important;
  color: #121212 !important;
  border-color: #d7d7d7 !important;
}

html[data-theme="light"] .stat {
  background: #f0f0f0 !important;
}

html[data-theme="light"] .stat strong,
html[data-theme="light"] .stat span,
html[data-theme="light"] .content h1,
html[data-theme="light"] .content h2,
html[data-theme="light"] .content h3,
html[data-theme="light"] .video-title,
html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td,
html[data-theme="light"] .field label,
html[data-theme="light"] .category-card span {
  color: #121212 !important;
}

html[data-theme="light"] .stat strong {
  color: #bf1430 !important;
}

html[data-theme="light"] .stat span,
html[data-theme="light"] .muted,
html[data-theme="light"] .video-meta,
html[data-theme="light"] .fetch-status,
html[data-theme="light"] .site-footer p,
html[data-theme="light"] .empty-state {
  color: #505050 !important;
}

html[data-theme="light"] .chip,
html[data-theme="light"] .nav-item,
html[data-theme="light"] .admin-tab,
html[data-theme="light"] .ghost-btn,
html[data-theme="light"] .link-btn,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .search,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .tag-chip-list button {
  background: #ffffff !important;
  color: #121212 !important;
  border-color: #cfcfcf !important;
}

html[data-theme="light"] .chip:hover,
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .admin-tab:hover,
html[data-theme="light"] .ghost-btn:hover,
html[data-theme="light"] .link-btn:hover {
  background: #eeeeee !important;
  color: #121212 !important;
}

html[data-theme="light"] .search input,
html[data-theme="light"] .search input::placeholder,
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder {
  color: #555555 !important;
}

html[data-theme="light"] .data-table tr,
html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td {
  border-color: #d7d7d7 !important;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .content {
  background: #080808 !important;
  color: #f5f5f5 !important;
}

html[data-theme="dark"] .stat {
  background: #171717 !important;
  color: #ffffff !important;
  border-color: #303030 !important;
}

html[data-theme="dark"] .stat strong,
html[data-theme="dark"] .stat span,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .admin-tab,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .link-btn,
html[data-theme="dark"] .video-title,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {
  color: #f5f5f5 !important;
}

.header-categories {
  display: inline-flex;
}

.category-directory-link {
  font-weight: 900;
  border-bottom: 1px solid var(--line);
}

.category-directory .category-card {
  min-height: 126px;
}

.ad-strip {
  justify-items: center;
  align-items: start;
}

.ad-strip .ad-code,
.player-side-ads .ad-code,
.side-menu-ad.ad-code {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ad-code iframe,
.ad-code img,
.ad-code video,
.ad-code ins,
.ad-code > div,
.ad-code > a {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

.ad-code iframe,
.ad-code img,
.ad-code video {
  display: block;
  margin-inline: auto;
}

@media (max-width: 980px) {
  .header-categories {
    display: none;
  }
}

/* Admin and account contrast repair for nested panels and checkbox controls. */
html[data-theme="light"] .check-row label,
html[data-theme="light"] .fetch-preview,
html[data-theme="light"] .seo-preview,
html[data-theme="light"] .upload-progress,
html[data-theme="light"] .ad-execute-card {
  background: #f3f3f3 !important;
  color: #121212 !important;
  border-color: #cfcfcf !important;
}

html[data-theme="light"] .check-row label {
  color: #121212 !important;
}

html[data-theme="light"] .fetch-preview p,
html[data-theme="light"] .fetch-preview strong,
html[data-theme="light"] .fetch-preview span,
html[data-theme="light"] .seo-preview p,
html[data-theme="light"] .seo-preview h3,
html[data-theme="light"] .seo-preview span,
html[data-theme="light"] .ad-execute-card,
html[data-theme="light"] .ad-execute-card p,
html[data-theme="light"] .ad-execute-card span {
  color: #121212 !important;
}

html[data-theme="light"] .fetch-preview p,
html[data-theme="light"] .fetch-preview span,
html[data-theme="light"] .seo-preview p {
  color: #505050 !important;
}

html[data-theme="light"] .fetch-preview img {
  background: #dedede !important;
  border-color: #cfcfcf !important;
}

html[data-theme="light"] select option {
  background: #ffffff;
  color: #121212;
}

html[data-theme="light"] .error-box {
  background: #fff0f2 !important;
  color: #8d1024 !important;
  border-color: #d66b7c !important;
}

html[data-theme="light"] .success-box {
  background: #ebfaf4 !important;
  color: #096343 !important;
  border-color: #62b998 !important;
}

html[data-theme="light"] .status-pill.pending {
  color: #765300 !important;
}

html[data-theme="light"] .status-pill.rejected {
  color: #9b1730 !important;
}

html[data-theme="dark"] .check-row label,
html[data-theme="dark"] .fetch-preview,
html[data-theme="dark"] .seo-preview,
html[data-theme="dark"] .upload-progress,
html[data-theme="dark"] .ad-execute-card {
  background: #171717 !important;
  color: #f5f5f5 !important;
  border-color: #343434 !important;
}

html[data-theme="dark"] .fetch-preview p,
html[data-theme="dark"] .fetch-preview strong,
html[data-theme="dark"] .fetch-preview span,
html[data-theme="dark"] .seo-preview p,
html[data-theme="dark"] .seo-preview h3,
html[data-theme="dark"] .seo-preview span,
html[data-theme="dark"] .check-row label {
  color: #f5f5f5 !important;
}

html[data-theme="dark"] select option {
  background: #171717;
  color: #f5f5f5;
}
