/* ==========================================================================
   WorkReader Pro — Stealth YouTube Viewer Engine (0s Instant Client Embed)
   Camouflaged for CapCut, Canva, PowerPoint, Photoshop & Premiere
   ========================================================================== */

/* 1. Universal Stealth Video Wrapper */
.stealth-yt-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 80;
  border-radius: 4px;
  user-select: none;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

/* Hide when Boss Key is active */
.stealth-yt-wrapper.boss-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.98);
}

/* 2. YouTube Iframe Precision Cropping (Che 100% logo, title, top & bottom branding) */
.stealth-yt-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000000;
}

.stealth-yt-iframe {
  position: absolute;
  /* Top crop -48px cuts off YouTube title, channel avatar & share button */
  top: -48px;
  left: -2px;
  width: calc(100% + 4px);
  /* Extra height ensures bottom logo & watch-later buttons remain clipped */
  height: calc(100% + 80px);
  border: none !important;
  background: transparent;
  pointer-events: auto;
  z-index: 1;
}

/* 3. Top Camouflage Curtains (Disguised App Overlays) */
.stealth-yt-top-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
}

.stealth-yt-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.3px;
  pointer-events: auto;
}

.stealth-yt-tag .rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-rec 1.8s infinite;
}

@keyframes pulse-rec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.stealth-yt-status-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
}

/* 4. Bottom Disguised Playback Control Bar */
.stealth-yt-ctrl-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(0deg, rgba(10,12,18,0.95) 0%, rgba(10,12,18,0.7) 70%, transparent 100%);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.stealth-yt-ctrl-bar:hover {
  opacity: 1;
}

.stealth-yt-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.stealth-yt-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.stealth-yt-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.stealth-yt-timeline-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.stealth-yt-timeline-fill {
  height: 100%;
  width: 35%;
  background: #00d18f;
  border-radius: 2px;
  position: relative;
  transition: width 0.1s linear;
}

.stealth-yt-timecode {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.stealth-yt-change-src-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.stealth-yt-change-src-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   APP SPECIFIC CAMOUFLAGE THEMES
   ========================================================================== */

/* --- A. CAPCUT PRO SHELL --- */
.theme-capcut .stealth-yt-wrapper {
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.theme-capcut .stealth-yt-tag {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: #00f2fe;
}

.theme-capcut .stealth-yt-timeline-fill {
  background: #00d18f !important; /* CapCut Teal/Green Timeline Accent */
}

/* Highlight CapCut native V1 timeline clip */
.theme-capcut .cc-timeline .cc-clip.video-clip.yt-active-clip {
  background: linear-gradient(90deg, #00d18f, #00b377) !important;
  border: 1.5px solid #00f2fe !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.35);
  color: #ffffff !important;
  font-weight: 600;
}

/* --- B. CANVA DESIGN SHELL --- */
.theme-canva .stealth-yt-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 24px;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  border: 2px solid #7d2ae8; /* Canva Selection Frame */
}

.theme-canva .stealth-yt-top-overlay {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 42px;
  border-bottom: 1px solid #e2e8f0;
}

.theme-canva .canva-yt-floating-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.theme-canva .canva-tool-chip {
  padding: 4px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
}

.theme-canva .canva-tool-chip.pro {
  color: #7d2ae8;
  font-weight: 700;
}

.theme-canva .stealth-yt-timeline-fill {
  background: #7d2ae8 !important; /* Canva Purple Accent */
}

/* Canva 8 Selection Resize Handles */
.theme-canva .canva-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 2px solid #7d2ae8;
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
}
.theme-canva .canva-handle.tl { top: -6px; left: -6px; }
.theme-canva .canva-handle.tr { top: -6px; right: -6px; }
.theme-canva .canva-handle.bl { bottom: -6px; left: -6px; }
.theme-canva .canva-handle.br { bottom: -6px; right: -6px; }

/* --- C. POWERPOINT SHELL --- */
.theme-powerpoint .stealth-yt-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  border: 2px dashed #d24726; /* PowerPoint Video Selection */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.theme-powerpoint .stealth-yt-top-overlay {
  background: #f3f4f6;
  color: #1f2937;
  border-bottom: 1px solid #d1d5db;
  height: 36px;
}

.theme-powerpoint .ppt-video-format-tag {
  background: #d24726;
  color: #ffffff;
  font-weight: 700;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 3px;
}

.theme-powerpoint .stealth-yt-ctrl-bar {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  color: #111827;
}

.theme-powerpoint .stealth-yt-btn {
  color: #374151;
}
.theme-powerpoint .stealth-yt-btn:hover {
  background: #e5e7eb;
}

.theme-powerpoint .stealth-yt-timecode {
  color: #374151;
}

.theme-powerpoint .stealth-yt-timeline-track {
  background: #e5e7eb;
}

.theme-powerpoint .stealth-yt-timeline-fill {
  background: #d24726 !important; /* PowerPoint Orange Accent */
}

.theme-powerpoint .stealth-yt-change-src-btn {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

/* PowerPoint Selection 8 White Square Handles */
.theme-powerpoint .ppt-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ffffff;
  border: 1px solid #333333;
  z-index: 20;
  pointer-events: none;
}
.theme-powerpoint .ppt-handle.tl { top: -5px; left: -5px; }
.theme-powerpoint .ppt-handle.tc { top: -5px; left: 50%; transform: translateX(-50%); }
.theme-powerpoint .ppt-handle.tr { top: -5px; right: -5px; }
.theme-powerpoint .ppt-handle.ml { top: 50%; left: -5px; transform: translateY(-50%); }
.theme-powerpoint .ppt-handle.mr { top: 50%; right: -5px; transform: translateY(-50%); }
.theme-powerpoint .ppt-handle.bl { bottom: -5px; left: -5px; }
.theme-powerpoint .ppt-handle.bc { bottom: -5px; left: 50%; transform: translateX(-50%); }
.theme-powerpoint .ppt-handle.br { bottom: -5px; right: -5px; }

/* --- D. PHOTOSHOP SHELL --- */
.theme-photoshop .stealth-yt-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1.5px solid #31a8ff; /* Photoshop Cyan Transform Bounding Box */
  box-shadow: 0 0 16px rgba(49, 168, 255, 0.25);
}

.theme-photoshop .stealth-yt-top-overlay {
  background: #262626;
  border-bottom: 1px solid #383838;
  color: #cccccc;
}

.theme-photoshop .ps-yt-hud-chip {
  color: #31a8ff;
  font-family: Consolas, monospace;
  font-size: 10.5px;
  font-weight: 600;
}

.theme-photoshop .stealth-yt-timeline-fill {
  background: #31a8ff !important; /* Photoshop Blue Accent */
}

/* Photoshop Cyan Square Corner Handles */
.theme-photoshop .ps-handle-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #ffffff;
  border: 1px solid #000000;
  z-index: 20;
  pointer-events: none;
}
.theme-photoshop .ps-handle-dot.tl { top: -4px; left: -4px; }
.theme-photoshop .ps-handle-dot.tr { top: -4px; right: -4px; }
.theme-photoshop .ps-handle-dot.bl { bottom: -4px; left: -4px; }
.theme-photoshop .ps-handle-dot.br { bottom: -4px; right: -4px; }

/* --- E. PREMIERE PRO SHELL (BONUS) --- */
.theme-premiere .stealth-yt-wrapper {
  border: 1.5px solid rgba(153, 153, 255, 0.4);
}

.theme-premiere .stealth-yt-tag {
  background: rgba(10, 18, 38, 0.9);
  border: 1px solid #9999ff;
  color: #9999ff;
}

.theme-premiere .stealth-yt-timeline-fill {
  background: #9999ff !important;
}

/* --- F. ZALO CHAT MESSAGE SHELL --- */
.theme-zalo .zalo-yt-msg-row {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 16px;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  animation: yt-fade-in 0.2s ease-out;
}

.theme-zalo .zalo-yt-chat-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 440px;
  width: 100%;
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-zalo .zalo-yt-chat-card-wrap.is-expanded {
  max-width: 640px !important;
}

.theme-zalo .zalo-yt-video-card {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  background: #000000;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  z-index: 10;
}

.theme-zalo .zalo-yt-video-card.is-expanded {
  max-width: 640px !important;
}

.theme-zalo .zalo-yt-card-header {
  height: 34px;
  background: #18191c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.theme-zalo .zalo-yt-card-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.theme-zalo .zalo-yt-brand-icon {
  flex-shrink: 0;
}

.theme-zalo .zalo-yt-card-domain {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.theme-zalo .zalo-yt-card-title-clip {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.theme-zalo .zalo-yt-card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-zalo .zalo-yt-card-head-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.theme-zalo .zalo-yt-card-head-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.theme-zalo .zalo-yt-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
}

.theme-zalo .zalo-yt-viewport .stealth-yt-iframe {
  position: absolute;
  top: -46px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 78px);
  border: none;
}

.theme-zalo .zalo-yt-ctrl-bar {
  height: 36px;
  background: #18191c;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-zalo .stealth-yt-timeline-fill {
  background: #0068ff !important; /* Zalo Blue */
}

.theme-zalo .zalo-tool-video {
  color: #0068ff !important;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.theme-zalo .zalo-tool-video:hover {
  background: rgba(0, 104, 255, 0.12);
  border-radius: 4px;
  transform: scale(1.08);
}

.theme-zalo .zalo-chat-input {
  cursor: text !important;
  user-select: text !important;
}

/* ==========================================================================
   DISGUISED INPUT MODAL (CUSTOMIZED FOR EACH APP SHELL)
   ========================================================================== */

.stealth-yt-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: yt-fade-in 0.15s ease-out;
}

@keyframes yt-fade-in {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.stealth-yt-modal-card {
  width: 100%;
  max-width: 580px;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Modal Themes */
.stealth-yt-modal-card.dark-theme {
  background: #14171f;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.stealth-yt-modal-card.light-theme {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.stealth-yt-modal-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stealth-yt-modal-card.light-theme .stealth-yt-modal-header {
  border-bottom-color: #e2e8f0;
}

.stealth-yt-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stealth-yt-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stealth-yt-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.stealth-yt-modal-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  opacity: 0.7;
}

.stealth-yt-modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
  color: inherit;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.stealth-yt-modal-close:hover {
  opacity: 1;
  background: rgba(125, 125, 125, 0.15);
}

.stealth-yt-modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stealth-yt-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.stealth-yt-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-size: 13.5px;
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.stealth-yt-modal-card.dark-theme .stealth-yt-input {
  background: #0b0d13;
  color: #fff;
  border: 1.5px solid #2d3345;
}
.stealth-yt-modal-card.dark-theme .stealth-yt-input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.2);
}

.stealth-yt-modal-card.light-theme .stealth-yt-input {
  background: #f8fafc;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
}
.stealth-yt-modal-card.light-theme .stealth-yt-input:focus {
  border-color: #7d2ae8;
  box-shadow: 0 0 0 3px rgba(125, 42, 232, 0.18);
}

.stealth-yt-input-icon {
  position: absolute;
  left: 12px;
  opacity: 0.5;
  pointer-events: none;
  font-size: 16px;
}

.stealth-yt-parse-badge {
  font-size: 11.5px;
  padding: 6px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.stealth-yt-parse-badge.ready {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stealth-yt-parse-badge.waiting {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
  border: 1px dashed rgba(100, 116, 139, 0.3);
}

.stealth-yt-samples-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stealth-yt-samples-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stealth-yt-samples-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stealth-yt-sample-chip {
  background: rgba(125, 125, 125, 0.1);
  border: 1px solid rgba(125, 125, 125, 0.2);
  color: inherit;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.stealth-yt-sample-chip:hover {
  background: rgba(125, 125, 125, 0.2);
  transform: translateY(-1px);
}

.stealth-yt-modal-footer {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.stealth-yt-modal-card.light-theme .stealth-yt-modal-footer {
  border-top-color: #e2e8f0;
}

.stealth-yt-boss-hint {
  font-size: 11px;
  opacity: 0.65;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stealth-yt-boss-hint kbd {
  background: rgba(125, 125, 125, 0.2);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 10px;
}

.stealth-yt-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stealth-yt-btn-cancel {
  background: transparent;
  border: 1px solid rgba(125, 125, 125, 0.3);
  color: inherit;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stealth-yt-btn-cancel:hover {
  background: rgba(125, 125, 125, 0.1);
}

.stealth-yt-btn-submit {
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
}

.stealth-yt-btn-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.stealth-yt-btn-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* App Button Color Themes */
.theme-capcut .stealth-yt-btn-submit { background: #00d18f; }
.theme-canva .stealth-yt-btn-submit { background: #7d2ae8; }
.theme-powerpoint .stealth-yt-btn-submit { background: #d24726; }
.theme-photoshop .stealth-yt-btn-submit { background: #31a8ff; color: #000; }
.theme-premiere .stealth-yt-btn-submit { background: #9999ff; color: #000; }
.theme-zalo .stealth-yt-btn-submit { background: #0068ff; color: #fff; }

/* 5. Custom Menu Trigger Badges */
.stealth-yt-menu-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  letter-spacing: 0.3px;
  display: inline-block;
}

/* ==========================================================================
   LANDING PAGE YOUTUBE FILTER & DETECTION STYLES
   ========================================================================== */

.web-clipper-yt-banner {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1.5px solid #f87171;
  color: #991b1b;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.12);
  animation: yt-fade-in 0.2s ease-out;
}

.web-clipper-yt-banner .yt-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.web-clipper-yt-banner .yt-banner-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.web-clipper-yt-banner .yt-banner-title {
  font-weight: 700;
  color: #7f1d1d;
  font-size: 13px;
}

.web-clipper-yt-banner .yt-banner-sub {
  font-size: 11.5px;
  color: #b91c1c;
  margin-top: 2px;
}

.web-clipper-yt-banner .yt-banner-action-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.web-clipper-yt-banner .yt-banner-action-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.web-clipper-extract-btn.yt-mode-active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35) !important;
}

.cruip-category-tab.yt-filter-active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

.web-clipper-tag-btn.yt-tag-btn {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
  font-weight: 600;
}

.web-clipper-tag-btn.yt-tag-btn:hover {
  background: #ffe4e6 !important;
  border-color: #fb7185 !important;
}

.duo-mission-item.is-yt-supported {
  border-color: #f87171 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15) !important;
}

.duo-mission-item.is-yt-supported::after {
  content: '★ Hỗ trợ YouTube 0s';
  position: absolute;
  top: 8px;
  right: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  z-index: 5;
}

/* ==========================================================================
   9. DECOUPLED MODE SWITCHER (Story Mode vs. YouTube Mode)
   ========================================================================== */
.stealth-mode-selector-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .stealth-mode-selector-bar {
    grid-template-columns: 1fr;
  }
}

.stealth-mode-selector-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.stealth-mode-selector-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: background 0.2s ease;
}

.stealth-mode-selector-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  border-color: #cbd5e1;
}

.stealth-mode-selector-btn.active#btn-mode-story {
  border-color: #4f46e5;
  background: #fbfbfe;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

.stealth-mode-selector-btn.active#btn-mode-story::before {
  background: linear-gradient(90deg, #4f46e5, #6366f1);
}

.stealth-mode-selector-btn.active#btn-mode-youtube {
  border-color: #dc2626;
  background: #fffafa;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.14);
}

.stealth-mode-selector-btn.active#btn-mode-youtube::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.mode-btn-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mode-btn-icon-wrap.story-icon {
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
}

.stealth-mode-selector-btn.active .mode-btn-icon-wrap.story-icon {
  background: #4f46e5;
  color: #ffffff;
}

.mode-btn-icon-wrap.yt-icon {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.stealth-mode-selector-btn.active .mode-btn-icon-wrap.yt-icon {
  background: #dc2626;
  color: #ffffff;
}

.mode-btn-meta {
  flex: 1;
  min-width: 0;
}

.mode-btn-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mode-btn-title {
  font-size: 15px;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.mode-btn-badge {
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.mode-btn-badge.badge-story {
  background: #e0e7ff;
  color: #3730a3;
}

.mode-btn-badge.badge-yt {
  background: #fee2e2;
  color: #991b1b;
}

.mode-btn-desc {
  font-size: 12.5px;
  color: #64748b;
  display: block;
  line-height: 1.4;
}

/* Panel transitions */
.mode-flow-panel {
  display: block;
  animation: fadeInFlow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-flow-panel.flow-panel-hidden {
  display: none !important;
}

@keyframes fadeInFlow {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dedicated YouTube Standalone Card */
.yt-standalone-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffbfb 100%);
  border: 1.5px solid #fecaca;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.06);
}

.yt-standalone-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.yt-standalone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.yt-standalone-title-group h3 {
  font-size: 17px;
  font-weight: 750;
  color: #111827;
  margin: 0;
}

.yt-standalone-title-group p {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0;
}

.yt-standalone-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px 6px 4px 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.yt-standalone-input-wrap:focus-within {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.yt-standalone-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  background: transparent;
  padding: 8px 0;
}

.yt-standalone-launch-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.3);
}

.yt-standalone-launch-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(220, 38, 38, 0.4);
}

.yt-standalone-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #fee2e2;
}

.yt-spec-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.yt-spec-pill strong {
  color: #991b1b;
}

/* Step 2 Notice Banner for YouTube Mode */
.yt-step2-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  color: #9f1239;
  font-size: 13px;
}

.yt-step2-filter-notice strong {
  color: #881337;
}

.yt-step2-reset-btn {
  background: #ffffff;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.yt-step2-reset-btn:hover {
  background: #ffe4e6;
}

/* ==========================================================================
   PURE STEALTH YOUTUBE ACTIVE STATE (Zero Story / Novel Clutter)
   ========================================================================== */
body.is-stealth-yt-active {
  padding-top: 0 !important;
}

body.is-stealth-yt-active #universal-reader-navbar,
body.is-stealth-yt-active .universal-reader-navbar,
body.is-stealth-yt-active .stealth-reading-ctrls,
body.is-stealth-yt-active #btn-toggle-ctrls-floating,
body.is-stealth-yt-active .floating-stealth-toggle,
body.is-stealth-yt-active #next-chapter-floating-btn,
body.is-stealth-yt-active #prev-chapter-floating-btn,
body.is-stealth-yt-active #web-next-chap-bar,
body.is-stealth-yt-active .web-next-chap-bar,
body.is-stealth-yt-active .reading-speed-indicator,
body.is-stealth-yt-active #floating-story-pagination,
body.is-stealth-yt-active #capcut-scroll-container,
body.is-stealth-yt-active #canva-story-stream,
body.is-stealth-yt-active .canva-research-cards-grid,
body.is-stealth-yt-active .ppt-textbox-container,
body.is-stealth-yt-active #ppt-story-stream,
body.is-stealth-yt-active .ppt-slide-content-grid,
body.is-stealth-yt-active #premiere-story-view,
body.is-stealth-yt-active #premiere-story-stream,
body.is-stealth-yt-active .ps-text-artboard,
body.is-stealth-yt-active #ps-story-stream,
body.is-stealth-yt-active #ps-prefs-dialog,
body.is-stealth-yt-active .ps-dialog-overlay,
body.is-stealth-yt-active .cc-neon-banner,
body.is-stealth-yt-active .cc-bounding-box-wrap {
  display: none !important;
}

/* Ensure active shell containers give maximum elegance to the embedded video */
.theme-powerpoint.is-stealth-yt-active .ppt-slide-sheet {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 16px 24px 28px !important;
}

.theme-powerpoint.is-stealth-yt-active .stealth-yt-wrapper {
  max-width: 860px;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 10px auto 14px;
}

.theme-canva.is-stealth-yt-active .canva-slide-deck-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 20px 24px 30px !important;
}

.theme-canva.is-stealth-yt-active .stealth-yt-wrapper {
  max-width: 860px;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 10px auto 16px;
}

.theme-photoshop.is-stealth-yt-active .ps-artboard.ps-visual-artboard {
  margin: 0 auto !important;
}

.theme-photoshop.is-stealth-yt-active .ps-comp-bg-layer,
.theme-photoshop.is-stealth-yt-active .ps-comp-mesh-art,
.theme-photoshop.is-stealth-yt-active .ps-transform-bounding-box {
  display: none !important;
}

.theme-photoshop.is-stealth-yt-active .stealth-yt-wrapper {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

