/* Stem Splitter styles v3 */

/* ── Processing stepper ── */
.split-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}

.split-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--muted, #555);
    transition: color 0.3s;
}

.split-step span {
    letter-spacing: 0.02em;
}

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border, #2a2a2a);
    background: var(--bg-input, #111);
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
    position: relative;
}

.step-connector {
    width: 48px;
    height: 2px;
    background: var(--border, #2a2a2a);
    margin-bottom: 20px;
    flex-shrink: 0;
    transition: background 0.3s;
}

/* Active step */
.split-step.active .step-dot {
    border-color: var(--green);
    background: rgba(0, 230, 138, 0.12);
    box-shadow: 0 0 8px rgba(0, 230, 138, 0.3);
    animation: stepPulse 1.4s ease-in-out infinite;
}
.split-step.active {
    color: var(--green-bright, #00e68a);
}
@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 230, 138, 0.3); }
    50%       { box-shadow: 0 0 14px rgba(0, 230, 138, 0.6); }
}

/* Done step */
.split-step.done .step-dot {
    border-color: var(--green);
    background: var(--green);
}
.split-step.done .step-dot::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #000;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
    width: 100%;
}
.split-step.done {
    color: var(--green);
}
.step-connector.done {
    background: var(--green);
}

.progress-bar-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    height: 4px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--green-bright));
    border-radius: 4px;
    transition: width 0.5s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Mobile file button */
.btn-file-mobile {
    display: none;
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--green-dim);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--green);
    font: 600 .88rem/1 'Inter', sans-serif;
    cursor: pointer;
    transition: .25s;
}

.btn-file-mobile:hover {
    background: var(--green);
    color: #040a07;
}

@media (max-width: 768px) {
    .btn-file-mobile { display: inline-block; }
}

/* Master transport */
.master-transport {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.transport-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transport-btn:hover {
    border-color: var(--green);
    background: var(--green-dim);
}

.master-time {
    font: 500 .88rem/1 'Inter', sans-serif;
    color: var(--gray);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

/* Stems list */
.stems-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stem-track {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: .3s;
    height: 72px;
    display: flex;
    align-items: center;
}

.stem-track:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.stem-track.muted { opacity: 0.5; }

/* Stem colors */
.stem-track[data-stem="drums"]  { background: #1a3a2a; }
.stem-track[data-stem="bass"]   { background: #2a1a3a; }
.stem-track[data-stem="other"]  { background: #3a3a1a; }
.stem-track[data-stem="vocals"] { background: #3a1a2a; }

/* Track info */
.stem-info {
    position: absolute;
    top: 8px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}

.stem-info .stem-icon { font-size: 1rem; }

.stem-info .stem-name {
    font: 700 .72rem/1 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* Solo / Mute controls */
.stem-controls {
    position: absolute;
    bottom: 6px;
    left: 14px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.solo-btn, .mute-btn {
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    background: rgba(0,0,0,0.4);
    color: rgba(255,255,255,0.6);
    font: 700 .65rem/1.4 'Inter', sans-serif;
    cursor: pointer;
    transition: .2s;
}

.solo-btn:hover, .mute-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.solo-btn.active {
    background: var(--green);
    color: #040a07;
    border-color: var(--green);
}

/* Waveform */
.waveform-container {
    position: absolute;
    inset: 0;
    cursor: pointer;
    z-index: 1;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
}

/* Download button on track */
.stem-dl-row {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 3;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity .2s;
}

.stem-track:hover .stem-dl-row { opacity: 1; }

.stem-dl-btn {
    padding: 4px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 100px;
    color: rgba(255,255,255,0.75);
    font: 600 .7rem/1 'Inter', sans-serif;
    text-decoration: none;
    transition: background .2s, color .2s;
    white-space: nowrap;
}

.stem-dl-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

.stem-size {
    opacity: 0.6;
    font-weight: 400;
    margin-left: 3px;
}

/* Results actions */
.results-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.results-actions .btn { flex: 1; text-align: center; }

.btn-secondary {
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--white);
    font: 700 .92rem/1 'Inter', sans-serif;
    cursor: pointer;
    transition: .25s;
}

.btn-secondary:hover {
    border-color: var(--green);
    background: var(--green-dim);
}

/* Uploaded file info */
.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--green-dim);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: .88rem;
    color: var(--green);
    font-weight: 600;
}

.file-info .remove-file {
    cursor: pointer;
    opacity: 0.7;
    transition: .2s;
}

.file-info .remove-file:hover { opacity: 1; }

@media (max-width: 640px) {
    .stem-track { height: 60px; }
    .results-actions { flex-direction: column; }
    .master-transport { flex-wrap: wrap; }
}
