/* ================================================================
   EditStudio Browser Edition — CSS
   ================================================================ */
:root {
    --bg-dark: #0a0a0a; --panel-bg: #141414; --panel-light: #1c1c1c;
    --border-color: #262626; --accent-color: #2ed573; --accent-hover: #26af5f;
    --text-main: #f5f5f7; --text-muted: #8e8e93; --selected-glow: rgba(46, 213, 115, 0.4);
    --track-offset: 85px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
#editor-page { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.hidden { display: none !important; }

/* Sleek Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; border: 1px solid var(--bg-dark); }
::-webkit-scrollbar-thumb:hover { background: #666; }

/* Buttons & Inputs */
.btn { background-color: var(--panel-light); color: var(--text-main); border: 1px solid var(--border-color); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all 0.15s ease; }
.btn:hover { background-color: #2a2a2c; border-color: #444; }
.btn-accent { background-color: var(--accent-color); color: #000; border: none; font-weight: 600; }
.btn-accent:hover { background-color: var(--accent-hover); }
.btn-danger { background-color: #ff4d4d; color: white; border: none; }
.btn-danger:hover { background-color: #e60000; }
.btn-outline { background: transparent; border: 1px solid var(--accent-color); color: var(--accent-color); }
.btn-outline:hover { background: rgba(46, 213, 115, 0.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { padding: 6px 10px; font-size: 14px; }
.full-width { width: 100%; padding: 12px; font-size: 14px; }
.highlight { color: var(--accent-color); }

select, input[type="text"], input[type="file"], input[type="range"] { background-color: var(--bg-dark); color: var(--text-main); padding: 8px; border-radius: 6px; border: 1px solid var(--border-color); width: 100%; margin-top: 4px; outline: none; font-size: 13px; }
textarea { background-color: var(--bg-dark); color: var(--text-main); padding: 12px; border-radius: 6px; border: 1px solid var(--border-color); width: 100%; height: 200px; margin-top: 8px; font-family: monospace; font-size: 12px; resize: none; outline: none;}
input[type="range"] { appearance: none; height: 4px; background: #444; cursor: pointer; padding: 0; border: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent-color); }
label { font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-top: 12px; margin-bottom: 2px;}

/* Toggle Switches */
.switch-container { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 15px 0; padding: 10px; background: #1a1a1a; border-radius: 6px; border: 1px solid var(--border-color); transition: 0.2s; }
.switch-container:hover { border-color: #444; }
.switch { appearance: none; width: 36px; height: 20px; background: #555; border-radius: 20px; position: relative; outline: none; cursor: pointer; transition: 0.3s; flex-shrink: 0; margin:0; border:none;}
.switch:checked { background: var(--accent-color); }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.switch:checked::after { transform: translateX(16px); }
.switch-label { font-size: 13px; font-weight: 600; color: #fff; }

/* Resizers */
.resizer-v { width: 4px; background: var(--border-color); cursor: ew-resize; z-index: 40; transition: background 0.2s; }
.resizer-v:hover, .resizer-v.dragging { background: var(--accent-color); }
.resizer-h { height: 4px; background: var(--border-color); cursor: ns-resize; z-index: 40; transition: background 0.2s; }
.resizer-h:hover, .resizer-h.dragging { background: var(--accent-color); }

/* Toasts & Modals */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--panel-light); color: var(--text-main); padding: 12px 18px; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); font-size: 13px; border-left: 3px solid var(--accent-color); font-weight: 500; transition: 0.3s ease; }
.toast.error { border-left-color: #ff4d4d; }
.toast.hide { opacity: 0; transform: translateX(100%); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 8000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(2px);}
.modal-card { background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 24px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.7); }
.modal-desc { color: var(--text-muted); font-size: 12px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; justify-content: flex-end; }

/* Loaders */
.loader-content { text-align: center; }
.spinner { width: 40px; height: 40px; border: 3px solid #222; border-top-color: var(--accent-color); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
.progress-track { width: 100%; height: 6px; background: #222; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { width: 0%; height: 100%; background: var(--accent-color); transition: width 0.3s ease; }

/* ================================================================
   WELCOME SCREEN
   ================================================================ */
#welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #18181b 0%, #09090b 60%);
    overflow-y: auto;
    padding: 40px 20px;
    position: relative;
}

.welcome-container {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.welcome-hero {
    text-align: center;
    position: relative;
}

.welcome-glow {
    position: absolute;
    width: 400px; height: 400px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(46,213,115,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

@keyframes glow-pulse {
    from { opacity: 0.5; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1;   transform: translate(-50%, -50%) scale(1.1);  }
}

.welcome-hero h1 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.welcome-tagline {
    color: var(--text-muted);
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* Setup Cards */
.welcome-setup {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.setup-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
    position: relative;
}

.setup-card:hover {
    border-color: #444;
    transform: translateX(4px);
}

.setup-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 213, 115, 0.06);
    border-radius: 10px;
}

.setup-card-info {
    flex: 1;
}

.setup-card-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.setup-card-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.opt-badge {
    background: rgba(255, 235, 59, 0.12);
    color: #FFEB3B;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-badge {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    background: rgba(46, 213, 115, 0.1);
    border-top: 1px solid rgba(46, 213, 115, 0.2);
    border-radius: 0 0 12px 12px;
    padding: 6px 20px;
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 500;
    text-align: center;
}

/* Launch Button */
.btn-launch {
    width: 280px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-launch:not(:disabled):hover {
    transform: scale(1.04);
    box-shadow: 0 8px 30px rgba(46, 213, 115, 0.3);
}

.btn-launch:not(:disabled)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

.btn-launch-icon {
    font-size: 20px;
}

.welcome-drop-hint {
    color: var(--text-muted);
    font-size: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed #333;
    border-radius: 8px;
    text-align: center;
}

/* Drag Over Feedback */
body.drag-over #welcome-screen {
    background: radial-gradient(ellipse at top, #1a2f1e 0%, #09090b 60%);
}
body.drag-over .welcome-drop-hint {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(46, 213, 115, 0.05);
}

/* Main Workspace */
.top-navbar { height: 48px; background: var(--panel-bg); border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; padding: 0 16px; z-index: 10; }
.nav-group { display: flex; gap: 8px; align-items: center;}
.main-workspace { display: flex; flex: 1; overflow: hidden; position: relative; }

/* Media Pool */
.media-pool { background: var(--panel-bg); display: flex; flex-direction: column; width: 260px; min-width: 60px; overflow: hidden; transition: 0.2s;}
.media-header { padding: 12px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; white-space: nowrap;}
.add-assets { margin:0; cursor:pointer; color:var(--accent-color); font-size:11px; border:none; background:none; font-weight:600; }
.add-all-btn { background: rgba(46, 213, 115, 0.12) !important; padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(46, 213, 115, 0.3) !important; transition: all 0.2s; }
.add-all-btn:hover { background: rgba(46, 213, 115, 0.25) !important; border-color: var(--accent-color) !important; }
.pool-divider { width: 1px; height: 14px; background: var(--border-color); display: inline-block; }
.media-grid { flex: 1; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.media-card { background: var(--panel-light); border: 1px solid var(--border-color); border-radius: 8px; cursor: grab; display: flex; flex-direction: column; overflow: hidden; position: relative; transition: border 0.15s, transform 0.15s, box-shadow 0.15s;}
.media-card:hover { border-color: var(--accent-color); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.media-card:active { cursor: grabbing; }
.media-card img { width: 100%; height: 80px; object-fit: cover; pointer-events: none; display: block; background: #111; }
.media-card span { font-size: 9px; padding: 5px 6px; text-align: center; color: var(--text-muted); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; pointer-events: none; background: rgba(0,0,0,0.3); font-weight: 500; letter-spacing: 0.2px;}

/* Canvas Viewport */
.viewport-area { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; background-color: var(--bg-dark); padding: 16px;}
.canvas-container { background: #000; width: 100%; height: 100%; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 12px 40px rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; }
canvas#render-canvas { width: 100%; height: 100%; object-fit: contain; }

/* Aspect Ratio Selector */
.aspect-selector-wrapper { display: flex; align-items: center; gap: 4px; background: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 6px; padding: 2px 4px 2px 8px; transition: border-color 0.2s; }
.aspect-selector-wrapper:hover { border-color: var(--accent-color); }
.aspect-label { font-size: 13px; margin: 0; padding: 0; color: var(--text-muted); cursor: default; text-transform: none; letter-spacing: 0; font-weight: normal; }
.aspect-select { background: transparent; border: none; color: var(--accent-color); font-size: 12px; font-weight: 600; padding: 4px 2px; cursor: pointer; width: auto; min-width: 110px; margin: 0; outline: none; }
.aspect-select option { background: var(--panel-bg); color: var(--text-main); }

/* Timeline */
.timeline-wrapper { height: 280px; background: var(--panel-bg); display: flex; flex-direction: column; user-select: none; flex-shrink: 0; }
.timeline-toolbar { height: 40px; border-bottom: 1px solid var(--border-color); background: var(--panel-light); display: flex; justify-content: space-between; align-items: center; padding: 0 16px; }
.divider { width: 1px; height: 16px; background: var(--border-color); margin: 0 4px; }
.playback-counter { font-family: monospace; font-size: 13px; color: var(--accent-color); font-weight: 600; background: #0a0a0a; padding: 4px 10px; border-radius: 4px; border: 1px solid #333; }

.timeline-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; position: relative; background: #0f0f11; }
.timeline-canvas-container { position: relative; height: 100%; min-width: 100%; }
.timeline-ruler { position: absolute; top: 0; left: 0; height: 24px; width: 100%; background: var(--panel-bg); border-bottom: 1px solid var(--border-color); z-index: 15; cursor: pointer; }
canvas#ruler-canvas { position: absolute; left: var(--track-offset); height: 100%; pointer-events: none; }
.track-headers { position: absolute; left: 0; top: 0; bottom: 0; width: var(--track-offset); background: rgba(20,20,20,0.95); z-index: 25; border-right: 1px solid var(--border-color); pointer-events: none;}
.track-title { position: absolute; left: 10px; font-size: 10px; font-weight: 700; color: var(--text-muted); margin-top: 12px;}

.timeline-track { position: relative; width: 100%; border-bottom: 1px solid var(--border-color); }
#video-track { height: 120px; margin-top: 24px; background: rgba(255,255,255,0.01); }
#audio-track { height: 76px; background: rgba(0,0,0,0.3); }
#clip-holder { position: absolute; left: var(--track-offset); right: 0; top: 8px; bottom: 8px; display: flex; z-index: 10; height: 104px; min-width: 100%; }

/* Clips */
.clip { position: relative; height: 100%; min-width: 30px; background: var(--panel-light); border: 1px solid #3a3a3c; border-radius: 6px; cursor: grab; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; transition: transform 0.2s; }
.clip.dragging { opacity: 0.4; transition: none; }
.clip.resizing { transition: none; }
.clip.selected { border: 2px solid var(--accent-color); box-shadow: 0 0 10px var(--selected-glow); z-index: 12; }
.clip img { height: 100%; width: 100%; object-fit: cover; position: absolute; opacity: 0.7; pointer-events: none; }
.clip.selected img { opacity: 0.95; }
.clip span { position: relative; z-index: 2; font-size: 11px; font-weight: 600; background: rgba(0,0,0,0.7); padding: 2px 6px; border-radius: 4px; max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;}
.fx-badge { position: absolute; top: 4px; left: 4px; font-size: 9px; background: var(--accent-color); color: #000; padding: 2px 5px; border-radius: 3px; font-weight: bold; z-index: 15; pointer-events: none; box-shadow: 0 2px 4px rgba(0,0,0,0.5);}

.edge-handle { position: absolute; top: 0; width: 10px; height: 100%; background: transparent; cursor: ew-resize; z-index: 5; }
.edge-handle.left { left: 0; } .edge-handle.right { right: 0; }
.edge-handle:hover, .clip.selected .edge-handle { background: rgba(46, 213, 115, 0.3); }

.indicator-line { position: relative; width: 0px; height: 100%; background: rgba(56, 189, 248, 0.2); border: 2px dashed var(--accent-color); border-radius: 4px; box-sizing: border-box; transition: width 0.2s ease, margin 0.2s ease; z-index: 16; display: none; pointer-events: none; margin: 0; flex-shrink: 0; }
.indicator-line.active-gap { width: 100px; margin: 0 5px; display: block; }
canvas#waveform { position: absolute; top: 8px; left: var(--track-offset); height: 60px; pointer-events: none; opacity: 0.8; }
.playhead-bar { position: absolute; top: 0; bottom: 0; width: 1px; background-color: #ff4d4d; z-index: 30; pointer-events: none;}
.playhead-bar::before { content: ''; position: absolute; top: 0; left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid #ff4d4d; }

/* Studio Modal */
#fx-studio-window { position: fixed; inset: 0; background: var(--bg-dark); z-index: 6000; display: flex; }
.studio-sidebar { width: 360px; background: var(--panel-bg); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
.studio-content { flex: 1; display: flex; flex-direction: column; padding: 16px; overflow-y: auto; gap: 16px; }
.studio-tabs { display: flex; border-bottom: 1px solid var(--border-color); background: var(--panel-light); }
.tab-btn { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px; cursor: pointer; font-size: 12px; font-weight: 600; text-transform: uppercase; border-bottom: 2px solid transparent;}
.tab-btn.active { color: var(--accent-color); border-bottom-color: var(--accent-color); background: rgba(255,255,255,0.02); }

.studio-card { background: var(--panel-light); border: 1px solid var(--border-color); padding: 16px; border-radius: 8px; margin-bottom: 16px;}
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px;}
.checkbox-grid label { margin: 0; font-size: 11px; display: flex; align-items: center; gap: 6px; color: #fff; background: #222; padding: 6px; border-radius: 4px; border: 1px solid #333; cursor: pointer; text-transform: none;}
.checkbox-grid label:hover { border-color: #555; }
.checkbox-grid input { margin: 0; width: auto; cursor: pointer; accent-color: var(--accent-color);}

.subgroup { background: #222; padding: 12px; border-radius: 6px; margin-top: 10px; border: 1px solid #333;}
.range-val { text-align: right; font-size: 11px; color: var(--accent-color); margin-top: 4px; font-weight: bold;}
.studio-footer { padding: 16px; border-top: 1px solid var(--border-color); display: flex; gap: 10px; background: var(--panel-light); }
.studio-footer .btn { flex: 1; }

.cropper-monitor-area { flex: 1; background: #09090b; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; }
.crop-canvas-wrapper { position: relative; background: #000; box-shadow: 0 10px 40px rgba(0,0,0,0.8); border: 2px dashed #444; overflow: hidden; cursor: move; }
canvas#fx-studio-canvas, canvas#subs-studio-canvas { width: 100%; height: 100%; display: block; object-fit: contain; }
.live-badge { position: absolute; top: 16px; left: 16px; background: rgba(0,0,0,0.7); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 20px; font-size: 10px; font-weight: bold; color: var(--accent-color); letter-spacing:1px; z-index: 10; display:flex; align-items:center; gap:6px;}
.live-badge::before { content:''; width:6px; height:6px; background:var(--accent-color); border-radius:50%; animation: pulse 1s infinite alternate;}
.helper-text { color: var(--text-muted); font-size: 11px; margin-top: 16px; }
.crop-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.filename-lbl { font-size:11px; color: var(--text-muted); text-align:center; margin-top:8px; word-break:break-all; }

/* ================================================================
   EXPORT STUDIO
   ================================================================ */
#export-studio {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 7000;
    display: flex;
    flex-direction: column;
}
.export-header {
    height: 52px;
    background: var(--panel-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    flex-shrink: 0;
}
.export-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin-right: auto;
}
.export-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.export-tabs .tab-btn {
    padding: 8px 20px;
    border-bottom: none;
    border-radius: 0;
    font-size: 12px;
    min-width: 140px;
}
.export-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}
.export-sidebar {
    width: 340px;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.export-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #09090b;
    padding: 24px;
    position: relative;
}
.export-preview-label {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    color: var(--accent-color);
    letter-spacing: 1px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}
.export-preview canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

/* Export Stats Grid */
.export-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.export-stat {
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}
.stat-label {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.stat-value {
    display: block;
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
}

/* Export Complete Banner */
.export-complete-banner {
    background: rgba(46, 213, 115, 0.08);
    border: 1px solid rgba(46, 213, 115, 0.25);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.export-complete-banner h3 {
    color: var(--accent-color);
    margin-bottom: 8px;
    font-size: 16px;
}
.export-complete-banner p {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

/* Context Menu */
.context-menu { position: fixed; background: #2a2a35; border: 1px solid #444; border-radius: 6px; padding: 5px 0; z-index: 10000; box-shadow: 0 4px 15px rgba(0,0,0,0.5); width: 180px; }
.context-menu-item { padding: 10px 15px; font-size: 14px; cursor: pointer; color: #eee; transition: background 0.1s; }
.context-menu-item:hover { background: #3f3f50; }

@keyframes pulse { from { opacity: 0.4; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .main-workspace { flex-direction: column; }
    .media-pool { width: 100% !important; height: 160px !important; border-right: none; border-bottom: 1px solid var(--border-color); flex-shrink: 0;}
    .resizer-v { display: none; }
    
    #fx-studio-window, #subs-studio-window { flex-direction: column-reverse !important; overflow-y: auto; overflow-x: hidden; }
    .studio-sidebar { width: 100% !important; flex: none; border-right: none; height: auto; }
    #subs-list-panel { width: 100% !important; border-left: none; border-top: 1px solid var(--border-color); flex: none; height: 300px; }
    .cropper-monitor-area { height: 40vh; flex: none !important; border-bottom: 1px solid var(--border-color); width: 100%; }
    
    .welcome-hero h1 { font-size: 32px; }
    .welcome-tagline { font-size: 13px; padding: 0 10px; }
    .welcome-container { padding: 10px; }
    .btn-launch { width: 100%; }
    
    .export-body { flex-direction: column-reverse; }
    .export-sidebar { width: 100%; border-right: none; border-top: 1px solid var(--border-color); height: auto; flex: none; }
    
    .top-navbar { height: auto; min-height: 48px; flex-direction: column; padding: 10px; gap: 10px; }
    .nav-group { flex-wrap: wrap; justify-content: center; width: 100%; gap: 8px; }
    .nav-group .btn { font-size: 12px; padding: 8px 12px; flex: 1 1 auto; text-align: center; justify-content: center; }
    .aspect-selector-wrapper { flex: 1 1 100%; justify-content: center; padding: 6px; }
    
    .timeline-toolbar { height: auto; flex-direction: column; padding: 10px; gap: 10px; }
    .timeline-toolbar .nav-group { width: 100%; justify-content: center; }
    .playback-counter { text-align: center; width: 100%; }
    
    .viewport-area { padding: 8px; }
    .modal-card { width: 95%; padding: 16px; margin: 10px; }
}
