/* ==========================================================================
   S STUDIO - SHARED DARK CINEMA WORKSPACE STYLES (workspace.css)
   ========================================================================== */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0b0e14;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Top Studio Navbar */
.studio-navbar {
    height: 56px;
    background: #111420;
    border-bottom: 1px solid #1e293b;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 100;
}

.nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-soft-back {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-soft-back:hover { background: #334155; }

.studio-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.brand-badge {
    background: #ffffff;
    color: #0f172a;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 15px;
}
.brand-title {
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
}

.save-status-pill {
    font-size: 11px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.btn-primary-upload {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary-upload:hover { background: #1d4ed8; }

.btn-studio-secondary, .btn-icon-action {
    background: #181d2c;
    color: #cbd5e1;
    border: 1px solid #334155;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-studio-secondary:hover, .btn-icon-action:hover {
    background: #252d42;
    color: #ffffff;
}

.btn-export-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.btn-export-photo {
    background: linear-gradient(135deg, #7c3aed, #059669);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* Main Workspace Preview Area */
.studio-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    position: relative;
}

.preview-stage {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.media-canvas-wrapper {
    width: 92%;
    max-width: 1150px;
    height: 100%;
    max-height: 58vh;
    background: #05070a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.empty-canvas-prompt {
    text-align: center;
    padding: 20px;
}

/* Video Player Controls */
.player-controls-bar {
    margin-top: 10px;
    background: #111420;
    border: 1px solid #1e293b;
    padding: 6px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctrl-btn {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.ctrl-play-main {
    background: #2563eb;
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.timer-readout {
    font-family: monospace;
    font-size: 12.5px;
    color: #94a3b8;
    padding: 0 6px;
}

/* Video Timeline Dock */
.timeline-dock {
    background: #111420;
    border-top: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.timeline-header-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background: #0d1019;
    border-bottom: 1px solid #1e293b;
}

.timeline-tracks-scroll {
    position: relative;
    padding: 8px 14px;
    background: #0b0e14;
    overflow-x: auto;
    cursor: pointer;
}

.timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0%;
    width: 2px;
    background: #ef4444;
    z-index: 50;
    pointer-events: none;
}

.track-row {
    display: flex;
    align-items: center;
    background: #151926;
    border: 1px solid #1e293b;
    border-radius: 5px;
    height: 32px;
    margin-bottom: 4px;
}
.main-video-row { height: 38px; margin-bottom: 0; }

.track-label {
    width: 105px;
    height: 100%;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid #334155;
    cursor: pointer;
    flex-shrink: 0;
}

.track-lane {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    position: relative;
}

/* Bottom Tools Bar (Video & Photo) */
.tools-dock-bar, .photo-dock-bar {
    background: #0f131e;
    border-top: 1px solid #1e293b;
    padding: 10px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-chip {
    background: #181d2c;
    color: #f1f5f9;
    border: 1px solid #334155;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.tool-chip:hover { background: #252d42; border-color: #64748b; }
.chip-green { background: #14532d; border-color: #22c55e; color: #dcfce7; }
.chip-indigo { background: #1e1b4b; border-color: #6366f1; color: #e0e7ff; }
.chip-cyan { background: #0c4a6e; border-color: #38bdf8; color: #e0f2fe; }
.chip-danger { background: #7f1d1d; border-color: #ef4444; color: #fee2e2; }

.blur-slider-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #181d2c;
    border: 1px solid #334155;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
}

/* Floating Sub-Panels & Modals */
.floating-sub-panel {
    position: fixed;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: #151926;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px;
    width: 340px;
    max-width: 92vw;
    z-index: 500;
    box-shadow: 0 12px 30px rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 12.5px;
}
.sub-panel-top {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #38bdf8;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 6px;
}
.floating-sub-panel label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #cbd5e1;
}
.floating-sub-panel input[type="range"] { width: 100%; accent-color: #38bdf8; }

.studio-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.studio-modal-box {
    background: #151926;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    color: #f8fafc;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 10px;
    margin-bottom: 14px;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-header button { background: none; border: none; color: #94a3b8; font-size: 18px; cursor: pointer; }

.ratio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ratio-grid button {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.ratio-grid button:hover { background: #2563eb; border-color: #2563eb; }