*{box-sizing:border-box;margin:0;padding:0}

/* Author CSS class রুল (display:flex ইত্যাদি) [hidden] অ্যাট্রিবিউটকে override
   করে ফেলে কারণ UA stylesheet-এর [hidden]{display:none} কম priority পায়।
   এই রুল নিশ্চিত করে hidden attribute সবসময় কাজ করবে। */
[hidden]{display:none!important}

html { height: 100%; overflow: hidden }
body { height: 100%; overflow: hidden; transform: none; }

:root{
  --bg:#0f0f0f;
  --surface:#1a1a1a;
  --surface2:#212121;
  --surface3:#272727;
  --border:#2d2d2d;
  --border2:#3d3d3d;
  --text:#e8e8e8;
  --text2:#aaaaaa;
  --text3:#717171;
  --accent:#ff0000;
  --accent2:#cc0000;
  --blue:#3ea6ff;
  --green:#4caf50;
  --amber:#ffd600;
  --white:#fff;
  --radius:8px;
  --font:'Roboto',sans-serif;
  --mono:'Roboto Mono',monospace;
}

body{font-family:var(--font);background:var(--bg);color:var(--text);display:flex;flex-direction:column}

/* ── TOPBAR ── */
.topbar{
  height:56px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 16px;
  background:var(--bg);
  border-bottom:1px solid var(--border);
  position:sticky;top:0;z-index:100;
  flex-shrink:0;
}

.topbar-left{display:flex;align-items:center;gap:12px}

.logo{display:flex;align-items:center;gap:6px;text-decoration:none}
.logo-icon{
  background:var(--accent);
  border-radius:6px;
  width:32px;height:22px;
  display:flex;align-items:center;justify-content:center;
}
.logo-icon svg{width:14px;height:14px;fill:white}
.logo-name{font-size:18px;font-weight:700;color:var(--white);letter-spacing:-.5px}
.logo-name span{font-weight:300;color:var(--text2)}

/* ── SITE FOOTER ── */
.site-footer{
  flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  height:36px;
  border-top:1px solid var(--border);
  background:var(--bg);
  font-size:12px;color:var(--text3);
}
.site-footer strong{color:var(--text2);font-weight:600}

.search-bar{
  display:flex;
  flex:1;max-width:480px;margin:0 24px;
}
.search-input{
  flex:1;
  background:var(--surface2);
  border:1px solid var(--border2);
  border-right:none;
  border-radius:var(--radius) 0 0 var(--radius);
  padding:8px 14px;
  color:var(--text);font-size:14px;
  outline:none;
  font-family:var(--font);
}
.search-input:focus{border-color:#65a0f0}
.search-input::placeholder{color:var(--text3)}
.search-btn{
  background:var(--surface3);
  border:1px solid var(--border2);
  border-left:none;
  border-radius:0 var(--radius) var(--radius) 0;
  padding:0 16px;
  cursor:pointer;color:var(--text2);
  display:flex;align-items:center;
  transition:background .15s;
}
.search-btn:hover{background:var(--border)}
.search-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.topbar-right{display:flex;align-items:center;gap:10px}

.upload-trigger{
  display:flex;align-items:center;gap:7px;
  background:var(--surface2);
  border:1px solid var(--border2);
  border-radius:18px;
  padding:7px 14px;
  font-size:13px;font-weight:500;
  color:var(--text);cursor:pointer;
  transition:all .15s;
  white-space:nowrap;
}
.upload-trigger svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.upload-trigger:hover{background:var(--surface3);border-color:var(--text3)}

.icon-btn{
  background:transparent;border:none;cursor:pointer;
  width:36px;height:36px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text2);transition:background .15s;
}
.icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.icon-btn:hover{background:var(--surface3)}

.live-dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 6px var(--green);animation:pulse 2s ease infinite;flex-shrink:0}

/* ── TOPBAR PROGRESS AREA ── */
.topbar-progress-area{
  background:var(--bg);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  max-height:0;
  transition:max-height .35s ease;
  flex-shrink:0;
  position:sticky;top:56px;z-index:99;
}
.topbar-progress-area.has-jobs{max-height:200px}

.job-list{
  display:flex;flex-direction:column;gap:4px;
  padding:6px 16px 8px;
}

.job-row{
  display:flex;align-items:center;gap:10px;
  padding:5px 10px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:6px;
  animation:slideDown .2s ease both;
}

.job-icon{
  width:18px;height:18px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
}
.job-icon svg{width:13px;height:13px;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.job-icon.processing svg{stroke:var(--blue);animation:spin .9s linear infinite}
.job-icon.ready svg{stroke:var(--green)}
.job-icon.error svg{stroke:#ff5555}

.job-name{
  font-size:11px;color:var(--text2);
  font-family:var(--mono);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:160px;flex-shrink:0;
}

.job-track{
  flex:1;height:3px;
  background:var(--surface3);
  border-radius:2px;overflow:hidden;
  min-width:60px;
}
.job-fill{height:100%;border-radius:2px;transition:width .5s ease}
.job-fill.processing{background:linear-gradient(90deg,var(--accent2),var(--blue))}
.job-fill.uploading{background:linear-gradient(90deg,var(--accent2),var(--accent));animation:shimmer-bar 1.5s linear infinite;background-size:200% 100%}
.job-fill.ready{background:var(--green)}
.job-fill.error{background:#ff5555}

.job-stage{
  font-size:10px;color:var(--text3);
  font-family:var(--mono);
  white-space:nowrap;flex-shrink:0;
  min-width:100px;text-align:right;
}

.job-pct{
  font-size:11px;font-family:var(--mono);font-weight:500;
  flex-shrink:0;min-width:34px;text-align:right;
}
.job-pct.processing{color:var(--blue)}
.job-pct.uploading{color:var(--accent)}
.job-pct.ready{color:var(--green)}
.job-pct.error{color:#ff5555}

.job-dismiss{
  background:none;border:none;cursor:pointer;
  color:var(--text3);font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s;flex-shrink:0;
}
.job-dismiss:hover{color:#ff5555}

@keyframes shimmer-bar{0%{background-position:200% 0}100%{background-position:-200% 0}}
@keyframes slideDown{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* ── THEATER MODE ── */
/*
  YouTube-এর theater mode:
  - Sidebar hide হয়, main area full width নেয়
  - Player আরো বড় হয়, কিন্তু fullscreen নয়
  - Smooth transition
*/
.layout.theater-mode .sidebar {
  width: 0;
  padding: 0;
  overflow: hidden;
  border-left-color: transparent;
  flex-shrink: 0;
  transition: width .3s ease, padding .3s ease, border-color .3s ease;
}

.layout:not(.theater-mode) .sidebar {
  transition: width .3s ease, padding .3s ease, border-color .3s ease;
}

.layout.theater-mode .main {
  padding: 12px 16px;
}

.layout.theater-mode .player-wrap {
  border-radius: 0;
  margin-bottom: 12px;
}

/* ── LAYOUT ── */
.layout{
  display:flex;
  flex:1;
  overflow:hidden;
}

/* ── MAIN PLAYER AREA ── */
.main{
  flex:1;
  overflow-y:auto;
  padding:20px 16px 20px 20px;
  min-width:0;
}

.main::-webkit-scrollbar{width:4px}
.main::-webkit-scrollbar-track{background:transparent}
.main::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

/* ── VIDEO PLAYER ── */
.player-wrap{
  background:#000;
  border-radius:10px;
  overflow:hidden;
  aspect-ratio:16/9;
  position:relative;
  margin-bottom:16px;
}

.player-placeholder{
  width:100%;height:100%;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:16px;
  color:var(--text3);
}

.player-placeholder-icon{
  width:72px;height:72px;
  border:2px solid var(--border2);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.player-placeholder-icon svg{width:32px;height:32px;stroke:var(--text3);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.player-placeholder h3{font-size:15px;font-weight:400;color:var(--text2)}
.player-placeholder p{font-size:12px;color:var(--text3);font-family:var(--mono)}

#mainPlayer{
  width:100%;height:100%;
  background:#000;
  display:none;
}

#mainPlayer.active{display:block}

/* ── PIP BUTTON ── */
.pip-btn{
  position:absolute;
  bottom:52px;
  right:10px;
  z-index:10;
  background:rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.12);
  border-radius:5px;
  padding:5px 7px;
  cursor:pointer;
  color:#fff;
  display:flex;align-items:center;justify-content:center;
  opacity:0;
  transition:opacity .2s ease, background .15s ease;
  /* hidden attribute সরালে JS এর পরেই দেখাবে,
     কিন্তু hover না হলে opacity:0 থাকবে */
}
.player-wrap:hover .pip-btn{opacity:1}
.pip-btn:hover{background:rgba(0,0,0,.85)}
.pip-btn.active{
  color:var(--blue);
  border-color:rgba(62,166,255,.4);
  background:rgba(62,166,255,.15);
  opacity:1; /* active থাকলে সবসময় দৃশ্যমান */
}
.pip-btn svg{
  width:16px;height:16px;
  stroke:currentColor;fill:none;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
  display:block;
}

/* ── PREVIEW THUMBNAILS STRIP ── */
.preview-strip{
  display:none;
  gap:8px;
  margin-bottom:16px;
  overflow-x:auto;
  padding-bottom:4px;
}
.preview-strip.show{display:flex}
.preview-strip::-webkit-scrollbar{height:3px}
.preview-strip::-webkit-scrollbar-track{background:transparent}
.preview-strip::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

.preview-strip-label{
  font-size:12px;color:var(--text3);margin-bottom:8px;
  font-weight:500;letter-spacing:.04em;text-transform:uppercase;
}

.preview-thumb{
  flex-shrink:0;
  width:140px;
  border-radius:6px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
  border:2px solid transparent;
  transition:border-color .15s;
}
.preview-thumb:hover{border-color:var(--blue)}
.preview-thumb img{
  width:100%;
  display:block;
  aspect-ratio:16/9;
  object-fit:cover;
}
.preview-thumb-ts{
  position:absolute;bottom:4px;right:4px;
  background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:2px 5px;border-radius:3px;
}

.preview-section{margin-bottom:16px}

/* ── VIDEO INFO ── */
.video-info{margin-bottom:16px}

.video-title{
  font-size:18px;font-weight:700;
  color:var(--text);line-height:1.4;
  margin-bottom:8px;
}

.video-meta{
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:8px;
}

.video-meta-left{
  display:flex;align-items:center;gap:16px;
  font-size:13px;color:var(--text2);
}

.video-meta-item{display:flex;align-items:center;gap:5px}
.video-meta-item svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

.meta-badges{display:flex;gap:6px;flex-wrap:wrap}

.badge{
  padding:4px 10px;border-radius:12px;
  font-size:11px;font-weight:500;font-family:var(--mono);
  letter-spacing:.03em;
}
.badge-hls{background:rgba(62,166,255,.15);color:var(--blue);border:1px solid rgba(62,166,255,.3)}
.badge-dash{background:rgba(76,175,80,.12);color:var(--green);border:1px solid rgba(76,175,80,.3)}
.badge-res{background:var(--surface2);color:var(--text2);border:1px solid var(--border2)}
.badge-dur{background:rgba(255,214,0,.1);color:var(--amber);border:1px solid rgba(255,214,0,.25)}

.proto-tabs{display:flex;gap:6px;margin-bottom:12px;}
.proto-tab{
  display:flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:14px;
  font-size:12px;font-weight:500;font-family:var(--mono);
  border:1px solid var(--border2);
  background:var(--surface2);color:var(--text2);
  cursor:pointer;transition:all .15s;
}
.proto-tab:hover{border-color:var(--text3);color:var(--text)}
.proto-tab.active.hls{background:rgba(62,166,255,.15);border-color:rgba(62,166,255,.5);color:var(--blue)}
.proto-tab.active.dash{background:rgba(76,175,80,.12);border-color:rgba(76,175,80,.4);color:var(--green)}
.proto-tab-dot{width:6px;height:6px;border-radius:50%}
.proto-tab.active.hls .proto-tab-dot{background:var(--blue)}
.proto-tab.active.dash .proto-tab-dot{background:var(--green)}

.video-divider{height:1px;background:var(--border);margin:16px 0}

.quality-section{margin-bottom:16px}
.quality-label{font-size:12px;color:var(--text3);margin-bottom:8px;font-weight:500;letter-spacing:.04em;text-transform:uppercase}
.quality-chips{display:flex;gap:6px;flex-wrap:wrap}
.q-chip{
  padding:5px 12px;border-radius:14px;
  font-size:12px;font-weight:500;font-family:var(--mono);
  border:1px solid var(--border2);
  background:var(--surface2);color:var(--text2);
  cursor:pointer;transition:all .15s;
}
.q-chip:hover{border-color:var(--text3);color:var(--text)}
.q-chip.active{background:var(--accent);border-color:var(--accent);color:#fff}

/* ── SIDEBAR ── */
.sidebar{
  width:396px;
  flex-shrink:0;
  overflow-y:auto;
  padding:20px 16px 20px 4px;
  border-left:1px solid var(--border);
}

.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

.sidebar-header{
  font-size:13px;font-weight:600;
  color:var(--text2);margin-bottom:14px;
  letter-spacing:.05em;text-transform:uppercase;
  display:flex;align-items:center;justify-content:space-between;
}

.sidebar-count{
  background:var(--surface2);border-radius:10px;
  padding:2px 8px;font-size:11px;color:var(--text3);
  font-weight:400;letter-spacing:0;text-transform:none;
}

/* ── VIDEO CARD ── */
.scard{
  display:flex;gap:10px;
  padding:8px;border-radius:var(--radius);
  cursor:pointer;transition:background .15s;
  margin-bottom:4px;
  position:relative;
}
.scard:hover{background:var(--surface2)}
.scard.playing{background:var(--surface3)}
.scard.playing::before{
  content:'';
  position:absolute;left:0;top:8px;bottom:8px;
  width:3px;border-radius:0 2px 2px 0;
  background:var(--accent);
}

.scard-thumb{
  width:160px;flex-shrink:0;
  aspect-ratio:16/9;
  border-radius:6px;
  background:#000;
  position:relative;overflow:hidden;
}
.scard-thumb img{
  width:100%;height:100%;object-fit:cover;
  display:block;
}
.scard-thumb-placeholder{
  width:100%;height:100%;
  background:linear-gradient(135deg,var(--surface2) 0%,var(--surface3) 100%);
  display:flex;align-items:center;justify-content:center;
}
.scard-thumb-placeholder svg{width:22px;height:22px;stroke:var(--text3);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.scard-dur{
  position:absolute;bottom:4px;right:4px;
  background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:2px 5px;border-radius:3px;
}

.scard-play-overlay{
  position:absolute;inset:0;
  background:rgba(0,0,0,.35);
  display:flex;align-items:center;justify-content:center;
  opacity:0;transition:opacity .15s;
}
.scard:hover .scard-play-overlay{opacity:1}
.scard.playing .scard-play-overlay{opacity:1}
.scard-play-overlay svg{width:22px;height:22px;stroke:#fff;fill:rgba(255,255,255,.2);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

.scard-info{flex:1;min-width:0;padding-top:2px}
.scard-name{
  font-size:13px;font-weight:500;color:var(--text);
  line-height:1.4;margin-bottom:5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;      /* Safari, Chrome  */
  line-clamp: 2;               /* Standard — future browsers */
  overflow: hidden;           
    overflow:hidden;
  }
.scard.playing .scard-name{color:var(--accent)}
.scard-meta{font-size:11px;color:var(--text3);line-height:1.5}
.scard-meta span{display:block}

.scard-proto{display:flex;gap:4px;margin-top:4px;}
.scard-proto-badge{
  font-size:10px;font-family:var(--mono);font-weight:500;
  padding:1px 6px;border-radius:8px;
}
.scard-proto-badge.hls{background:rgba(62,166,255,.15);color:var(--blue)}
.scard-proto-badge.dash{background:rgba(76,175,80,.12);color:var(--green)}

.scard-actions{
  display:flex;gap:6px;margin-top:6px;
  opacity:0;
  transform:translateY(4px);
  transition:opacity .15s ease, transform .15s ease;
  pointer-events:none;
}
.scard:hover .scard-actions{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.scard-del,
.scard-edit{
  display:inline-flex;align-items:center;gap:5px;
  border:none;border-radius:5px;
  padding:4px 10px;cursor:pointer;
  font-size:11px;font-weight:500;font-family:var(--font);
  transition:background .15s;
  white-space:nowrap;
}
.scard-edit{background:rgba(62,166,255,.15);color:var(--blue)}
.scard-edit:hover{background:rgba(62,166,255,.3)}
.scard-del{background:rgba(255,59,59,.15);color:#ff5555}
.scard-del:hover{background:rgba(255,59,59,.3)}
.scard-del svg,
.scard-edit svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block;flex-shrink:0}

.sidebar-empty{padding:40px 16px;text-align:center;}
.sidebar-empty svg{width:40px;height:40px;stroke:var(--text3);fill:none;stroke-width:1.2;margin-bottom:12px;stroke-linecap:round;stroke-linejoin:round}
.sidebar-empty p{font-size:13px;color:var(--text3)}
.sidebar-empty .upload-link{color:var(--blue);cursor:pointer;text-decoration:underline;background:none;border:none;font-size:13px;font-family:var(--font);}

/* ══════════════════════════════════════════════════════════════
   YouTube-Style Upload Modal — Swapnoloke Stream
   Replace the "── UPLOAD MODAL ──" section in styles.css
   with this block.
   ══════════════════════════════════════════════════════════════ */

/* ── UPLOAD MODAL BACKDROP ── */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 500;
  background: rgba(0,0,0,.88);
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease both;
}
.modal-backdrop.visible { display: flex }

/* ── MODAL SHELL ── */
.modal{
  background:#282828;
  border-radius:12px;
  width:100%;max-width:640px;
  display:flex;flex-direction:column;
  max-height:90vh;
  position:relative;
  animation:slideUp .25s ease both;
  overflow:hidden;
}

/* ── MODAL HEADER ── */
.modal-header-yt{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.modal-header-yt .modal-title{
  font-size:16px;font-weight:500;color:var(--text);
  margin-bottom:0;padding-right:0;
}
.modal-close{
  background:rgba(255,255,255,0);border:none;
  width:36px;height:36px;border-radius:50%;
  cursor:pointer;color:var(--text2);
  display:flex;align-items:center;justify-content:center;
  transition:background .15s;flex-shrink:0;
}
.modal-close:hover{background:rgba(255,255,255,.1);color:var(--text)}
.modal-close svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ── STEP INDICATOR ── */
.upload-steps{
  display:flex;align-items:center;
  padding:18px 24px 0;
  flex-shrink:0;
}
.upload-step{display:flex;align-items:center;gap:8px}
.upload-step-circle{
  width:28px;height:28px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:500;flex-shrink:0;
  border:2px solid var(--border2);color:var(--text3);
  transition:all .3s ease;
}
.upload-step.active .upload-step-circle{border-color:var(--blue);color:var(--blue)}
.upload-step.done   .upload-step-circle{border-color:var(--green);background:var(--green);color:#fff}
.upload-step-label{font-size:12px;color:var(--text3);white-space:nowrap;transition:color .3s}
.upload-step.active .upload-step-label{color:var(--text)}
.upload-step.done   .upload-step-label{color:var(--text2)}
.upload-step-line{
  flex:1;height:1px;background:var(--border);
  margin:0 10px;min-width:20px;
  transition:background .3s;
}
.upload-step-line.done{background:var(--green)}

/* ── MODAL BODY (scrollable) ── */
.modal-body-yt{
  overflow-y:auto;flex:1;
}
.modal-body-yt::-webkit-scrollbar{width:4px}
.modal-body-yt::-webkit-scrollbar-track{background:transparent}
.modal-body-yt::-webkit-scrollbar-thumb{background:var(--border2);border-radius:2px}

/* ── DROP ZONE PANEL ── */
.yt-drop-panel{padding:24px}
.yt-drop-zone{
  border:2px dashed var(--border2);
  border-radius:12px;
  padding:60px 32px;
  text-align:center;
  cursor:pointer;
  transition:all .2s ease;
  background:transparent;
}
.yt-drop-zone:hover,
.yt-drop-zone.dragover{
  border-color:var(--blue);
  background:rgba(62,166,255,.05);
}
.yt-drop-icon{
  width:80px;height:80px;margin:0 auto 20px;
  background:rgba(255,255,255,.06);
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  transition:all .2s;
}
.yt-drop-zone:hover .yt-drop-icon,
.yt-drop-zone.dragover .yt-drop-icon{background:rgba(62,166,255,.12)}
.yt-drop-icon svg{
  width:36px;height:36px;
  fill:none;stroke:var(--text2);stroke-width:1.5;
  stroke-linecap:round;stroke-linejoin:round;
  transition:stroke .2s;
}
.yt-drop-zone:hover .yt-drop-icon svg,
.yt-drop-zone.dragover .yt-drop-icon svg{stroke:var(--blue)}
.yt-drop-title{font-size:16px;font-weight:500;color:var(--text);margin-bottom:8px}
.yt-drop-sub{font-size:13px;color:var(--text3);margin-bottom:22px;line-height:1.6}
.yt-browse-btn{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--blue);color:#fff;
  border:none;border-radius:2px;
  padding:10px 22px;font-size:13px;font-weight:500;
  cursor:pointer;transition:background .15s;
  font-family:var(--font);letter-spacing:.03em;
  text-transform:uppercase;
}
.yt-browse-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.yt-browse-btn:hover{background:#2196f3}
.yt-formats{font-size:11px;color:var(--text3);margin-top:14px;font-family:var(--mono)}

/* ── FILE SELECTED PANEL ── */
.yt-file-panel{padding:20px 24px;display:none}
.yt-file-card{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:10px;
  padding:14px 16px;
  display:flex;align-items:center;gap:14px;
  margin-bottom:18px;
}
.yt-file-thumb{
  width:80px;height:52px;
  border-radius:6px;background:#000;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  position:relative;
}
.yt-file-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.yt-file-thumb-placeholder svg{
  width:24px;height:24px;fill:none;stroke:var(--text3);
  stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;
}
.yt-file-info{flex:1;min-width:0}
.yt-file-name{
  font-size:14px;font-weight:500;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px;
}
.yt-file-meta{font-size:12px;color:var(--text3);display:flex;gap:12px;flex-wrap:wrap}
.yt-file-remove{
  background:none;border:none;cursor:pointer;
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--text3);transition:all .15s;flex-shrink:0;
}
.yt-file-remove:hover{background:rgba(255,255,255,.08);color:#ff5555}
.yt-file-remove svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/*
════════════════════════════════════════════════════════════════════════════
  DROP ZONE PREVIEW PANEL  —  styles.css addition
════════════════════════════════════════════════════════════════════════════

  INSERT LOCATION:
    Append to the end of the "── FILE SELECTED PANEL ──" section
    (after the existing .yt-file-panel rules, before "── UPLOAD PROGRESS BAR ──")

  Namespace: .dp-* (drop-preview) — zero collision with existing .yt-* rules.

  State machine (driven by JS class toggling):
    #dropZonePreview            → hidden by default (display:none)
    #dropZonePreview.dp-visible → panel slides in, drop zone hides
    #dpImg.dp-img-loaded        → image fades in, shimmer fades out
    #dpBadges.dp-badges-visible → badges appear after image loads
    #dpCount.dp-count-show      → count badge appears for multi-file

  Dark mode: inherits CSS vars from :root (--bg, --surface, --text, etc.)
    All colours use existing CSS variables — no hardcoded hex values.
    The panel is visually consistent with the existing YouTube-style modal.

  Performance notes:
    • Animations use transform + opacity only (compositor-only — no layout)
    • Shimmer uses background-position animation (GPU-composited gradient)
    • Image fade uses opacity transition only (no width/height animation)
    • @media (prefers-reduced-motion) disables all animations safely

  Accessibility:
    • Focus ring preserved on all interactive elements
    • dp-clear-btn and dp-change-btn have visible :focus-visible outlines
    • Minimum touch target: 44×44px on dp-clear-btn
════════════════════════════════════════════════════════════════════════════
*/

/* ── DROP PREVIEW PANEL — outer wrapper ─────────────────────────────────── */

/*
  Hidden by default — JS adds .dp-visible to show it.
  Uses display:none (not visibility:hidden) so it takes no layout space
  when hidden. The .dp-visible class switches to display:flex which then
  triggers the entrance animation.
*/
.dp-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 20px 24px;
  animation: dp-enter 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dp-panel.dp-visible {
  display: flex;
}

/* Entrance animation: subtle upward translate + opacity */
@keyframes dp-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── 16:9 FRAME CONTAINER ───────────────────────────────────────────────── */

/*
  Maintains 16:9 aspect ratio at any width.
  Position: relative so badges and play-icon overlay correctly.
  Border-radius matches the modal's card aesthetic.
  Overflow: hidden clips the image and shimmer to rounded corners.
  Background: dark surface so shimmer contrast is visible.
*/
.dp-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}

/* ── SHIMMER SKELETON ───────────────────────────────────────────────────── */

/*
  Full-frame shimmer shown while extractVideoFrame() runs.
  Uses a gradient sweep animation identical to the sidebar card skeletons.
  Fades out when .dp-shimmer-done is added (by DropZonePreview.show on img load).
*/
.dp-shimmer {
  position: absolute;
  inset: 0;
  background: var(--surface);
  overflow: hidden;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.dp-shimmer.dp-shimmer-done {
  opacity: 0;
  pointer-events: none;
}

.dp-shimmer-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent       0%,
    rgba(255,255,255,0.06) 40%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 60%,
    transparent       100%
  );
  background-size: 200% 100%;
  animation: dp-shimmer-sweep 1.6s linear infinite;
}

@keyframes dp-shimmer-sweep {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── CAPTURED FRAME IMAGE ───────────────────────────────────────────────── */

/*
  Covers the full frame container.
  Starts at opacity:0 — fades in when JS adds .dp-img-loaded after img onload.
  object-fit:cover ensures no letterboxing regardless of source aspect ratio.
  z-index: 2 sits above the shimmer so the transition is visible.
*/
.dp-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
  border-radius: inherit;
}

.dp-img.dp-img-loaded {
  opacity: 1;
}

/* ── PLAY ICON OVERLAY ──────────────────────────────────────────────────── */

/*
  Centred play icon sits above the frame image (z-index:3).
  Semi-transparent dark circle background for legibility.
  Appears only after image loads (.dp-img-loaded sibling selector).
  Pointer-events: none — purely decorative, never captures clicks.
*/
.dp-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease 0.1s; /* slight delay after image */
}

/* Reveal play icon once image is loaded */
.dp-frame:has(.dp-img.dp-img-loaded) .dp-play-icon {
  opacity: 1;
}

.dp-play-icon svg {
  width: 52px;
  height: 52px;
  fill: rgba(0, 0, 0, 0.55);
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.5;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* Polygon inside circle: no stroke on the play triangle itself */
.dp-play-icon svg polygon {
  fill: rgba(255, 255, 255, 0.9);
  stroke: none;
}

/* ── BADGE OVERLAY (duration + size) ───────────────────────────────────── */

/*
  Positioned bottom-right of the frame.
  Starts hidden — JS adds .dp-badges-visible after image load.
  Badges use the same styling as .scard-dur.
*/
.dp-badges {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  gap: 5px;
  align-items: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease 0.2s, transform 0.25s ease 0.2s;
  pointer-events: none;
}

.dp-badges.dp-badges-visible {
  opacity: 1;
  transform: translateY(0);
}

.dp-badge {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

/* Duration badge: slight accent left border */
.dp-badge-dur {
  border-left: 2px solid var(--accent);
}

/* Size badge: neutral */
.dp-badge-size {
  color: rgba(255, 255, 255, 0.75);
}

/* ── META ROW (filename + count badge + remove button) ──────────────────── */

.dp-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/*
  Filename — truncated with ellipsis.
  flex:1 takes remaining width after badges and button.
  font-family: mono for consistent character width (filenames).
*/
.dp-filename {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/*
  Multi-file count badge — "+ 2 more files"
  Hidden by default, shown when JS adds .dp-count-show.
*/
.dp-count-badge {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(62, 166, 255, 0.12);
  border: 1px solid rgba(62, 166, 255, 0.3);
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.dp-count-badge.dp-count-show {
  opacity: 1;
  transform: scale(1);
}

/*
  Remove / clear button — ✕ icon, top-right of meta row.
  Minimum 36×36px touch target.
  Matches existing .modal-close aesthetic.
*/
.dp-clear-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.dp-clear-btn:hover {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
}

.dp-clear-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.dp-clear-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── CHANGE FILES BUTTON ────────────────────────────────────────────────── */

/*
  Secondary action — "Add / change files"
  Ghost button style, full width for easy tap on mobile.
  Dashed border signals "interactive" differently from the primary upload CTA.
*/
.dp-change-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px dashed var(--border2);
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.dp-change-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(62, 166, 255, 0.05);
}

.dp-change-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.dp-change-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── REDUCED MOTION OVERRIDES ────────────────────────────────────────────── */

/*
  Disable all non-essential animations for users who prefer reduced motion.
  Transitions still apply (opacity changes) but movement is eliminated.
*/
@media (prefers-reduced-motion: reduce) {
  .dp-panel {
    animation: none;
  }

  .dp-shimmer-bar {
    animation: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .dp-img,
  .dp-play-icon,
  .dp-badges,
  .dp-count-badge {
    transition: none;
  }
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .dp-panel {
    padding: 16px;
    gap: 12px;
  }

  .dp-change-btn {
    font-size: 11px;
    padding: 8px 12px;
  }

  .dp-filename {
    font-size: 12px;
  }
}

/* ── UPLOAD PROGRESS BAR ── */
.yt-upload-progress{margin-bottom:18px}
.yt-upload-progress-header{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:7px;
}
.yt-upload-label{font-size:13px;color:var(--text2)}
.yt-upload-pct{font-size:13px;font-weight:500;color:var(--blue);font-family:var(--mono)}
.yt-progress-track{height:3px;background:var(--border);border-radius:2px;overflow:hidden}
.yt-progress-fill{
  height:100%;border-radius:2px;
  background:linear-gradient(90deg,#1565c0,var(--blue));
  transition:width .4s ease;width:0%;
}
.yt-progress-fill.done{background:var(--green)}
.yt-speed-row{
  display:flex;align-items:center;gap:6px;
  margin-top:6px;font-size:11px;color:var(--text3);
  font-family:var(--mono);
}
.yt-speed-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--blue);
  animation:pulse 2s ease infinite;
  flex-shrink:0;
}

/* ── DETAILS FORM ── */
.yt-details-form{display:none;padding-bottom:8px}
.yt-form-row{margin-bottom:18px}
.yt-form-label{
  font-size:11px;color:var(--text3);
  margin-bottom:6px;display:block;
  font-weight:500;letter-spacing:.06em;text-transform:uppercase;
}
.yt-form-input,.yt-form-textarea{
  width:100%;
  background:rgba(255,255,255,.05);
  border:1px solid var(--border2);
  border-radius:4px;
  padding:10px 12px;
  color:var(--text);
  font-size:14px;font-family:var(--font);
  transition:border-color .15s;outline:none;
}
.yt-form-input:focus,.yt-form-textarea:focus{border-color:var(--blue)}
.yt-form-input::placeholder,.yt-form-textarea::placeholder{color:var(--text3)}
.yt-form-textarea{resize:vertical;min-height:80px;line-height:1.5}
.yt-char-count{text-align:right;font-size:11px;color:var(--text3);margin-top:4px;font-family:var(--mono)}

/* Multiple files pill list */
.yt-file-pills{display:flex;flex-direction:column;gap:6px;margin-bottom:18px}
.yt-file-pill-item{
  display:flex;align-items:center;gap:10px;
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:8px;padding:8px 12px;
}
.yt-file-pill-icon svg{width:14px;height:14px;fill:none;stroke:var(--blue);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.yt-file-pill-name{flex:1;font-size:12px;font-family:var(--mono);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.yt-file-pill-size{font-size:11px;color:var(--text3);font-family:var(--mono);flex-shrink:0}
.yt-file-pill-status{font-size:11px;font-family:var(--mono);flex-shrink:0;color:var(--blue)}
.yt-file-pill-status.done{color:var(--green)}
.yt-file-pill-status.error{color:#ff5555}

/* ── PROCESSING PANEL ── */
.yt-processing-panel{
  padding:40px 24px;text-align:center;display:none;
}
.yt-processing-icon{
  width:68px;height:68px;margin:0 auto 20px;
  border-radius:50%;background:rgba(62,166,255,.1);
  display:flex;align-items:center;justify-content:center;
}
.yt-processing-title{font-size:16px;font-weight:500;color:var(--text);margin-bottom:8px}
.yt-processing-sub{font-size:13px;color:var(--text3);margin-bottom:24px;line-height:1.6}
.yt-process-log{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:8px;padding:16px;text-align:left;
}
.yt-process-step{
  display:flex;align-items:center;gap:10px;
  font-size:13px;padding:5px 0;
  opacity:.3;transition:opacity .3s ease;
}
.yt-process-step.active{opacity:1}
.yt-process-step.done{opacity:1}
.yt-process-step-icon{width:16px;flex-shrink:0;text-align:center}
.yt-process-step-label{flex:1;color:var(--text2)}
.yt-process-step-status{font-size:11px;font-family:var(--mono);color:var(--text3)}
.yt-process-step.done .yt-process-step-status{color:var(--green)}
.yt-process-step.active .yt-process-step-status{color:var(--blue)}

/* ── UPLOAD SPEED BADGE (keep for compat) ── */
.upload-speed-badge{
  display:none;
  background:rgba(62,166,255,.1);border:1px solid rgba(62,166,255,.25);
  border-radius:6px;padding:6px 12px;
  font-family:var(--mono);font-size:12px;color:var(--blue);
  margin-bottom:12px;gap:8px;align-items:center;
}
.upload-speed-badge.show{display:flex}

/* ── MODAL FOOTER ── */
.modal-footer-yt{
  padding:14px 20px;
  border-top:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;gap:10px;
}
.modal-footer-left{font-size:12px;color:var(--text3);font-family:var(--mono)}
.modal-footer-right{display:flex;gap:8px;align-items:center}

/* Buttons */
.yt-btn-ghost{
  background:transparent;border:none;
  color:var(--text);padding:9px 16px;border-radius:2px;
  font-size:13px;font-weight:500;letter-spacing:.03em;text-transform:uppercase;
  cursor:pointer;transition:background .15s;font-family:var(--font);
}
.yt-btn-ghost:hover{background:rgba(255,255,255,.08)}
.yt-btn-primary{
  background:var(--blue);color:#fff;border:none;
  padding:9px 20px;border-radius:2px;
  font-size:13px;font-weight:500;letter-spacing:.03em;text-transform:uppercase;
  cursor:pointer;transition:background .15s;font-family:var(--font);
  display:inline-flex;align-items:center;gap:8px;white-space:nowrap;
}
.yt-btn-primary:hover:not(:disabled){background:#2196f3}
.yt-btn-primary:disabled{opacity:.4;cursor:not-allowed}
.yt-btn-primary.done{background:var(--green)}
.yt-btn-primary.done:hover{background:#43a047}

/* ─── YouTube-style upload modal improvements ────────────────────────────── */

/* Tags & Select */
.yt-form-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text1);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
}
.yt-form-select:focus { border-color: var(--blue); }

.yt-form-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 4px 0 0;
}

.yt-form-label-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

/* Visibility & Audience radio groups */
.yt-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yt-radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.yt-radio-option:hover { background: var(--surface2); }

.yt-radio-option input[type="radio"] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.yt-radio-option input[type="radio"]:checked ~ .yt-radio-text strong {
  color: var(--blue);
}

.yt-radio-icon { font-size: 16px; }

.yt-radio-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yt-radio-text strong { font-size: 13px; font-weight: 500; }
.yt-radio-text small { font-size: 11px; color: var(--text3); }

/* Thumbnail section */
.yt-thumb-row { flex-direction: column; }

.yt-thumb-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.yt-thumb-auto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.yt-thumb-preview {
  width: 120px;
  height: 68px;
  background: var(--surface2);
  border: 2px solid var(--blue);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.yt-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yt-thumb-placeholder { font-size: 22px; }

.yt-thumb-option-label {
  font-size: 11px;
  color: var(--text3);
}

.yt-thumb-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 120px;
  height: 68px;
  border: 1.5px dashed var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text3);
  transition: border-color .15s, color .15s;
  text-align: center;
  padding: 4px;
}
.yt-thumb-upload:hover { border-color: var(--blue); color: var(--blue); }
.yt-thumb-upload span:first-child { font-size: 20px; }

/* Upload progress container fix */
#ytUploadProgress {
  padding: 12px 0;
}



/* ── FILE INPUT (hidden) ── */
#fileInput{display:none}

/* ── FILE PILL (legacy compat — keep hidden) ── */
.file-pill{display:none}

/* ══════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════ */
@media(max-width:640px){
  .modal{border-radius:0;max-height:100vh;height:100%}
  .yt-drop-zone{padding:40px 20px}
  .yt-drop-icon{width:64px;height:64px}
  .yt-browse-btn{width:100%;justify-content:center}
}

/* ── Legacy button compat (delete modal uses these) ── */
.btn{
  display:inline-flex;align-items:center;gap:7px;
  font-family:var(--font);font-size:13px;font-weight:500;
  padding:9px 18px;border-radius:6px;border:none;cursor:pointer;
  transition:all .15s;white-space:nowrap;
}
.btn-ghost{background:var(--surface2);border:1px solid var(--border2);color:var(--text2)}
.btn-ghost:hover{background:var(--surface3);color:var(--text)}
.btn-danger{background:transparent;border:1px solid rgba(255,82,82,.4);color:#ff5252;padding:9px 16px;border-radius:4px;font-size:13px;font-weight:500;cursor:pointer;transition:all .15s;font-family:var(--font)}
.btn-danger:hover{background:rgba(255,82,82,.1)}
.btn-primary{background:var(--blue);color:#fff;border:none;padding:9px 20px;border-radius:4px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s;font-family:var(--font);display:inline-flex;align-items:center;gap:7px}
.btn-primary:hover:not(:disabled){background:#2196f3}
.btn-primary:disabled{opacity:.4;cursor:not-allowed}


/* ── DELETE CONFIRM ── */
.confirm-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 600;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}
.confirm-backdrop.visible { display: flex }
.confirm-modal{
  background:var(--surface);border:1px solid var(--border2);
  border-radius:12px;padding:24px;width:340px;
  animation:slideUp .2s ease both;
}
.confirm-modal h2,
.confirm-modal-title { font-size:15px;font-weight:700;margin-bottom:8px;color:var(--text) }
.confirm-modal p{font-size:13px;color:var(--text2);line-height:1.6;margin-bottom:6px}
.confirm-id{
  background:var(--bg);border-radius:5px;padding:7px 10px;
  font-family:var(--mono);font-size:11px;color:var(--blue);
  margin-bottom:18px;word-break:break-all;
}
.confirm-actions{display:flex;gap:8px;justify-content:flex-end}

/* ── TOAST ── */
.toasts{position:fixed;bottom:20px;right:20px;z-index:999;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{
  background:var(--surface2);border:1px solid var(--border2);
  border-radius:8px;padding:12px 16px;
  font-size:13px;
  display:flex;align-items:flex-start;gap:10px;
  min-width:260px;max-width:340px;
  pointer-events:all;box-shadow:0 8px 24px rgba(0,0,0,.5);
  animation:toastIn .25s ease both;
}
.toast.ok{border-left:3px solid var(--green)}
.toast.err{border-left:3px solid #ff5555}
.toast.info{border-left:3px solid var(--blue)}
.toast-icon svg{width:14px;height:14px;flex-shrink:0;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-top:2px}
.toast.ok .toast-icon{color:var(--green)}
.toast.err .toast-icon{color:#ff5555}
.toast.info .toast-icon{color:var(--blue)}
.toast-title{font-weight:600;margin-bottom:2px}
.toast-msg{font-size:11px;color:var(--text2);font-family:var(--mono)}

.spinner{display:inline-block;width:12px;height:12px;border:2px solid rgba(255,255,255,.2);border-top-color:currentColor;border-radius:50%;animation:spin .7s linear infinite}

.skeleton{background:linear-gradient(90deg,var(--surface) 25%,var(--surface2) 50%,var(--surface) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:6px}

@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes toastIn{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes shimmer{to{background-position:-200% 0}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes slideDown{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

@media(max-width:900px){
  .sidebar{width:300px}
  .scard-thumb{width:120px}
}
@media(max-width:680px){
  .layout{flex-direction:column}
  .sidebar{width:100%;border-left:none;border-top:1px solid var(--border);padding:12px 16px}
  .main{overflow-y:visible}
  body{overflow-y:auto;overflow-x:hidden}
  html,body{height:auto}
}

/* job-cancel — uploading phase এ দেখায় (লাল) */
.job-cancel{
  background:none;border:none;cursor:pointer;
  color:#ff5555;font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s,opacity .15s;
  flex-shrink:0;opacity:.7;
}
.job-cancel:hover{opacity:1}

/* job-dismiss — processing/ready/error phase এ দেখায় (ধূসর) */
.job-dismiss{
  background:none;border:none;cursor:pointer;
  color:var(--text3);font-size:13px;
  line-height:1;padding:2px 0 2px 4px;
  transition:color .15s,opacity .15s;
  flex-shrink:0;opacity:.7;
}
.job-dismiss:hover{color:#ff5555;opacity:1}

/* Thumbnail container — fixed 16:9 aspect ratio, clips the extracted frame */
.yt-file-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-background-secondary);
  border-radius: 4px;
}

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

/* Center the spinner/placeholder inside the thumb area */
.yt-file-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 60px;
  color: var(--color-text-tertiary);
}

.yt-file-thumb-placeholder svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ═══════════════════════════════════════════════════════════════════════════
   MULTI-FILE QUEUE UI  —  .fq-* component namespace
   All selectors are scoped to .fq-* to prevent collision with existing
   .yt-* upload modal styles.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Queue header ─────────────────────────────────────────────────────────── */
.fq-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 10px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 10px;
}
 
.fq-queue-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);                        /* FIX: was --color-text-primary */
}
 
.fq-queue-count {
  font-size: 12px;
  color: var(--text3);                       /* FIX: was --color-text-tertiary */
}
 
/* ── Scrollable card list ─────────────────────────────────────────────────── */
.fq-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent; /* FIX: was --color-border-secondary */
  padding-right: 2px;
}
 
.fq-card-list::-webkit-scrollbar        { width: 4px; }
.fq-card-list::-webkit-scrollbar-track  { background: transparent; }
.fq-card-list::-webkit-scrollbar-thumb  {
  background: var(--border2);               /* FIX: was --color-border-secondary */
  border-radius: 2px;
}
 
/* ── Individual file card ─────────────────────────────────────────────────── */
.fq-card {
  background: var(--surface);               /* FIX: was --color-background-primary */
  border: 0.5px solid var(--border);        /* FIX: was --color-border-tertiary */
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fq-card-enter 0.18s ease-out both;
}
 
.fq-card[data-state="queued"] {
  opacity: 0.65;
}
 
.fq-card[data-state="done"]  { border-left: 2px solid var(--green); }  /* FIX: was --color-border-success */
.fq-card[data-state="error"] { border-left: 2px solid #ff5252; }        /* FIX: was --color-border-danger */
 
@keyframes fq-card-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
 
/* ── Card top row ─────────────────────────────────────────────────────────── */
.fq-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
 
/* Thumbnail — 16:9 fixed container */
.fq-thumb {
  width: 56px;
  height: 36px;
  border-radius: 5px;
  background: var(--surface2);              /* FIX: was --color-background-secondary */
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.fq-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}
 
.fq-thumb-icon {
  width: 16px;
  height: 16px;
  stroke: var(--text3);                     /* FIX: was --color-text-tertiary */
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
 
/* File name + size meta block */
.fq-meta {
  flex: 1;
  min-width: 0;
}
 
.fq-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);                       /* FIX: was --color-text-primary */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.fq-size {
  font-size: 11px;
  color: var(--text3);                      /* FIX: was --color-text-tertiary */
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
/* ── Status badge ─────────────────────────────────────────────────────────── */
.fq-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}
 
.fq-badge[data-state="queued"] {
  background: var(--surface2);              /* FIX: was --color-background-secondary */
  color: var(--text3);                      /* FIX: was --color-text-tertiary */
}
 
.fq-badge[data-state="uploading"] {
  background: rgba(62, 166, 255, 0.12);    /* FIX: was --color-background-info */
  color: var(--blue);                       /* FIX: was --color-text-info */
}
 
.fq-badge[data-state="processing"] {
  background: rgba(255, 214, 0, 0.10);     /* FIX: was --color-background-warning */
  color: var(--amber);                      /* FIX: was --color-text-warning */
}
 
.fq-badge[data-state="done"] {
  background: rgba(76, 175, 80, 0.12);     /* FIX: was --color-background-success */
  color: var(--green);                      /* FIX: was --color-text-success */
}
 
.fq-badge[data-state="error"] {
  background: rgba(255, 82, 82, 0.12);     /* FIX: was --color-background-danger */
  color: #ff5252;                           /* FIX: was --color-text-danger */
}
 
/* ── Per-card remove / cancel button ─────────────────────────────────────── */
.fq-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  color: var(--text3);                      /* FIX: was --color-text-tertiary */
  transition: background 0.15s ease, color 0.15s ease;
}
 
.fq-remove-btn:hover {
  background: var(--surface2);              /* FIX: was --color-background-secondary */
  color: var(--text);                       /* FIX: was --color-text-primary */
}
 
.fq-remove-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
 
.fq-card[data-state="done"]       .fq-remove-btn,
.fq-card[data-state="processing"] .fq-remove-btn {
  display: none;
}
 
/* ── Progress row ─────────────────────────────────────────────────────────── */
.fq-progress-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
 
.fq-card[data-state="queued"] .fq-progress-row {
  display: none;
}
 
/* ── Progress track ───────────────────────────────────────────────────────── */
.fq-progress-track {
  height: 3px;
  border-radius: 2px;
  background: var(--border);               /* FIX: was --color-border-tertiary */
  overflow: hidden;
}
 
.fq-progress-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width 0.35s ease, background-color 0.2s ease;
}
 
/* Uploading: real byte-level progress, smooth transition */
.fq-progress-fill[data-state="uploading"] {
  background: var(--blue);                 /* FIX: was --color-text-info */
  transition: width 0.4s ease;
}
 
/* Processing: indeterminate animation — width forced 100% via !important */
.fq-progress-fill[data-state="processing"] {
  background: linear-gradient(
    90deg,
    transparent          0%,
    var(--blue)          30%,
    rgba(62,166,255,.6)  50%,
    var(--blue)          70%,
    transparent          100%
  );
  background-size: 200% 100%;
  width: 100% !important;
  animation: fq-indeterminate 1.6s linear infinite;
  transition: none;
}
 
/* Done: solid green full bar */
.fq-progress-fill[data-state="done"] {
  background: var(--green);               /* FIX: was --color-text-success */
  width: 100% !important;
  transition: none;
}
 
/* Error: red full bar */
.fq-progress-fill[data-state="error"] {
  background: #ff5252;                    /* FIX: was --color-text-danger */
  width: 100% !important;
  transition: none;
}
 
@keyframes fq-indeterminate {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
 
/* ── Bottom row: stage + bytes + percentage ───────────────────────────────── */
.fq-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
 
.fq-stage {
  font-size: 11px;
  color: var(--text2);                     /* FIX: was --color-text-secondary */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.fq-pct {
  font-size: 11px;
  color: var(--text3);                     /* FIX: was --color-text-tertiary */
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
 
.fq-bytes {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);                     /* FIX: was --color-text-tertiary */
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
 
/* Hide bytes label when not uploading */
.fq-card[data-state="processing"] .fq-bytes,
.fq-card[data-state="done"]       .fq-bytes,
.fq-card[data-state="error"]      .fq-bytes {
  opacity: 0;
  pointer-events: none;
}
 
/* State-specific percentage colours */
.fq-card[data-state="uploading"]  .fq-pct { color: var(--blue);   }
.fq-card[data-state="processing"] .fq-pct { color: var(--amber);  }
.fq-card[data-state="done"]       .fq-pct { color: var(--green);  }
.fq-card[data-state="error"]      .fq-pct { color: #ff5252;       }

/* ── fq-card pause state ──────────────────────────────────────────────────── */

.fq-card[data-state="paused"] {
  opacity: 0.75;
}

.fq-progress-fill[data-state="paused"] {
  /* Freeze the bar at current position — no animation, no transition */
  background: var(--blue);
  opacity: 0.45;
  transition: none;
  /* width is left as-is by JS — shows exactly where upload stopped */
}

.fq-card[data-state="paused"] .fq-pct {
  color: var(--text3);
}

.fq-badge[data-state="paused"] {
  background: var(--surface3);
  color: var(--text3);
}

/* ── Job row pause / resume buttons ──────────────────────────────────────── */

.job-pause,
.job-resume {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.15s, opacity 0.15s;
  flex-shrink: 0;
  opacity: 0.7;
}

.job-pause  { color: var(--text2); }
.job-resume { color: var(--blue);  }

.job-pause:hover  { opacity: 1; color: var(--amber); }
.job-resume:hover { opacity: 1; }

/* job-fill paused state */
.job-fill.paused {
  background: linear-gradient(90deg, var(--accent2), var(--blue));
  opacity: 0.45;
}

/* job-pct paused state */
.job-pct.paused { color: var(--text3); }

/* ── Modal footer pause button ───────────────────────────────────────────── */

.yt-btn-pause {
  min-width: 68px;
  transition: color 0.15s, background 0.15s;
}

.yt-btn-pause.paused {
  color: var(--blue);
}

.yt-btn-pause.paused:hover {
  background: rgba(62, 166, 255, 0.08);
}

/* ── §1  DONE button state transitions ────────────────────────────────────── */
 
/*
  The DONE button cycles through four visual states driven by JS class toggling
  on #uploadBtn. The base .yt-btn-primary styles remain unchanged; these rules
  layer on top using the [aria-busy] and .done class already managed by the
  existing codebase, plus new states for the save feedback.
*/
 
/* Saving state: dimmed, pulsing border, spinner inside (spinner via HTML) */
#uploadBtn[aria-busy="true"] {
  background:   rgba(62, 166, 255, 0.55);
  border:       1.5px solid rgba(62, 166, 255, 0.4);
  cursor:       not-allowed;
  animation:    metadata-btn-pulse 1.4s ease infinite;
}
 
@keyframes metadata-btn-pulse {
  0%, 100% { opacity: 1;    }
  50%       { opacity: 0.65; }
}
 
/* Saved state: green — layered on top of existing .yt-btn-primary.done */
#uploadBtn.done[aria-disabled="false"] {
  background:   var(--green);
  border-color: var(--green);
  /* Brief scale-up pop to celebrate the save */
  animation:    metadata-saved-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
 
@keyframes metadata-saved-pop {
  from { transform: scale(0.92); opacity: 0.7; }
  to   { transform: scale(1);    opacity: 1;   }
}
 
/* Error / retry state */
#uploadBtn:not(.done)[data-save-error="true"] {
  background:   rgba(255, 82, 82, 0.18);
  border:       1px solid rgba(255, 82, 82, 0.55);
  color:        #ff5252;
}
#uploadBtn:not(.done)[data-save-error="true"]:hover {
  background:   rgba(255, 82, 82, 0.28);
}
 
/* ── §2  Form field validation error state ────────────────────────────────── */
 
/*
  Applied via JS:  inputEl.style.borderColor = 'rgba(255,82,82,0.8)'
  The transition makes the highlight feel less abrupt.
*/
.yt-form-input[aria-invalid="true"],
.yt-form-textarea[aria-invalid="true"] {
  border-color:  rgba(255, 82, 82, 0.8) !important;
  box-shadow:    0 0 0 2px rgba(255, 82, 82, 0.12);
  transition:    border-color 0.15s ease, box-shadow 0.15s ease;
}
 
/* Clearing an error: smooth fade back to normal border */
.yt-form-input:not([aria-invalid]),
.yt-form-textarea:not([aria-invalid]) {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
 
/* Focus state always wins over error state — keyboard users need the outline */
.yt-form-input:focus,
.yt-form-textarea:focus {
  border-color: var(--blue) !important;
  box-shadow:   0 0 0 2px rgba(62, 166, 255, 0.15);
  outline:      none;
}
 
/* ── §3  Inline field error message ──────────────────────────────────────── */
 
/*
  The error <div> is injected by MetadataSubmitter._setFieldError() with
  inline styles for positioning. These rules add the entrance animation.
  The element has role="alert" — no CSS needed for announcement.
*/
[id$="Error"][role="alert"] {
  animation: metadata-err-slide 0.2s ease both;
}
 
@keyframes metadata-err-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0);    }
}
 
/* ── §4  Details form separator when shown after upload ─────────────────── */
 
/*
  When ytDetailsForm transitions from hidden to visible (after upload 100%),
  the top border and margin create a clean visual break from the queue cards.
  The JS sets these as inline styles; these rules are fallback/override.
*/
#ytDetailsForm[style*="display: block"],
#ytDetailsForm[style*="display:block"] {
  animation: metadata-form-reveal 0.3s ease both;
}
 
@keyframes metadata-form-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}
 
/* ── §5  Char counter: warn when near limit ──────────────────────────────── */
 
/*
  The char count spans (#ytTitleCount, #ytDescCount) show remaining characters.
  Highlight them when near the limit — matches YouTube's behavior.
  Thresholds handled via JS data attribute.
*/
.yt-char-count[data-warn="true"] {
  color: var(--amber) !important;
  font-weight: 500;
  transition: color 0.2s ease;
}
 
.yt-char-count[data-limit="true"] {
  color: #ff5252 !important;
  font-weight: 600;
}
 
/* ── §6  Enhanced focus-visible on form inputs ───────────────────────────── */
 
/*
  Browsers style :focus-visible by default, but our existing .yt-form-input:focus
  rule removes outline: none. Restore accessible focus ring for keyboard users
  who navigate via Tab.
*/
.yt-form-input:focus-visible,
.yt-form-textarea:focus-visible {
  outline:        2px solid var(--blue);
  outline-offset: 1px;
}
 
/* ── §7  Footer left status text during save ─────────────────────────────── */
 
/*
  #ytFooterLeft shows contextual status. During save, JS sets its textContent.
  Add a subtle transition so the text change feels less abrupt.
*/
#ytFooterLeft {
  transition: opacity 0.2s ease;
}
 
/* When JS is actively updating the footer (aria-busy on the modal) */
#uploadModal[aria-busy="true"] #ytFooterLeft {
  opacity: 0.6;
}
 
/* ── §8  Reduced motion overrides ────────────────────────────────────────── */
 
@media (prefers-reduced-motion: reduce) {
  #uploadBtn[aria-busy="true"]             { animation: none; opacity: 0.7; }
  #uploadBtn.done[aria-disabled="false"]   { animation: none; }
  [id$="Error"][role="alert"]              { animation: none; }
  #ytDetailsForm[style*="display"]         { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   EDIT METADATA MODAL
   ══════════════════════════════════════════════════════════════ */

.edit-meta-modal {
  width: 420px;
  padding: 0;
  overflow: hidden;
}

.edit-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.edit-meta-header .confirm-modal-title {
  margin-bottom: 0;
  font-size: 15px;
}

.edit-meta-error {
  margin: 0 20px;
  margin-top: 14px;
  padding: 9px 12px;
  background: rgba(255, 82, 82, 0.10);
  border: 1px solid rgba(255, 82, 82, 0.30);
  border-radius: 6px;
  font-size: 12px;
  color: #ff5252;
  font-family: var(--mono);
  animation: metadata-err-slide 0.2s ease both;
}

.edit-meta-modal .yt-form-row {
  padding: 0 20px;
  margin-bottom: 16px;
}

.edit-meta-modal .yt-form-row:first-of-type {
  padding-top: 18px;
}

.edit-meta-modal .confirm-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.edit-meta-save-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
}

.edit-meta-save-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.edit-meta-save-btn:hover:not(:disabled) {
  background: #2196f3;
}

.edit-meta-save-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.edit-meta-save-btn.saved {
  background: var(--green);
}

.edit-meta-save-btn.saved:hover {
  background: #43a047;
}
/* ════════════════════════════════════════════════════════════════════════════
   PUBLISH / REVIEW PANEL  (Step 4)
   ════════════════════════════════════════════════════════════════════════════ */

/* Step 4 line — same as ytLine1/2 */
#ytLine3 {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background .3s;
}
#ytLine3.done { background: var(--green); }

/* Two-column layout */
.yt-publish-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 420px;
  animation: pub-fadein .25s ease;
}

@keyframes pub-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* Left column */
.pub-left {
  padding: 24px 20px 24px 24px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: 560px;
}

/* Right column */
.pub-right {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 560px;
}

/* "Video is ready" badge */
.pub-ready-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green, #22c55e);
  margin-bottom: 20px;
  padding: 8px 12px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: 8px;
}

/* Required asterisk */
.pub-required { color: #f44; }

.pub-form-section { margin-bottom: 4px; }

/* Thumbnail area */
.pub-thumb-area {
  margin-top: 4px;
}

/* Section headings in right column */
.pub-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}
.pub-section-title--mt { margin-top: 20px; }

/* Tighter radio group inside publish panel */
.pub-radio-group {
  gap: 6px;
}

/* Notify row */
.pub-notify-row {
  margin-top: 20px;
}

/* Action buttons at bottom of right column */
.pub-actions {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-publish-btn {
  width: 100%;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.pub-skip-btn {
  width: 100%;
  justify-content: center;
  font-size: 13px;
}

/* Responsive: stack columns on narrow modal */
@media (max-width: 640px) {
  .yt-publish-panel {
    grid-template-columns: 1fr;
  }
  .pub-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
  .pub-right {
    max-height: none;
  }
}
/* ════════════════════════════════════════════════════════════════════════════
   AMBIENT MODE GLOW
   JS প্রতি 100ms-এ --ambient-r/g/b CSS variable আপডেট করে।
   .player-wrap::before pseudo-element দিয়ে blurred glow দেখানো হয়।
   ════════════════════════════════════════════════════════════════════════════ */

.player-wrap {
  /* ambient variables — JS সেট করবে */
  --ambient-r: 0;
  --ambient-g: 0;
  --ambient-b: 0;
}

/* glow layer — player-wrap-এর পিছনে, blur দিয়ে ছড়িয়ে দেওয়া */
.player-wrap::before {
  content: '';
  position: absolute;
  inset: -30px;
  z-index: -1;
  border-radius: inherit;
  background: rgb(
    var(--ambient-r),
    var(--ambient-g),
    var(--ambient-b)
  );
  opacity: 0;
  filter: blur(40px) saturate(1.6);
  transition:
    background 0.4s ease,
    opacity    0.6s ease;
  pointer-events: none;
}

/* ambient চালু হলে glow দেখাও */
.player-wrap.ambient-active::before {
  opacity: var(--ambient-opacity, 0.65);
}

/* paused state-এ glow একটু কমাও */
.player-wrap.ambient-active.vc-paused::before {
  opacity: 0.35;
}

.player-wrap.ambient-active {
  overflow: visible;
}
/* ══════════════════════════════════════════════════════════════════════════
   Player metadata UI — v3.2  (stats row · share btn · description expander)
   ══════════════════════════════════════════════════════════════════════════ */

/* Title row — flex so share button sits to the right */
.meta-title-row {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px;
}
.meta-title-row .video-title { flex: 1; margin-bottom: 0; }

/* Share button */
.meta-share-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text2); font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
  margin-top: 3px;
}
.meta-share-btn:hover { background: var(--surface3, var(--surface2)); color: var(--text); border-color: var(--text3); }
.meta-share-btn svg   { width: 13px; height: 13px; stroke-width: 2; flex-shrink: 0; }
.meta-share-btn--ok   { background: rgba(29,158,117,.15) !important; color: var(--green) !important; border-color: rgba(29,158,117,.4) !important; }
.meta-share-btn--err  { background: rgba(226,75,74,.12)  !important; color: var(--red)   !important; border-color: rgba(226,75,74,.3)  !important; }

/* Stats row (views · likes · date) */
.meta-stats-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 10px; font-size: 13px; color: var(--text2); margin: 6px 0 10px;
}
.meta-stat       { display: flex; align-items: center; gap: 4px; }
.meta-stat svg   { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.meta-stat-dot   { color: var(--text3); line-height: 1; }

/* Description expander */
.meta-desc-wrap  { margin-bottom: 14px; }
.meta-desc-text  { font-size: 13.5px; color: var(--text2); line-height: 1.65; white-space: pre-wrap; word-break: break-word; margin: 0 0 4px; }
.meta-desc-collapsed { display: -webkit-box; -webkit-line-clamp: 3; line-clamp:none; -webkit-box-orient: vertical; overflow: hidden; }
.meta-desc-toggle    { background: none; border: none; padding: 0; font-size: 13px; font-weight: 500; color: var(--text3); cursor: pointer; transition: color .15s; }
.meta-desc-toggle:hover { color: var(--text); }

/* Encrypted badge */
.badge-enc { background: rgba(239,159,39,.1); color: var(--amber); border: 1px solid rgba(239,159,39,.3); }

/* Responsive */
@media (max-width: 480px) {
  .meta-title-row   { flex-direction: column; align-items: flex-start; }
  .meta-share-btn   { align-self: flex-start; }
  .meta-stats-row   { font-size: 12px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Share Modal  (Link + Embed tabs)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Backdrop override — share modal sits above everything */
.share-modal-backdrop { z-index: 9999; }

/* Modal shell — narrower than upload modal */
.share-modal {
  max-width: 520px;
  min-height: 0;
}

/* ── Tab bar ── */
.share-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.share-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text3); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.share-tab svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.share-tab:hover { color: var(--text2); }
.share-tab--active {
  color: var(--text);
  border-bottom-color: var(--blue, #3ea6ff);
}

/* ── Panel ── */
.share-panel {
  padding: 20px 20px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.share-panel--hidden { display: none !important; }

.share-panel-desc {
  margin: 0;
  font-size: 13px; color: var(--text3); line-height: 1.5;
}

/* ── Input + copy row ── */
.share-input-row {
  display: flex; gap: 8px; align-items: stretch;
}

.share-url-input {
  flex: 1;
  background: var(--surface2, #333);
  border: 1px solid var(--border2, #444);
  border-radius: 8px;
  color: var(--text);
  font-size: 12.5px;
  font-family: var(--mono, monospace);
  padding: 9px 12px;
  outline: none;
  resize: none;
  cursor: text;
  transition: border-color .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.share-url-input:focus {
  border-color: var(--blue, #3ea6ff);
}

/* Textarea variant for embed code */
.share-embed-textarea {
  white-space: pre-wrap;
  overflow: auto;
  height: 180px;
  line-height: 1.55;
}

/* Copy button */
.share-copy-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px;
  background: var(--blue, #3ea6ff);
  border: none; border-radius: 8px;
  color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s, opacity .15s;
}
.share-copy-btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.share-copy-btn:hover  { background: var(--blue-hover, #5bb6ff); }
.share-copy-btn:disabled { opacity: .75; cursor: default; }
.share-copy-btn--ok    {
  background: rgba(29,158,117,.85) !important;
}

/* ── Embed size selector ── */
.share-embed-preview-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.share-embed-hint {
  font-size: 12px; color: var(--text3); white-space: nowrap;
}
.share-embed-size-btns {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.share-size-btn {
  padding: 4px 10px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text3); font-size: 11.5px; font-family: var(--mono, monospace);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.share-size-btn:hover { color: var(--text); border-color: var(--text3); }
.share-size-btn--active {
  background: rgba(62,166,255,.12);
  color: var(--blue, #3ea6ff);
  border-color: rgba(62,166,255,.4);
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .share-modal { max-width: 100%; border-radius: 12px 12px 0 0; }
  .share-modal-backdrop { align-items: flex-end; }
  .share-copy-btn { padding: 0 12px; font-size: 12px; }
  .share-tab { padding: 10px 12px; font-size: 12px; }
}