/* Video Channel layout repair / polish */
body.video-channel-page,
body.video-watch-page {
  background: #eef2f7 !important;
}

body.video-channel-page .layout-grid,
body.video-watch-page .layout-grid {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.video-channel-page .left-sidebar,
body.video-channel-page .right-sidebar,
body.video-watch-page .left-sidebar,
body.video-watch-page .right-sidebar {
  display: none !important;
}

body.video-channel-page .main-content,
body.video-watch-page .main-content {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
}

body.video-channel-page .footer-bar,
body.video-watch-page .footer-bar {
  position: relative !important;
  margin-top: 0 !important;
}

.video-channel-shell {
  width: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, .10), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 44%, #f7f9fc 100%);
  padding-bottom: 64px;
  overflow-x: clip;
}

.video-channel-hero {
  width: 100%;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .11);
  margin: 0 0 22px;
  overflow: visible;
}

.video-channel-banner {
  position: relative;
  min-height: clamp(220px, 32vw, 390px);
  background-color: #0f172a;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, .02), rgba(15, 23, 42, .68)),
    var(--vc-banner-image, linear-gradient(135deg, #0f172a, #2563eb));
  background-size: cover, cover;
  background-position: center, center var(--vc-banner-y, 50%);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  overflow: visible;
}

.video-channel-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 80%, rgba(255,255,255,.18), transparent 28%);
  pointer-events: none;
}

.video-channel-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .62));
  pointer-events: none;
}

.video-channel-hero-avatar {
  position: absolute;
  z-index: 4;
  left: clamp(22px, 5vw, 92px);
  bottom: -66px;
  width: clamp(110px, 13vw, 154px);
  height: clamp(110px, 13vw, 154px);
  border-radius: 50%;
  object-fit: cover;
  border: 7px solid #fff;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .38);
}

.video-channel-upload-btn,
.video-channel-crop-btn {
  position: absolute;
  z-index: 6;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .88);
  color: #fff;
  font-weight: 950;
  padding: 11px 15px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
  cursor: pointer;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.video-channel-upload-btn:hover,
.video-channel-crop-btn:hover,
.video-channel-primary:hover,
.video-channel-secondary:hover,
.video-card-action:hover {
  transform: translateY(-1px);
}

.video-channel-banner-btn { right: clamp(14px, 3vw, 34px); top: 20px; }
.video-channel-crop-btn { right: clamp(14px, 3vw, 34px); top: 70px; }
.video-channel-avatar-btn {
  left: clamp(44px, 6vw, 118px);
  bottom: -96px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  white-space: nowrap;
}

.video-channel-info {
  width: min(1720px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 88px 0 30px;
}

.video-channel-secondary-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .24);
}

.video-channel-copy {
  min-width: 0;
}

.video-channel-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: .98;
  font-weight: 1000;
  letter-spacing: -.055em;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.video-channel-copy p {
  margin: 0;
  max-width: 760px;
  color: #64748b;
  font-weight: 800;
  line-height: 1.45;
}

.video-channel-copy small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-weight: 850;
}

.video-channel-actions {
  min-width: 260px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.video-channel-primary,
.video-channel-secondary,
.video-channel-open-btn,
.video-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  white-space: nowrap;
}

.video-channel-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 16px 32px rgba(37, 99, 235, .28);
}

.video-channel-secondary,
.video-channel-open-btn,
.video-card-action {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
}

.video-channel-controls {
  width: min(1720px, calc(100% - 44px));
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
}

.video-channel-controls input,
.video-channel-controls select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
  box-sizing: border-box;
}

.video-channel-grid {
  width: min(1720px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 0 0 28px;
}

.video-channel-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .12);
  border: 1px solid rgba(15, 23, 42, .06);
  transition: transform .16s ease, box-shadow .16s ease;
}

.video-channel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}

.video-channel-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  overflow: hidden;
}

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

.video-channel-thumb span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
  backdrop-filter: blur(8px);
}

.video-channel-card-body { padding: 16px; }
.video-channel-card-body h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.22; }
.video-channel-card-body h3 a { text-decoration: none; color: #0f172a; }
.video-channel-card-body p { min-height: 42px; margin: 0 0 8px; color: #475569; line-height: 1.4; }
.video-channel-card-body small { color: #64748b; font-weight: 850; }

.video-channel-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.video-card-action.danger { background: #fee2e2; color: #991b1b; }
.video-share-count { background: #eef2ff; border-radius: 999px; padding: 8px 10px; font-weight: 950; color: #3730a3; }

.video-channel-loader {
  width: min(1720px, calc(100% - 44px));
  margin: 0 auto;
  text-align: center;
  font-weight: 950;
  color: #64748b;
  padding: 24px 0 44px;
}

.video-channel-empty {
  grid-column: 1 / -1;
  min-height: 280px;
  border: 1px dashed rgba(37, 99, 235, .26);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .10), transparent 34%),
    rgba(255,255,255,.84);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 34px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, .08);
}

.video-channel-empty-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 40px rgba(37, 99, 235, .28);
  font-size: 28px;
}

.video-channel-empty h2 { margin: 0 0 8px; font-size: 26px; color: #0f172a; }
.video-channel-empty p { margin: 0 0 18px; color: #64748b; font-weight: 800; }

.video-channel-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 12px;
}
.video-channel-modal.hidden { display: none; }
.video-channel-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .75); backdrop-filter: blur(12px); }
.video-channel-editor {
  position: relative;
  z-index: 1;
  width: min(780px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.video-channel-editor header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid #e5e7eb; padding-bottom: 14px; margin-bottom: 16px; }
.video-channel-editor header h2 { margin: 0; font-size: 28px; }
.video-channel-editor header p { margin: 4px 0 0; color: #64748b; font-weight: 700; }
.video-channel-editor header button { border: 0; background: #0f172a; color: #fff; border-radius: 50%; width: 42px; height: 42px; font-size: 22px; cursor: pointer; }
.video-channel-editor label { display: block; font-weight: 950; color: #0f172a; margin: 12px 0; }
.video-channel-editor input,
.video-channel-editor textarea,
.video-channel-editor select { width: 100%; box-sizing: border-box; border: 1px solid #dbe4ef; border-radius: 16px; padding: 12px 14px; margin-top: 7px; font: inherit; }
.video-channel-oembed-preview { background: #0f172a; color: #fff; border-radius: 20px; min-height: 210px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.video-channel-oembed-preview iframe,
.video-watch-player iframe { width: 100%; height: 100%; border: 0; }
.video-channel-editor footer { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.video-channel-upload-preview { height: 230px; background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 20px; display: grid; place-items: center; overflow: hidden; }
.video-channel-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.video-channel-file-pick input { display: none; }
.video-channel-file-pick span { display: inline-flex; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.video-channel-progress { background: #eef2ff; border-radius: 999px; height: 18px; position: relative; overflow: hidden; }
.video-channel-progress b { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #7c3aed); transition: width .15s ease; }
.video-channel-progress span { position: absolute; inset: 0; text-align: center; font-size: 12px; font-weight: 950; line-height: 18px; color: #0f172a; }

.video-watch-shell { min-height: 100dvh; background: #f8fafc; }
.video-watch-player { width: 100%; height: min(68vh, 720px); background: #000; display: grid; place-items: center; }
.video-watch-main { max-width: 1180px; margin: 24px auto 80px; padding: 22px; }
.video-watch-head,
.video-watch-channel-row,
.video-watch-actions { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.video-watch-head h1 { margin: 0; font-size: clamp(24px, 4vw, 42px); }
.video-watch-channel-row { justify-content: flex-start; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 14px 0; margin: 16px 0; }
.video-watch-channel-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.video-watch-channel-row small { display: block; color: #64748b; font-weight: 800; }
.video-watch-description { background: #f1f5f9; border-radius: 18px; padding: 16px; color: #334155; margin-bottom: 18px; }

.video-channel-settings-card .video-channel-settings-grid,
.video-channel-settings-upload-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.video-channel-settings-preview { height: 150px; background: #f1f5f9; border-radius: 18px; overflow: hidden; }
.video-channel-settings-preview img { width: 100%; height: 100%; object-fit: cover; }
.video-channel-settings-upload-card { border: 1px solid #e5e7eb; border-radius: 20px; padding: 14px; background: #fff; }
.video-channel-settings-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.video-channel-settings-actions button { border: 0; background: #0f172a; color: #fff; border-radius: 999px; padding: 9px 13px; font-weight: 950; }
.video-channel-upload-meta { font-size: 12px; color: #64748b; margin-top: 8px; font-weight: 850; }

@media (max-width: 980px) {
  .video-channel-info {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .video-channel-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-width: 0;
  }
  .video-channel-controls {
    grid-template-columns: 1fr 150px;
  }
  .video-channel-controls select:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body.video-channel-page { padding-bottom: 0 !important; }
  .video-channel-banner { min-height: 240px; }
  .video-channel-hero-avatar { width: 108px; height: 108px; bottom: -48px; border-width: 5px; }
  .video-channel-avatar-btn { left: 34px; bottom: -82px; padding: 9px 12px; font-size: 12px; }
  .video-channel-banner-btn, .video-channel-crop-btn { right: 12px; padding: 9px 12px; font-size: 12px; }
  .video-channel-crop-btn { top: 62px; }
  .video-channel-info { width: calc(100% - 24px); padding-top: 72px; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .video-channel-secondary-avatar { width: 56px; height: 56px; }
  .video-channel-copy h1 { font-size: 30px; }
  .video-channel-actions { gap: 8px; }
  .video-channel-primary, .video-channel-secondary, .video-channel-open-btn, .video-card-action { padding: 10px 12px; font-size: 13px; }
  .video-channel-controls { width: calc(100% - 20px); grid-template-columns: 1fr; border-radius: 18px; padding: 10px; }
  .video-channel-grid { width: calc(100% - 20px); grid-template-columns: 1fr; gap: 14px; }
  .video-channel-empty { min-height: 220px; border-radius: 20px; }
  .video-watch-player { height: 44vh; }
  .video-watch-main { margin: 0 0 60px; border-radius: 0; }
  .video-channel-editor { border-radius: 18px; width: calc(100vw - 12px); }
}
