.editor-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.editor-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.editor-page .lead {
    color: var(--bs-secondary-color);
    margin-bottom: 2rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed rgba(255,255,255,0.18);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: rgba(255,255,255,0.03);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #6ea8fe;
    background: rgba(110,168,254,0.06);
}

.upload-zone i {
    font-size: 2.5rem;
    color: #6ea8fe;
    margin-bottom: 0.75rem;
}

.upload-zone p {
    margin: 0;
    color: var(--bs-secondary-color);
}

.upload-zone .upload-cta {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.25rem;
}

/* Editor Panel */
#editor-panel { display: none; }

.file-info-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.file-info-bar i { color: #6ea8fe; font-size: 1.2rem; }

.file-info-bar .file-name {
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info-bar .file-meta {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

/* Waveform */
.waveform-container {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: hidden;
    cursor: crosshair;
    user-select: none;
}

#waveform-canvas {
    display: block;
    width: 100%;
    height: 140px;
}

/* Trim handles overlay */
#trim-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}

.trim-mask {
    position: absolute;
    top: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    pointer-events: none;
}

#trim-mask-left  { left: 0; }
#trim-mask-right { right: 0; }

.trim-handle {
    position: absolute;
    top: 0; bottom: 0;
    width: 28px;
    cursor: ew-resize;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* vertical bar */
.trim-handle::after {
    content: '';
    display: block;
    width: 4px;
    height: 100%;
    background: #6ea8fe;
    border-radius: 0;
    box-shadow: 0 0 6px rgba(110,168,254,0.6);
}

/* top cap */
.trim-handle::before {
    content: '';
    position: absolute;
    top: 0;
    width: 16px;
    height: 20px;
    background: #6ea8fe;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

#handle-left  { transform: translateX(-50%); }
#handle-right { transform: translateX(-50%); }

.playhead {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: #fff;
    opacity: 0.7;
    pointer-events: none;
    transform: translateX(-50%);
}

/* Dual-range trim slider */
.trim-slider-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-top: none;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1rem 1.25rem 0.85rem;
    margin-bottom: 0.5rem;
}

.dual-range {
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dual-range-track {
    position: absolute;
    left: 0; right: 0;
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    pointer-events: none;
}

.dual-range-fill {
    position: absolute;
    height: 100%;
    background: #6ea8fe;
    border-radius: 3px;
}

.dual-range input[type="range"] {
    position: absolute;
    left: 0; right: 0;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
    height: 5px;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6ea8fe;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #1a1d21;
    box-shadow: 0 1px 5px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}

.dual-range input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6ea8fe;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #1a1d21;
    box-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.dual-range input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.15);
}

.trim-slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
}

.trim-slider-labels span b {
    color: var(--bs-body-color);
    font-weight: 600;
}

/* Time labels row */
.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--bs-secondary-color);
    padding: 0.25rem 0.25rem 0;
    margin-bottom: 1.5rem;
}

/* Transport */
.transport-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-transport {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.time-display {
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--bs-secondary-color);
    min-width: 120px;
}

/* Controls */
.controls-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.controls-card h5 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    margin-bottom: 1.25rem;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-row:last-child { margin-bottom: 0; }

.control-label {
    width: 100px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.control-value {
    width: 50px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}

/* Export */
.export-card {
    background: rgba(110,168,254,0.07);
    border: 1px solid rgba(110,168,254,0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.export-card h5 {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6ea8fe;
    margin-bottom: 1.25rem;
}

.export-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

#progress-bar-wrap { display: none; margin-top: 1rem; }

@media (max-width: 600px) {
    .control-label { width: 80px; }
    .transport-bar { flex-wrap: wrap; }
}