/* =========================================================
   DHURVEX PORTFOLIO — TOOLS HUB CSS
   All styles inherit site CSS variables for full theme compatibility
   ========================================================= */

/* ── Tools Hero Stats ── */
.tools-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.tools-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border-radius: 30px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    font-size: 0.83rem;
    color: var(--text-secondary);
}
.tools-stat-chip strong { color: var(--primary); font-weight: 700; }

/* ── Search & Filter Bar ── */
.tools-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}
.tools-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 420px;
}
.tools-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.tools-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-input, var(--bg-card));
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.22s, box-shadow 0.22s;
}
.tools-search-input::placeholder { color: var(--text-muted); }
.tools-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.tools-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tools-cat-chip {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tools-cat-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(212,175,55,0.08);
}
.tools-cat-chip.active {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 3px 12px var(--primary-glow);
}

/* ── Tool Cards Grid ── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.tool-card:hover {
    border-color: var(--border);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card[aria-hidden="true"] { display: none !important; }

.tool-card-icon {
    width: 48px; height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(212,175,55,0.12);
    color: var(--primary);
    border: 1px solid rgba(212,175,55,0.2);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tool-card:hover .tool-card-icon {
    transform: scale(1.12) rotate(-4deg);
    box-shadow: 0 0 18px var(--primary-glow);
}
.tool-card-cat { color: var(--primary-dark, var(--primary)); }

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tool-card-info { flex: 1; min-width: 0; }
.tool-card-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 3px;
}
.tool-card-category {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    opacity: 0.8;
}
.tool-card-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    flex: 1;
}
.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}
.tool-card-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.2s ease;
}
.tool-card:hover .tool-card-open-btn { gap: 10px; }
.tool-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.25);
    font-weight: 600;
}
.tool-badge.offline { background: rgba(99,102,241,0.12); color: #818cf8; border-color: rgba(99,102,241,0.25); }

/* ── Paid Tool Card Styles ── */
.tool-card-paid {
    position: relative;
    border-color: rgba(212,175,55,0.3);
    box-shadow: 0 0 0 1px rgba(212,175,55,0.15), 0 4px 20px rgba(212,175,55,0.08);
}
.tool-card-paid:hover {
    border-color: rgba(212,175,55,0.55);
    box-shadow: 0 0 0 1px rgba(212,175,55,0.3), 0 8px 32px rgba(212,175,55,0.14);
}
.tool-card-paid-ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(184,147,32,0.12));
    border: 1px solid rgba(212,175,55,0.4);
    color: #d4af37;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
    z-index: 1;
    pointer-events: none;
}
.tool-card-paid .tool-card-open-btn {
    color: #d4af37;
}

/* ── No Results ── */
.tools-no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.tools-no-results i { font-size: 2.8rem; opacity: 0.3; margin-bottom: 12px; display: block; }

/* ── Tool Modal / Drawer ── */
.tool-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4,6,10,0.87);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.tool-modal-backdrop.active {
    display: flex;
    opacity: 1;
}
.tool-modal {
    background: var(--bg-surface, #0d1117);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.85), 0 0 40px var(--primary-glow);
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: toolModalPop 0.22s ease-out;
}
@keyframes toolModalPop {
    from { transform: scale(0.95) translateY(12px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
.tool-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: rgba(255,255,255,0.015);
}
.tool-modal-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(212,175,55,0.12);
    color: var(--primary);
    border: 1px solid rgba(212,175,55,0.22);
    flex-shrink: 0;
}
.tool-modal-title { flex: 1; min-width: 0; }
.tool-modal-title h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px;
}
.tool-modal-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}
.tool-modal-close {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.tool-modal-close:hover { background: rgba(255,50,50,0.12); color: #ff5555; border-color: rgba(255,50,50,0.3); }

.tool-modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

/* ── Generic Tool UI Components ── */
.tool-section { margin-bottom: 18px; }
.tool-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tool-textarea, .tool-input, .tool-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-input, #0a0c10);
    color: var(--text-primary);
    font-family: 'Outfit', monospace, sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-textarea.mono { font-family: 'Courier New', 'Cascadia Code', monospace; font-size: 0.82rem; }
.tool-textarea:focus, .tool-input:focus, .tool-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.tool-textarea::placeholder, .tool-input::placeholder { color: var(--text-muted); }

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-family: inherit;
}
.tool-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(212,175,55,0.08);
    transform: translateY(-1px);
}
.tool-btn.primary {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 3px 12px var(--primary-glow);
}
.tool-btn.primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.tool-btn.danger {
    border-color: rgba(239,68,68,0.4);
    color: #ef4444;
    background: rgba(239,68,68,0.08);
}
.tool-btn.danger:hover { background: rgba(239,68,68,0.18); }
.tool-btn.success {
    border-color: rgba(16,185,129,0.4);
    color: #10b981;
    background: rgba(16,185,129,0.08);
}

.tool-output {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 60px;
    max-height: 320px;
    overflow-y: auto;
    line-height: 1.6;
}
.tool-output.success-text { color: #10b981; }
.tool-output.error-text { color: #ef4444; }
.tool-output.preview { white-space: normal; font-family: inherit; font-size: 0.88rem; }

.tool-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.tool-stat-pill {
    padding: 5px 13px;
    border-radius: 20px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.2);
    font-size: 0.79rem;
    color: var(--text-secondary);
}
.tool-stat-pill strong { color: var(--primary); }

/* Two-column layout for some tools */
.tool-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 580px) {
    .tool-two-col { grid-template-columns: 1fr; }
}

/* Slider controls */
.tool-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.tool-slider-row label { font-size: 0.82rem; color: var(--text-secondary); min-width: 90px; }
.tool-slider-row input[type=range] { flex: 1; accent-color: var(--primary); }
.tool-slider-row .tool-slider-val { font-size: 0.82rem; color: var(--primary); font-weight: 700; min-width: 40px; text-align: right; }

/* Color swatch */
.tool-color-swatch {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
}

/* Copy feedback */
.tool-copy-feedback {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #10b981;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-left: 8px;
}
.tool-copy-feedback.show { opacity: 1; }

/* Image upload area */
.tool-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
    background: rgba(255,255,255,0.02);
    position: relative;
}
.tool-drop-zone:hover, .tool-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(212,175,55,0.05);
}
.tool-drop-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%; height: 100%;
}
.tool-drop-zone i { font-size: 2rem; color: var(--primary); opacity: 0.6; margin-bottom: 10px; display: block; }
.tool-drop-zone p { font-size: 0.88rem; color: var(--text-muted); }

/* Canvas preview */
.tool-canvas-wrap {
    background: repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%) 0 0 / 20px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    overflow: hidden;
}
.tool-canvas-wrap canvas, .tool-canvas-wrap img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    object-fit: contain;
}

/* ── Tool Sub-tabs (Grade Calculator & Embedded Utilities) ── */
.tool-subtabs-wrap {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    scrollbar-width: thin;
}
.tool-subtab {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
}
.tool-subtab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
}
.tool-subtab.active {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 3px 12px var(--primary-glow);
}
.tool-subtab-pane {
    display: none;
    animation: toolPaneFade 0.2s ease-out;
}
.tool-subtab-pane.active {
    display: block;
}
@keyframes toolPaneFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Character & Text Metric Cards ── */
.tool-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.tool-metric-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.tool-metric-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.tool-metric-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    font-family: 'Outfit', system-ui, sans-serif;
}
.tool-metric-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ── QR Result & Controls ── */
.tool-qr-output {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    margin-top: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.tool-qr-output canvas, .tool-qr-output img {
    border-radius: 8px;
    max-width: 100%;
}

/* ── Social Media Size Generator & Editor ── */
.tool-size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}
.tool-size-card {
    padding: 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.tool-size-card:hover {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
}
.tool-size-card.active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 15px var(--primary-glow);
}
.tool-size-card-platform {
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 4px;
}
.tool-size-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.tool-size-card-dim {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
}
.tool-size-card-visual {
    margin: 8px auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(212, 175, 55, 0.1);
    transition: all 0.2s ease;
}
.tool-size-card.active .tool-size-card-visual {
    background: var(--primary);
    border-color: var(--primary);
}

/* Social Size Canvas Stage & Controls */
.ss-editor-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 18px;
}
@media (max-width: 700px) {
    .ss-editor-layout { grid-template-columns: 1fr; }
}
.ss-canvas-stage {
    background: repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    max-height: 380px;
    overflow: hidden;
    position: relative;
    user-select: none;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.ss-canvas-stage canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.ss-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary);
    border: 1px solid rgba(212, 175, 55, 0.25);
}
.ss-control-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.ss-color-preset {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
    display: inline-block;
    transition: transform 0.15s, border-color 0.15s;
}
.ss-color-preset:hover, .ss-color-preset.active {
    transform: scale(1.2);
    border-color: var(--primary);
}

/* Video Preview Wrapper */
.ss-video-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 340px;
}
.ss-video-wrapper video {
    width: 100%;
    height: 100%;
    max-height: 320px;
    object-fit: contain;
}

/* ── Meta Tag SERP & OG Previews ── */
.tool-serp-preview {
    background: #202124;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    font-family: Arial, sans-serif;
}
.tool-serp-site {
    font-size: 0.78rem;
    color: #bdc1c6;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tool-serp-title {
    font-size: 1.15rem;
    color: #8ab4f8;
    line-height: 1.3;
    margin-bottom: 4px;
    word-break: break-word;
    font-weight: 500;
}
.tool-serp-desc {
    font-size: 0.84rem;
    color: #bdc1c6;
    line-height: 1.4;
    word-break: break-word;
}

.tool-og-preview {
    background: #18191a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}
.tool-og-img {
    width: 100%;
    height: 180px;
    background: #242526;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    overflow: hidden;
}
.tool-og-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tool-og-body {
    padding: 12px 14px;
}
.tool-og-domain {
    font-size: 0.72rem;
    color: #b0b3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.tool-og-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e4e6eb;
    margin-bottom: 4px;
    line-height: 1.3;
}
.tool-og-desc {
    font-size: 0.82rem;
    color: #b0b3b8;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-filter-bar { flex-direction: column; align-items: stretch; }
    .tools-search-wrap { max-width: 100%; }
    .tool-modal { border-radius: 16px 16px 0 0; max-height: 94vh; }
    .tool-modal-backdrop { padding: 0; align-items: flex-end; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
}
@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tool-card { padding: 14px; }
    .tool-card-icon { width: 38px; height: 38px; font-size: 1.05rem; }
    .tool-card-title { font-size: 0.88rem; }
    .tool-card-desc { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   VIDEO EDITOR PRO — PROFESSIONAL WORKSPACE (SCOPED .ve-)
   Desktop 3-panel + Tablet collapsible + Mobile single-column
   Performance-first: NO animations on canvas, NO continuous effects
   ═══════════════════════════════════════════════════════════════════ */

/* ── Mode Switcher Nav ── */
.ve-mode-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.ve-mode-btn {
    flex: 1;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
}
.ve-mode-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.06); }
.ve-mode-btn.active { background: var(--primary-gradient); color: var(--primary-text-on); border-color: transparent; box-shadow: 0 3px 12px var(--primary-glow); }

/* ── Credit & Cost Bar ── */
.ve-credit-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(212,175,55,0.05);
    border: 1px solid rgba(212,175,55,0.18);
    margin-bottom: 14px;
    font-size: 0.79rem;
}
.ve-credit-balance { display: inline-flex; align-items: center; gap: 6px; color: var(--text-primary); font-weight: 600; }
.ve-credit-balance strong { color: var(--primary); }
.ve-cost-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(212,175,55,0.13); color: var(--primary); font-weight: 700; font-size: 0.73rem; }
.ss-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 0.71rem; font-weight: 700; background: rgba(212,175,55,0.1); color: var(--primary); border: 1px solid rgba(212,175,55,0.22); }

/* ── Prompt Card ── */
.ve-prompt-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 13px; padding: 15px; margin-bottom: 16px; transition: border-color 0.18s; }
.ve-prompt-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.ve-prompt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.ve-lang-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ve-lang-tag { font-size: 0.67rem; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,0.05); color: var(--text-muted); font-weight: 600; }
.ve-prompt-textarea { width: 100%; background: transparent; border: none; outline: none; color: var(--text-primary); font-family: inherit; font-size: 0.91rem; line-height: 1.5; resize: vertical; min-height: 68px; }
.ve-prompt-textarea::placeholder { color: var(--text-muted); }
.ve-example-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.ve-example-chip { padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-subtle); font-size: 0.73rem; color: var(--text-secondary); cursor: pointer; transition: all 0.14s; }
.ve-example-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.07); }

/* ── AI Plan Card ── */
.ve-plan-card { background: rgba(16,185,129,0.04); border: 1px solid rgba(16,185,129,0.22); border-radius: 11px; padding: 13px 15px; margin-bottom: 16px; animation: toolPaneFade 0.22s ease-out; }
.ve-plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.ve-plan-title { font-size: 0.8rem; font-weight: 700; color: #34d399; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
.ve-plan-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; }

/* ══════════════════════════════════════════════════════════════
   PROFESSIONAL DESKTOP WORKSPACE LAYOUT
   Desktop: 3-panel (left sidebar + center + right inspector)
   ══════════════════════════════════════════════════════════════ */

/* ── Top Toolbar ── */
.ve-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ve-project-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
    min-width: 100px;
}
.ve-project-name span { color: var(--primary); }
.ve-toolbar-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ve-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.77rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.ve-toolbar-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.08); }
.ve-toolbar-btn.primary { background: var(--primary-gradient); color: var(--primary-text-on); border-color: transparent; box-shadow: 0 2px 10px var(--primary-glow); }
.ve-toolbar-btn.danger { border-color: rgba(239,68,68,0.3); color: #f87171; }
.ve-toolbar-btn.danger:hover { background: rgba(239,68,68,0.1); }
.ve-toolbar-btn.active { background: rgba(212,175,55,0.15); color: var(--primary); border-color: var(--primary); }
.ve-toolbar-divider { width: 1px; height: 22px; background: var(--border-subtle); margin: 0 2px; flex-shrink: 0; }

/* Before/After badge */
.ve-before-after-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239,68,68,0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 20;
    backdrop-filter: blur(4px);
}

/* ── Main Editor Layout ── */
.ve-editor-layout {
    display: flex;
    gap: 0;
    min-height: 480px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,0.25);
    margin-bottom: 14px;
}

/* ── LEFT SIDEBAR ── */
.ve-left-sidebar {
    width: 52px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 4px;
    overflow-y: auto;
    scrollbar-width: none;
    transition: width 0.22s ease;
}
.ve-left-sidebar::-webkit-scrollbar { display: none; }

.ve-sidebar-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.98rem;
    transition: all 0.15s;
    border: 1px solid transparent;
    position: relative;
    flex-shrink: 0;
}
.ve-sidebar-icon span {
    font-size: 0.48rem;
    font-weight: 700;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}
.ve-sidebar-icon:hover { background: rgba(212,175,55,0.1); color: var(--primary); border-color: rgba(212,175,55,0.25); }
.ve-sidebar-icon.active { background: rgba(212,175,55,0.15); color: var(--primary); border-color: rgba(212,175,55,0.35); }
.ve-sidebar-divider { width: 32px; height: 1px; background: var(--border-subtle); margin: 4px 0; flex-shrink: 0; }

/* ── CENTER PREVIEW ── */
.ve-center-preview {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

.ve-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    gap: 8px;
    flex-wrap: wrap;
}
.ve-preview-header-left { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--text-muted); }
.ve-preview-header-right { display: flex; align-items: center; gap: 5px; }

.ve-stage-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 280px;
    position: relative;
    background: radial-gradient(circle at center, #111 0%, #060606 100%);
}

.ve-stage-box {
    position: relative;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
}
.ve-stage-box.aspect-9-16  { aspect-ratio: 9/16;  max-height: 460px; width: auto; }
.ve-stage-box.aspect-16-9  { aspect-ratio: 16/9; width: 100%; max-width: 680px; }
.ve-stage-box.aspect-1-1   { aspect-ratio: 1/1;   max-height: 420px; width: auto; }
.ve-stage-box.aspect-4-5   { aspect-ratio: 4/5;   max-height: 450px; width: auto; }

.ve-canvas { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Caption overlay */
.ve-caption-overlay {
    position: absolute;
    bottom: 28px;
    left: 10px;
    right: 10px;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
}
.ve-caption-pill {
    display: inline-block;
    padding: 7px 15px;
    border-radius: 9px;
    background: rgba(0,0,0,0.84);
    color: #fff;
    font-weight: 700;
    font-size: clamp(0.85rem, 2.5vw, 1.15rem);
    line-height: 1.4;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    max-width: 92%;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.08);
}
.ve-word-hl { font-weight: 800; }
.ve-caption-pill.style-box     { border-radius: 4px; }
.ve-caption-pill.style-minimal { background: transparent; text-shadow: 0 2px 8px #000, 0 0 20px rgba(0,0,0,0.9); border: none; }
.ve-caption-pill.style-outline { background: transparent; -webkit-text-stroke: 1px rgba(0,0,0,0.8); border: none; }

/* Letterbox cinematic bars */
.ve-letterbox-top,
.ve-letterbox-bot {
    position: absolute;
    left: 0;
    right: 0;
    height: 12%;
    background: #000;
    z-index: 5;
    pointer-events: none;
    display: none;
}
.ve-letterbox-top { top: 0; }
.ve-letterbox-bot { bottom: 0; }

/* Transport controls */
.ve-transport-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    flex-wrap: wrap;
}
.ve-transport-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.14s;
    flex-shrink: 0;
}
.ve-transport-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.08); }
.ve-transport-btn.play { width: 36px; height: 36px; background: var(--primary-gradient); border-color: transparent; color: var(--primary-text-on); box-shadow: 0 2px 10px var(--primary-glow); font-size: 0.95rem; }
.ve-scrubber-wrap { flex: 1; min-width: 80px; }
.ve-scrubber {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    outline: none;
    cursor: pointer;
}
.ve-scrubber::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 0 6px var(--primary-glow); }
.ve-time-readout { font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }

/* ── RIGHT INSPECTOR ── */
.ve-right-inspector {
    width: 256px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ve-inspector-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.ve-inspector-tabs::-webkit-scrollbar { display: none; }
.ve-inspector-tab {
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ve-inspector-tab:hover { color: var(--text-secondary); }
.ve-inspector-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.ve-inspector-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,0.25) transparent;
}
.ve-inspector-body::-webkit-scrollbar { width: 4px; }
.ve-inspector-body::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 4px; }

.ve-inspector-pane { display: none; }
.ve-inspector-pane.active { display: block; }

/* Inspector controls */
.ve-ctrl-group { margin-bottom: 14px; }
.ve-ctrl-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ve-ctrl-label span { font-weight: 400; color: var(--primary); text-transform: none; letter-spacing: 0; }
.ve-slider-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ve-slider-label { font-size: 0.7rem; color: var(--text-secondary); width: 70px; flex-shrink: 0; }
.ve-slider { -webkit-appearance: none; flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.1); outline: none; cursor: pointer; }
.ve-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); cursor: pointer; }
.ve-slider-val { font-size: 0.68rem; color: var(--primary); font-weight: 700; width: 36px; text-align: right; flex-shrink: 0; }

/* Aspect ratio buttons in inspector */
.ve-aspect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 6px; }
.ve-aspect-btn {
    padding: 6px 8px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.14s;
}
.ve-aspect-btn:hover { border-color: var(--primary); color: var(--primary); }
.ve-aspect-btn.active { background: rgba(212,175,55,0.15); color: var(--primary); border-color: var(--primary); }

/* FX Cards in inspector */
.ve-fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 8px; }
.ve-fx-card {
    padding: 7px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.14s;
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.ve-fx-card:hover { border-color: var(--primary); color: var(--primary); }
.ve-fx-card.active { background: rgba(212,175,55,0.12); border-color: var(--primary); color: var(--primary); }
.ve-fx-card .ve-fx-icon { font-size: 1rem; display: block; margin-bottom: 3px; }

/* Transition cards */
.ve-trans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ve-trans-card {
    padding: 7px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.14s;
    font-size: 0.67rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.ve-trans-card:hover { border-color: var(--primary); color: var(--primary); }
.ve-trans-card.active { background: rgba(212,175,55,0.12); border-color: var(--primary); color: var(--primary); }

/* Preset cards */
.ve-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.ve-preset-card {
    padding: 9px 7px;
    border-radius: 9px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.025);
    text-align: center;
    cursor: pointer;
    transition: all 0.14s;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.ve-preset-card:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.07); }
.ve-preset-card.active { background: rgba(212,175,55,0.15); color: var(--primary); border-color: var(--primary); }
.ve-preset-card .ve-preset-icon { font-size: 1.1rem; display: block; margin-bottom: 4px; }
#vePresetFeedback { font-size: 0.74rem; color: #34d399; font-weight: 700; transition: opacity 0.5s; opacity: 0; display: block; margin-top: 6px; text-align: center; }

/* Caption cues */
.ve-caption-cue { background: rgba(255,255,255,0.02); border: 1px solid var(--border-subtle); border-radius: 9px; padding: 9px 10px; margin-bottom: 7px; }
.ve-caption-cue-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.ve-caption-cue-input { width: 100%; background: transparent; border: 1px solid var(--border-subtle); border-radius: 6px; padding: 5px 8px; color: var(--text-primary); font-size: 0.8rem; font-family: inherit; margin-bottom: 5px; outline: none; }
.ve-caption-cue-input:focus { border-color: var(--primary); }

/* Color highlight chips */
.ve-color-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ve-color-chip { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,0.1); transition: transform 0.14s, border-color 0.14s; flex-shrink: 0; }
.ve-color-chip:hover, .ve-color-chip.active { transform: scale(1.25); border-color: #fff; }

/* Caption style buttons */
.ve-caption-style-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.ve-caption-style-btn { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-subtle); background: transparent; color: var(--text-secondary); font-size: 0.7rem; cursor: pointer; transition: all 0.14s; }
.ve-caption-style-btn:hover, .ve-caption-style-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.09); }

/* Clip list in inspector */
.ve-clip-row { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border-subtle); background: rgba(255,255,255,0.02); margin-bottom: 5px; cursor: pointer; transition: all 0.14s; }
.ve-clip-row:hover { border-color: var(--primary); }
.ve-clip-row.active { border-color: var(--primary); background: rgba(212,175,55,0.07); }
.ve-clip-meta { flex: 1; min-width: 0; }
.ve-clip-name { font-size: 0.74rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-clip-dur { font-size: 0.65rem; color: var(--text-muted); }
.ve-clip-actions { display: flex; gap: 3px; }

/* Export section */
.ve-export-bar { display: flex; flex-direction: column; gap: 8px; }
.ve-export-progress { height: 5px; border-radius: 5px; background: rgba(255,255,255,0.07); overflow: hidden; display: none; }
.ve-export-progress-bar { height: 100%; background: var(--primary-gradient); border-radius: 5px; width: 0%; transition: width 0.25s; }

/* ── TIMELINE SECTION ── */
.ve-timeline-section {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    margin-bottom: 12px;
}
.ve-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.025);
    gap: 8px;
    flex-wrap: wrap;
}
.ve-timeline-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ve-timeline-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s;
    white-space: nowrap;
}
.ve-timeline-btn:hover { border-color: var(--primary); color: var(--primary); }
.ve-timeline-btn.active { background: rgba(212,175,55,0.12); color: var(--primary); border-color: var(--primary); }
.ve-timeline-zoom-row { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--text-muted); }
.ve-timeline-zoom-row input[type=range] { width: 80px; height: 3px; -webkit-appearance: none; background: rgba(255,255,255,0.1); border-radius: 3px; }
.ve-timeline-zoom-row input::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.ve-timeline-dur-badge { font-size: 0.7rem; color: var(--primary); font-weight: 700; background: rgba(212,175,55,0.1); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }

/* Timeline canvas area */
.ve-timeline-body { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(212,175,55,0.2) transparent; }
.ve-timeline-body::-webkit-scrollbar { height: 4px; }
.ve-timeline-body::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 4px; }

.ve-timeline-canvas-wrap {
    min-width: 100%;
    position: relative;
}

/* Track rows */
.ve-track-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    min-height: 34px;
}
.ve-track-label {
    width: 70px;
    flex-shrink: 0;
    padding: 0 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
}
.ve-track-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Ruler */
.ve-timeline-ruler {
    height: 22px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(0,0,0,0.2);
}
.ve-ruler-tick {
    position: absolute;
    bottom: 0;
    font-size: 0.58rem;
    color: var(--text-muted);
    padding: 0 2px;
    transform: translateX(-50%);
    border-left: 1px solid rgba(255,255,255,0.1);
    line-height: 22px;
}

/* Playhead */
.ve-timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    z-index: 20;
    pointer-events: none;
}
.ve-timeline-playhead::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

/* Clip items on timeline */
.ve-track-item {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 6px;
    font-size: 0.63rem;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.14s;
    box-sizing: border-box;
}
.ve-track-item.clip-item { background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.1)); border: 1px solid rgba(212,175,55,0.3); color: var(--primary); }
.ve-track-item.clip-item.active { background: rgba(212,175,55,0.35); border-color: var(--primary); box-shadow: 0 0 8px var(--primary-glow); }
.ve-track-item.caption-item { background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.3); color: #34d399; }
.ve-track-item.text-item { background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.3); color: #a78bfa; }
.ve-track-item.audio-item { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: #60a5fa; }
.ve-track-item:hover { filter: brightness(1.3); }

/* Trim handles */
.ve-trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background: rgba(255,255,255,0.2);
    cursor: ew-resize;
    border-radius: 3px;
}
.ve-trim-handle.left { left: 0; }
.ve-trim-handle.right { right: 0; }

/* Transition node */
.ve-timeline-trans-node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(212,175,55,0.2);
    border: 1px solid rgba(212,175,55,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 5;
}

/* Markers on ruler */
.ve-marker-flag {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 10;
    cursor: pointer;
}
.ve-marker-flag::after {
    content: attr(data-label);
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0,0,0,0.7);
    pointer-events: none;
}
.ve-marker-flag:hover::after { text-decoration: line-through; }

/* Snap indicator dot */
.ve-snap-indicator {
    position: absolute;
    top: -1px;
    width: 3px;
    height: calc(100% + 2px);
    background: rgba(255,255,255,0.5);
    pointer-events: none;
    z-index: 15;
    animation: ve-snap-flash 0.25s ease-out;
}
@keyframes ve-snap-flash { from { opacity: 1; } to { opacity: 0; } }

/* Waveform canvas */
.ve-waveform-row { background: rgba(0,0,0,0.2); }
.ve-waveform-canvas { display: block; width: 100%; height: 36px; }

/* ── PANEL PANES (for sidebar icon panels) ── */
.ve-panel-pane {
    display: none;
    padding: 10px;
    background: rgba(10,10,10,0.9);
    border-right: 1px solid var(--border-subtle);
    width: 180px;
    flex-shrink: 0;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 480px;
    scrollbar-width: thin;
}
.ve-panel-pane.active { display: flex; }
.ve-panel-pane-title { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--primary); padding-bottom: 7px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 4px; }

/* Sticker grid */
.ve-sticker-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ve-sticker-btn { font-size: 1.3rem; text-align: center; cursor: pointer; padding: 4px; border-radius: 6px; border: 1px solid transparent; transition: all 0.12s; }
.ve-sticker-btn:hover { border-color: var(--primary); background: rgba(212,175,55,0.1); }

/* Performance HUD */
#vePerfHud {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.65rem;
    font-family: monospace;
    color: rgba(52,211,153,0.8);
    background: rgba(0,0,0,0.75);
    padding: 3px 7px;
    border-radius: 5px;
    pointer-events: none;
    z-index: 30;
}

/* ── FOCUS / FULLSCREEN MODE ── */
body.ve-focus-mode #site-wrapper > :not(#toolModalBackdrop) { visibility: hidden !important; pointer-events: none !important; }
body.ve-focus-mode .tool-modal-backdrop { position: fixed !important; inset: 0 !important; padding: 0 !important; align-items: stretch !important; z-index: 9999 !important; }
body.ve-focus-mode .tool-modal {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
}
body.ve-focus-mode .tool-modal-header { padding: 8px 16px; }
body.ve-focus-mode .ve-editor-layout { min-height: calc(100vh - 220px); }
.ve-focus-exit-hint {
    display: none;
    position: fixed;
    bottom: 12px;
    right: 16px;
    background: rgba(0,0,0,0.8);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 10000;
    backdrop-filter: blur(8px);
}
body.ve-focus-mode .ve-focus-exit-hint { display: block; }

/* ── UPLOAD DROP ZONE ── */
.tool-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
    background: rgba(255,255,255,0.015);
}
.tool-drop-zone:hover, .tool-drop-zone.drag-over { border-color: var(--primary); background: rgba(212,175,55,0.05); }
.tool-drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.tool-drop-zone > i { font-size: 2.2rem; color: var(--primary); margin-bottom: 10px; display: block; }

/* Size Cards (Social Media Size tool) */
.tool-size-card {
    padding: 12px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.16s;
}
.tool-size-card:hover { border-color: var(--primary); background: rgba(212,175,55,0.06); }
.tool-size-card.active { border-color: var(--primary); background: rgba(212,175,55,0.12); box-shadow: 0 0 12px var(--primary-glow); }
.tool-size-card-platform { font-size: 0.66rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.tool-size-card-name { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.tool-size-card-visual { background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.25); border-radius: 4px; }
.tool-size-card-dim { font-size: 0.67rem; color: var(--text-muted); }

/* SS Tool styles */
.ss-control-card { background: rgba(255,255,255,0.02); border: 1px solid var(--border-subtle); border-radius: 11px; padding: 13px; margin-bottom: 11px; }
.ss-color-preset { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--border); cursor: pointer; display: inline-block; transition: transform 0.13s, border-color 0.13s; }
.ss-color-preset:hover, .ss-color-preset.active { transform: scale(1.2); border-color: var(--primary); }
.ss-video-wrapper { position: relative; border-radius: 11px; overflow: hidden; background: #000; display: flex; align-items: center; justify-content: center; max-height: 320px; }
.ss-video-wrapper video { width: 100%; height: 100%; max-height: 300px; object-fit: contain; }

/* ── SERP / OG Preview (Meta Tag tool) ── */
.tool-serp-preview { background: #202124; border: 1px solid rgba(255,255,255,0.1); border-radius: 11px; padding: 15px 17px; margin-bottom: 14px; font-family: Arial, sans-serif; }
.tool-serp-site { font-size: 0.77rem; color: #bdc1c6; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.tool-serp-title { font-size: 1.1rem; color: #8ab4f8; line-height: 1.3; margin-bottom: 3px; word-break: break-word; font-weight: 500; }
.tool-serp-desc { font-size: 0.83rem; color: #bdc1c6; line-height: 1.4; word-break: break-word; }
.tool-og-preview { background: #18191a; border: 1px solid rgba(255,255,255,0.1); border-radius: 11px; overflow: hidden; margin-bottom: 14px; }
.tool-og-img { width: 100%; height: 165px; background: #242526; display: flex; align-items: center; justify-content: center; color: #65676b; overflow: hidden; }
.tool-og-img img { width: 100%; height: 100%; object-fit: cover; }
.tool-og-body { padding: 11px 13px; }
.tool-og-domain { font-size: 0.71rem; color: #b0b3b8; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.tool-og-title { font-size: 0.93rem; font-weight: 700; color: #e4e6eb; margin-bottom: 3px; line-height: 1.3; }
.tool-og-desc { font-size: 0.81rem; color: #b0b3b8; line-height: 1.4; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */

/* ── TABLET: 768px - 1023px ── */
@media (min-width: 768px) and (max-width: 1023px) {
    .ve-editor-layout { flex-wrap: wrap; }
    .ve-left-sidebar { width: 100%; flex-direction: row; height: auto; border-right: none; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; padding: 6px; gap: 4px; flex-wrap: nowrap; scrollbar-width: none; }
    .ve-left-sidebar::-webkit-scrollbar { display: none; }
    .ve-sidebar-icon { width: 44px; height: 36px; flex-direction: row; border-radius: 8px; gap: 4px; flex-shrink: 0; }
    .ve-sidebar-icon span { font-size: 0.6rem; }
    .ve-sidebar-divider { width: 1px; height: 26px; margin: 0 2px; }
    .ve-center-preview { order: 1; width: 100%; border-right: none; }
    .ve-right-inspector { width: 100%; border-left: none; border-top: 1px solid var(--border-subtle); max-height: 280px; }
    .ve-inspector-body { max-height: 220px; }
    .ve-panel-pane { width: 100%; max-height: 200px; }
}

/* ── MOBILE: < 768px ── */
@media (max-width: 767px) {
    .ve-toolbar { padding: 7px 10px; gap: 5px; }
    .ve-toolbar-btn { padding: 4px 8px; font-size: 0.7rem; }
    .ve-toolbar-btn span { display: none; }
    .ve-editor-layout { flex-direction: column; min-height: auto; }
    .ve-left-sidebar { width: 100%; flex-direction: row; height: auto; border-right: none; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; padding: 5px; gap: 3px; scrollbar-width: none; }
    .ve-left-sidebar::-webkit-scrollbar { display: none; }
    .ve-sidebar-icon { width: 38px; height: 32px; flex-direction: column; flex-shrink: 0; }
    .ve-sidebar-divider { width: 1px; height: 22px; margin: 0; }
    .ve-center-preview { order: 1; }
    .ve-right-inspector { width: 100%; max-height: 300px; border-left: none; border-top: 1px solid var(--border-subtle); }
    .ve-inspector-body { max-height: 240px; }
    .ve-stage-area { padding: 10px; min-height: 220px; }
    .ve-stage-box.aspect-16-9 { max-width: 100%; }
    .ve-stage-box.aspect-9-16 { max-height: 340px; }
    .ve-transport-bar { padding: 6px 10px; gap: 5px; }
    .ve-timeline-header { flex-direction: column; align-items: flex-start; }
    .ve-track-label { width: 52px; font-size: 0.58rem; padding: 0 6px; }
    .ve-fx-grid, .ve-trans-grid, .ve-preset-grid { grid-template-columns: 1fr 1fr 1fr; }
    .ve-aspect-grid { grid-template-columns: 1fr 1fr; }
    .ve-timeline-zoom-row input[type=range] { width: 60px; }
    .ve-panel-pane { width: 100%; max-height: 200px; }
    tools-filter-bar { flex-direction: column; align-items: stretch; }
    .tools-search-wrap { max-width: 100%; }
    .tool-modal { border-radius: 16px 16px 0 0; max-height: 96vh; }
    .tool-modal-backdrop { padding: 0; align-items: flex-end; }
}

/* ── SMALL MOBILE: < 480px ── */
@media (max-width: 479px) {
    .tools-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tool-card { padding: 13px; }
    .tool-card-icon { width: 36px; height: 36px; font-size: 1rem; }
    .tool-card-title { font-size: 0.85rem; }
    .tool-card-desc { display: none; }
    .ve-toolbar-btn i { font-size: 0.85rem; }
    .ve-credit-bar { flex-direction: column; align-items: flex-start; }
    .ve-transport-btn { width: 28px; height: 28px; font-size: 0.78rem; }
    .ve-transport-btn.play { width: 32px; height: 32px; }
    .ve-scrubber { height: 5px; }
    .ve-fx-grid, .ve-trans-grid, .ve-preset-grid { grid-template-columns: 1fr 1fr; }
    .ve-stage-area { padding: 6px; min-height: 180px; }
    .ve-mode-btn { font-size: 0.75rem; padding: 8px 10px; }
    .ve-mode-btn i { font-size: 0.85rem; }
    .ve-timeline-btn { padding: 3px 6px; font-size: 0.65rem; }
}

/* ── LARGE DESKTOP: 1024px+ ── */
@media (min-width: 1024px) {
    .tool-modal { max-width: 1100px; }
    .ve-right-inspector { width: 270px; }
    .ve-stage-box.aspect-16-9 { max-width: 800px; }
    .ve-stage-box.aspect-9-16 { max-height: 520px; }
    .ve-stage-box.aspect-1-1  { max-height: 480px; }
    .ve-panel-pane { width: 200px; }
}


/* Mode Switcher Nav */
.ve-mode-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.ve-mode-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.22s ease;
}
.ve-mode-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(212, 175, 55, 0.06);
}
.ve-mode-btn.active {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 4px 14px var(--primary-glow);
}

/* Credit & Premium Info Bar */
.ve-credit-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 16px;
    font-size: 0.8rem;
}
.ve-credit-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-weight: 600;
}
.ve-credit-balance strong { color: var(--primary); font-size: 0.92rem; }
.ve-cost-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.74rem;
}

/* Prompt Card */
.ve-prompt-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
    transition: border-color 0.2s;
}
.ve-prompt-card:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.ve-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}
.ve-lang-tags {
    display: flex;
    gap: 4px;
}
.ve-lang-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
}
.ve-prompt-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 70px;
}
.ve-prompt-textarea::placeholder { color: var(--text-muted); }
.ve-example-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}
.ve-example-chip {
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.74rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.ve-example-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
}

/* Editing Plan Card */
.ve-plan-card {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    animation: toolPaneFade 0.25s ease-out;
}
.ve-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ve-plan-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #34d399;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ve-plan-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.ve-plan-item {
    font-size: 0.79rem;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border-radius: 8px;
}

/* Video Stage & Canvas */
.ve-workspace {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .ve-workspace { grid-template-columns: 1fr; }
}

.ve-preview-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ve-stage-box {
    position: relative;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 480px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.ve-stage-box.aspect-9-16 { aspect-ratio: 9 / 16; max-height: 480px; margin: 0 auto; }
.ve-stage-box.aspect-16-9 { aspect-ratio: 16 / 9; width: 100%; }
.ve-stage-box.aspect-1-1  { aspect-ratio: 1 / 1; max-height: 400px; margin: 0 auto; }
.ve-stage-box.aspect-4-5  { aspect-ratio: 4 / 5; max-height: 440px; margin: 0 auto; }

.ve-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Subtitle / Caption Overlay */
.ve-caption-overlay {
    position: absolute;
    bottom: 30px;
    left: 12px;
    right: 12px;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    display: flex;
    justify-content: center;
}
.ve-caption-pill {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.8vw, 1.25rem);
    line-height: 1.4;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
    max-width: 90%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.15s ease-out;
}
.ve-caption-pill.style-cinematic {
    background: transparent;
    border: none;
    box-shadow: none;
    text-shadow: 0 2px 8px #000, 0 0 20px rgba(0,0,0,0.9);
    font-family: 'Cinzel', serif, sans-serif;
    letter-spacing: 0.5px;
}
.ve-word-hl {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #facc15;
    font-weight: 900;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.6));
    padding: 0 2px;
}
.ve-word-hl-pill {
    background: #facc15;
    color: #000000;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 800;
    margin: 0 2px;
    display: inline-block;
}

/* Letterbox Black Bars (Cinematic Look) */
.ve-letterbox-top, .ve-letterbox-bot {
    position: absolute;
    left: 0; right: 0;
    background: #000000;
    z-index: 5;
    height: 0;
    transition: height 0.3s ease;
}
.ve-letterbox-top { top: 0; }
.ve-letterbox-bot { bottom: 0; }
.ve-letterbox-active .ve-letterbox-top,
.ve-letterbox-active .ve-letterbox-bot { height: 9%; }

/* Transport & Timeline Scrubber */
.ve-transport-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 8px 14px;
}
.ve-play-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.ve-play-btn:hover { transform: scale(1.08); box-shadow: 0 0 14px var(--primary-glow); }
.ve-scrubber {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 6px;
}
.ve-time-readout {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Studio Tabs Navigation ── */
.ve-studio-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 2px 10px 2px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
    scrollbar-width: thin;
}
.ve-studio-tabs::-webkit-scrollbar { height: 4px; }
.ve-studio-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.ve-tab-btn {
    padding: 7px 13px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.ve-tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
}
.ve-tab-btn.active {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.ve-tab-pane {
    display: none;
    animation: veFadeIn 0.2s ease-out;
}
.ve-tab-pane.active { display: block; }

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

/* Right Column Adjustments & Studio Drawer */
.ve-adjustments-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px;
    max-height: 560px;
    overflow-y: auto;
}
.ve-adjust-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}
.ve-adjust-header h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Multi-Clip Grid & Management ── */
.ve-clip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 220px;
    overflow-y: auto;
}
.ve-clip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 10px;
    transition: border-color 0.15s;
}
.ve-clip-row.active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
}
.ve-clip-thumb {
    width: 48px;
    height: 32px;
    border-radius: 4px;
    background: #000;
    object-fit: cover;
    flex-shrink: 0;
}
.ve-clip-meta {
    flex: 1;
    min-width: 0;
}
.ve-clip-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ve-clip-dur {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.ve-clip-actions {
    display: flex;
    gap: 4px;
}

/* ── Effects & Creative Filters Grid ── */
.ve-fx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.ve-fx-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.ve-fx-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    color: var(--text-primary);
}
.ve-fx-card.active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}
.ve-fx-card i {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
}

/* ── Transition Selection Grid ── */
.ve-trans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.ve-trans-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    font-size: 0.74rem;
    color: var(--text-secondary);
    transition: all 0.16s ease;
}
.ve-trans-card:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}
.ve-trans-card.active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    font-weight: 700;
}

/* ── Captions & Karaoke Styles ── */
.ve-caption-styles-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ve-caption-style-btn {
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.ve-caption-style-btn.active {
    border-color: var(--primary);
    background: rgba(212,175,55,0.15);
    color: var(--primary);
    font-weight: 700;
}
.ve-color-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.ve-color-chip {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.ve-color-chip:hover { transform: scale(1.15); }
.ve-color-chip.active { border-color: #fff; transform: scale(1.2); }

/* Captions Cue List Editor */
.ve-caption-cue {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s;
}
.ve-caption-cue:focus-within { border-color: var(--primary); }
.ve-caption-cue-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.ve-caption-cue-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: 0.84rem;
    font-family: inherit;
}
.ve-caption-cue-input:focus { outline: none; border-color: var(--primary); }

/* ── Multi-Track Responsive Timeline ── */
.ve-timeline-wrap {
    margin-top: 18px;
    background: rgba(10, 14, 23, 0.95);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.ve-timeline-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.ve-timeline-tools-left {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ve-timeline-btn {
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.76rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}
.ve-timeline-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}
.ve-timeline-zoom-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: var(--text-muted);
}
.ve-timeline-zoom-wrap input[type="range"] {
    width: 80px;
    accent-color: var(--primary);
}

.ve-timeline-viewport {
    position: relative;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: #06090e;
    min-height: 180px;
    cursor: crosshair;
    scrollbar-width: thin;
}
.ve-timeline-viewport::-webkit-scrollbar { height: 6px; }
.ve-timeline-viewport::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.ve-timeline-canvas-wrap {
    position: relative;
    min-width: 100%;
    width: 800px;
    height: 100%;
}

/* Timeline Ruler */
.ve-timeline-ruler {
    height: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    font-family: monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    user-select: none;
}
.ve-ruler-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 4px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
}

/* Timeline Scrubber Playhead Line */
.ve-timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: #ef4444;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}
.ve-timeline-playhead::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -5px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 2px;
    transform: rotate(45deg);
}

/* Multi-Tracks */
.ve-timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0;
}
.ve-track-lane {
    position: relative;
    height: 38px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
}
.ve-track-label {
    position: sticky;
    left: 0;
    z-index: 20;
    width: 80px;
    height: 100%;
    background: rgba(14, 18, 28, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
}

/* Timeline Items (Clips, Audio, Subtitles, Overlays) */
.ve-track-item {
    position: absolute;
    top: 3px;
    bottom: 3px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.ve-track-item.clip-item {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(37, 99, 235, 0.55));
    border-color: #3b82f6;
    color: #e0f2fe;
}
.ve-track-item.audio-item {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(5, 150, 105, 0.55));
    border-color: #10b981;
    color: #d1fae5;
}
.ve-track-item.caption-item {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.55));
    border-color: #f59e0b;
    color: #fef3c7;
}
.ve-track-item.text-item {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(147, 51, 234, 0.55));
    border-color: #a855f7;
    color: #f3e8ff;
}
.ve-track-item.active {
    outline: 2px solid #ffffff;
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Trim Drag Handles on Clips */
.ve-trim-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    background: rgba(255, 255, 255, 0.3);
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ve-trim-handle:hover { background: #ffffff; }
.ve-trim-handle.left { left: 0; border-radius: 6px 0 0 6px; }
.ve-trim-handle.right { right: 0; border-radius: 0 6px 6px 0; }

/* Transition Node Between Clips */
.ve-timeline-trans-node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--primary);
    color: #000;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* Audio Waveform Canvas in Timeline */
.ve-waveform-canvas {
    width: 100%;
    height: 100%;
    opacity: 0.65;
    pointer-events: none;
}

/* Export Progress Bar */
.ve-export-bar-wrap {
    height: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-top: 8px;
}
.ve-export-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    transition: width 0.2s ease;
}

/* ══════════════════════════════════════════════════════════════════
   PRO VIDEO STUDIO: 3-PANEL PROFESSIONAL DESKTOP & RESPONSIVE LAYOUT
   ══════════════════════════════════════════════════════════════════ */

/* Workspace Container */
#veWorkspaceSection {
    background: #080c14;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    position: relative;
    transition: all 0.3s ease;
}

/* Focus / Fullscreen Mode */
#veWorkspaceSection.ve-focus-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    background: #05080e !important;
    overflow-y: auto !important;
}
#veWorkspaceSection.ve-focus-mode .ve-editor-layout {
    flex: 1 1 auto;
    min-height: 0;
}
#veWorkspaceSection.ve-focus-mode .ve-focus-exit-hint {
    display: block;
}
.ve-focus-exit-hint {
    display: none;
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--text-muted);
    z-index: 100000;
    pointer-events: none;
}

/* TOP TOOLBAR */
.ve-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 20, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 14px;
    margin-bottom: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    gap: 10px;
    flex-wrap: wrap;
}
.ve-project-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ve-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ve-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}
.ve-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
}
.ve-toolbar-btn.primary {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 2px 10px var(--primary-glow);
}
.ve-toolbar-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.ve-toolbar-btn.danger {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.05);
}
.ve-toolbar-btn.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}
.ve-toolbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 2px;
}

/* 3-PANEL EDITOR LAYOUT */
.ve-editor-layout {
    display: flex;
    gap: 10px;
    min-height: 480px;
    margin-bottom: 10px;
    position: relative;
}

/* LEFT SIDEBAR (Icon categories) */
.ve-left-sidebar {
    width: 58px;
    flex-shrink: 0;
    background: rgba(12, 16, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ve-sidebar-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    position: relative;
}
.ve-sidebar-icon span {
    font-size: 0.62rem;
    font-weight: 500;
    line-height: 1;
}
.ve-sidebar-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.ve-sidebar-icon.active {
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary);
    font-weight: 700;
}
.ve-sidebar-icon.active::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: var(--primary);
    border-radius: 3px;
}
.ve-sidebar-divider {
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

/* SLIDE-OUT PANEL PANE (Next to sidebar) */
.ve-panel-pane {
    width: 290px;
    flex-shrink: 0;
    background: rgba(14, 18, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: none;
    max-height: 520px;
    overflow-y: auto;
    animation: veSlideIn 0.2s ease-out;
}
.ve-panel-pane.open {
    display: block;
}
@keyframes veSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* CENTER PREVIEW STAGE */
.ve-center-preview {
    flex: 1 1 0%;
    min-width: 0;
    background: rgba(8, 12, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ve-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}
.ve-preview-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}
.ve-stage-area {
    flex: 1;
    min-height: 340px;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: radial-gradient(circle at center, rgba(16, 22, 38, 0.6) 0%, rgba(6, 9, 14, 0.95) 100%);
    overflow: hidden;
    position: relative;
}
.ve-stage-box {
    position: relative;
    max-height: 420px;
    max-width: 100%;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ve-stage-box.aspect-9-16 { aspect-ratio: 9 / 16; width: 236px; height: 420px; }
.ve-stage-box.aspect-16-9 { aspect-ratio: 16 / 9; width: 560px; height: 315px; }
.ve-stage-box.aspect-1-1 { aspect-ratio: 1 / 1; width: 340px; height: 340px; }
.ve-stage-box.aspect-4-5 { aspect-ratio: 4 / 5; width: 280px; height: 350px; }

.ve-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Transport Bar in Center Preview */
.ve-center-preview .ve-transport-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(14, 18, 28, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: nowrap;
}
.ve-transport-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.ve-transport-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.ve-transport-btn.play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border: none;
    box-shadow: 0 2px 10px var(--primary-glow);
}
.ve-transport-btn.play:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.ve-scrubber-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 4px;
}
.ve-scrubber {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
    height: 5px;
}

/* RIGHT INSPECTOR PANEL */
.ve-right-inspector {
    width: 310px;
    flex-shrink: 0;
    background: rgba(12, 16, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 520px;
}
.ve-inspector-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 4px;
    gap: 4px;
}
.ve-inspector-tab {
    flex: 1;
    text-align: center;
    padding: 6px 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.ve-inspector-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.ve-inspector-tab.active {
    color: var(--primary);
    background: rgba(212, 175, 55, 0.12);
    font-weight: 700;
}
.ve-inspector-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
}
.ve-inspector-pane {
    display: none;
    animation: veFadeIn 0.2s ease-out;
}
.ve-inspector-pane.active {
    display: block;
}

/* Control groups inside Inspector & Panes */
.ve-ctrl-group {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ve-ctrl-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.ve-ctrl-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Aspect ratio grid */
.ve-aspect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.ve-aspect-btn {
    padding: 6px 2px;
    text-align: center;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
}
.ve-aspect-btn small {
    font-size: 0.62rem;
    opacity: 0.7;
    font-weight: 400;
}
.ve-aspect-btn:hover {
    border-color: var(--primary);
    color: #ffffff;
    background: rgba(212, 175, 55, 0.06);
}
.ve-aspect-btn.active {
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Sliders */
.ve-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.ve-slider-label {
    width: 68px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.ve-slider {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 5px;
}
.ve-slider-val {
    width: 44px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    text-align: right;
    flex-shrink: 0;
}

/* Effects & Presets grids */
.ve-fx-grid, .ve-preset-grid, .ve-trans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.ve-fx-card, .ve-preset-card, .ve-trans-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.ve-fx-card:hover, .ve-preset-card:hover, .ve-trans-card:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}
.ve-fx-card.active, .ve-preset-card.active, .ve-trans-card.active {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}
.ve-fx-icon, .ve-preset-icon {
    font-size: 1rem;
    line-height: 1;
}

/* ── TIMELINE SECTION ── */
.ve-timeline-section {
    background: rgba(10, 14, 24, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.ve-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.ve-timeline-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ve-timeline-dur-badge {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.ve-timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}
.ve-track-row {
    position: relative;
    height: 38px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
}
.ve-track-content {
    position: relative;
    flex: 1;
    height: 100%;
}

/* Export progress bar inside Inspector & Center */
.ve-export-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}
.ve-export-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    transition: width 0.15s ease;
}

/* ── RESPONSIVE ADAPTATION ── */
@media (max-width: 1100px) {
    .ve-editor-layout {
        flex-wrap: wrap;
    }
    .ve-right-inspector {
        width: 100%;
        max-height: 360px;
    }
    .ve-panel-pane {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .ve-editor-layout {
        flex-direction: column;
    }
    .ve-left-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 4px 8px;
    }
    .ve-sidebar-divider {
        display: none;
    }
    .ve-sidebar-icon {
        flex-shrink: 0;
    }
    .ve-sidebar-icon.active::before {
        top: auto;
        bottom: 2px;
        left: 10px;
        right: 10px;
        width: auto;
        height: 2px;
    }
    .ve-panel-pane {
        width: 100%;
        max-height: 280px;
    }
    .ve-center-preview {
        width: 100%;
    }
    .ve-stage-box {
        max-height: 280px !important;
    }
    .ve-stage-box.aspect-9-16 {
        width: 158px;
        height: 280px;
    }
    .ve-toolbar-actions button span {
        display: none;
    }
    .ve-right-inspector {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   AI VLOG TO SHORTS STUDIO — UPGRADED COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* Import Source Tabs */
.ve-import-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.ve-import-tab {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ve-import-tab.active, .ve-import-tab:hover {
    color: var(--primary);
    border-color: rgba(212,175,55,0.4);
    background: rgba(212,175,55,0.06);
}

/* YouTube URL Input & Preview */
.ve-yt-wrap {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}
.ve-yt-input-row {
    display: flex;
    gap: 10px;
}
.ve-yt-input {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.ve-yt-input:focus {
    border-color: var(--primary);
}
.ve-yt-preview-card {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    align-items: center;
}
.ve-yt-thumb {
    width: 120px;
    height: 68px;
    border-radius: 6px;
    object-fit: cover;
    background: #000;
}
.ve-yt-details {
    flex: 1;
    min-width: 0;
}
.ve-yt-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.ve-yt-author {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* Mood & Duration Presets */
.ve-preset-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 12px;
}
.ve-mood-pill, .ve-dur-pill {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.74rem;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ve-mood-pill.active, .ve-mood-pill:hover,
.ve-dur-pill.active, .ve-dur-pill:hover {
    border-color: var(--primary);
    background: rgba(212,175,55,0.12);
    color: #fff;
}

/* Multi-Short Candidate Cards */
.ve-shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 18px;
}
.ve-short-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 14px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ve-short-card:hover {
    border-color: rgba(212,175,55,0.5);
    background: rgba(255,255,255,0.04);
}
.ve-short-card.selected {
    border-color: var(--primary);
    background: rgba(212,175,55,0.08);
}
.ve-short-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.ve-short-card-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #fff;
}
.ve-short-card-hook {
    font-size: 0.76rem;
    color: var(--primary);
    font-style: italic;
}
.ve-short-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.ve-short-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

/* Batch Export Bar */
.ve-batch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Multi-track Timeline Layer Controls */
.ve-track-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 0.7rem;
}
.ve-track-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ve-track-icon-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 2px;
    transition: color 0.15s;
}
.ve-track-icon-btn:hover, .ve-track-icon-btn.active {
    color: var(--primary);
}
.ve-track-icon-btn.locked {
    color: #f87171;
}

/* Saved Projects Modal */
.ve-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ve-modal-card {
    background: #141416;
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}
.ve-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.ve-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}


/* ════════════════════════════════════════════════════════════
   VLOG → SHORTS STUDIO — Styles
   ════════════════════════════════════════════════════════════ */

/* Source mode tabs (YouTube URL / Upload) */
.vs-input-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 10px;
}
.vs-input-tab {
    flex: 1;
    padding: 9px 14px;
    border-radius: 10px 10px 0 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.18s ease;
}
.vs-input-tab:hover { color: var(--primary); border-color: var(--primary); background: rgba(212,175,55,0.06); }
.vs-input-tab.active { background: var(--primary-gradient); color: var(--primary-text-on); border-color: transparent; box-shadow: 0 -3px 12px var(--primary-glow); }

/* YouTube metadata card */
.vs-yt-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 13px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(212,175,55,0.22);
    margin-top: 12px;
    animation: vsCardSlideIn 0.35s ease both;
    flex-wrap: wrap;
}
@keyframes vsCardSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.vs-yt-thumb {
    width: 140px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    background: rgba(0,0,0,0.3);
}
.vs-yt-info { flex: 1; min-width: 0; }
.vs-yt-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vs-yt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.vs-yt-channel {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.vs-yt-dur {
    padding: 1px 8px;
    border-radius: 20px;
    background: rgba(212,175,55,0.12);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(212,175,55,0.22);
}
.vs-yt-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 7px 10px;
    background: rgba(99,102,241,0.07);
    border-radius: 8px;
    border-left: 3px solid #6366f1;
    line-height: 1.5;
}
.vs-yt-error {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(248,113,113,0.1);
    border-left: 3px solid #f87171;
    color: #f87171;
    font-size: 0.8rem;
}

/* Upload info strip */
.vs-upload-info {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.22);
    color: #10b981;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: vsCardSlideIn 0.3s ease both;
}

/* Compact number inputs for time */
.vs-time-small {
    padding: 5px 8px !important;
    font-size: 0.85rem !important;
    text-align: center;
}

/* AI Planner Card */
.vs-planner-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 14px;
    padding: 16px;
    margin-top: 16px;
    animation: vsCardSlideIn 0.35s ease both;
}
.vs-planner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

/* Signal / Content style checkboxes */
.vs-signal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.vs-signal-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}
.vs-signal-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.06); }
.vs-signal-chip input[type="checkbox"] { display: none; }
.vs-signal-chip:has(input:checked) {
    background: rgba(212,175,55,0.12);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 1px rgba(212,175,55,0.25);
}

/* Shorts Queue */
.vs-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 8px;
}
.vs-queue-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.vs-shorts-queue {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual short card */
.vs-short-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 13px;
    padding: 14px 16px;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
    animation: vsCardSlideIn 0.35s ease both;
}
.vs-short-card:hover {
    border-color: rgba(212,175,55,0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.vs-short-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.vs-short-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--primary-text-on);
    font-weight: 800;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vs-short-title-edit {
    flex: 1;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s;
    min-width: 0;
}
.vs-short-title-edit:hover, .vs-short-title-edit:focus {
    background: rgba(255,255,255,0.05);
}
.vs-short-type-badge {
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(212,175,55,0.1);
    color: var(--primary);
    border: 1px solid rgba(212,175,55,0.22);
    white-space: nowrap;
}
.vs-short-timestamps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.vs-short-timestamps input[type="number"] {
    width: 56px;
    padding: 3px 6px;
    font-size: 0.78rem;
    text-align: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}
.vs-short-timestamps input[type="number"]:focus { border-color: var(--primary); }
.vs-short-rationale {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.4;
}
.vs-short-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.vs-short-actions .tool-btn { padding: 5px 10px; font-size: 0.74rem; }

/* Short export progress bar */
.vs-short-progress {
    display: none;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}
.vs-short-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.2s linear;
}

/* Batch progress items */
.vs-batch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.8rem;
}
.vs-batch-item:last-child { border-bottom: none; }
.vs-batch-item-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}
.vs-batch-item-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.2s linear;
}
.vs-batch-status { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.vs-batch-status.done { color: #10b981; }

/* ── Short Card Preview Player ── */
.vs-short-preview-wrap {
    margin-top: 12px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(212,175,55,0.25);
    display: none;
    flex-direction: column;
}
.vs-short-preview-wrap.visible { display: flex; }
.vs-short-preview-video {
    width: 100%;
    max-height: 280px;
    background: #000;
    outline: none;
    display: block;
}
.vs-short-preview-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.6);
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
}
.vs-short-preview-label {
    font-size: 0.72rem;
    color: #10b981;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}
.vs-short-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-gradient);
    color: #0a0d13;
    font-size: 0.74rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    transition: opacity 0.15s;
    text-decoration: none;
}
.vs-short-dl-btn:hover { opacity: 0.85; }

/* ── Segment Preview Player (Pre-Export Embed & Player) ── */
.vs-segment-preview-wrap {
    margin-top: 12px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    display: none;
    flex-direction: column;
    position: relative;
}
.vs-segment-preview-wrap.visible { display: flex; }
.vs-preview-container {
    position: relative;
    width: 100%;
    background: #05070a;
    display: flex;
    justify-content: center;
    align-items: center;
}
.vs-segment-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    max-height: 280px;
}
.vs-preview-caption-overlay {
    position: absolute;
    left: 10px;
    right: 10px;
    pointer-events: none;
    text-align: center;
    transition: all 0.2s ease;
    z-index: 5;
}
.vs-preview-caption-overlay.pos-top { top: 12px; }
.vs-preview-caption-overlay.pos-center { top: 50%; transform: translateY(-50%); }
.vs-preview-caption-overlay.pos-bottom { bottom: 12px; }
.vs-preview-caption-pill {
    display: inline-block;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    padding: 4px 10px;
    line-height: 1.3;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    max-width: 90%;
    word-break: break-word;
}
.vs-edit-color-swatch.active {
    border-color: #fff !important;
    transform: scale(1.18);
    box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* ── Short Card Edit Panel ── */
.vs-edit-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.vs-edit-toggle:hover { border-color: var(--primary); color: var(--primary); }
.vs-edit-toggle.active { background: rgba(212,175,55,0.1); border-color: var(--primary); color: var(--primary); }

.vs-edit-panel {
    display: none;
    margin-top: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 8px;
    padding: 12px 14px;
    gap: 12px;
    flex-direction: column;
}
.vs-edit-panel.open { display: flex; }

.vs-edit-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vs-edit-label {
    font-size: 0.73rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.vs-edit-input {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 6px 10px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.vs-edit-input:focus { outline: none; border-color: var(--primary); }
.vs-edit-row-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.vs-edit-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.vs-edit-color-swatch {
    width: 24px; height: 24px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    display: inline-block;
}
.vs-edit-color-swatch:hover { border-color: var(--primary); transform: scale(1.15); }
.vs-trim-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.vs-trim-input {
    width: 72px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.82rem;
    padding: 5px 8px;
    text-align: center;
    font-family: inherit;
}
.vs-trim-input:focus { outline: none; border-color: var(--primary); }
.vs-pos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 120px;
}
.vs-pos-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 0.65rem;
    padding: 4px 2px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.vs-pos-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(212,175,55,0.08); }
.vs-pos-btn.active { background: rgba(212,175,55,0.18); border-color: var(--primary); color: var(--primary); font-weight: 700; }
.vs-export-edited-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-gradient);
    color: #0a0d13;
    font-size: 0.78rem;
    font-weight: 700;
    border: none;
    border-radius: 7px;
    padding: 7px 14px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    align-self: flex-start;
    margin-top: 4px;
}
.vs-export-edited-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.vs-export-edited-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Responsive */
@media (max-width: 600px) {
    .vs-input-tab { font-size: 0.78rem; padding: 7px 10px; }
    .vs-yt-thumb { width: 100px; height: 56px; }
    .vs-signal-chip { font-size: 0.72rem; padding: 5px 10px; }
    .vs-short-card { padding: 11px 12px; }
    .vs-short-preview-video { max-height: 200px; }
}




