/* AI AutoCut view CSS extracted from app.css.
   Scope: /views/autocut.html step flow, upload/drop area, processing/result/download UI. */

/* ---------- Step Indicator ---------- */
.autocut-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition-normal);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-subtle);
    transition: background var(--transition-normal);
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.step-item.active .step-label {
    color: var(--text-primary);
}

.step-item.done .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-item.done .step-label {
    color: var(--success);
}

.step-line.done {
    background: var(--success);
}

/* ---------- Drop Zone ---------- */
.drop-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.drop-zone:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.04);
}

.drop-zone.drag-over {
    border-color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
}

.drop-zone-icon { font-size: 48px; margin-bottom: 12px; }
.drop-zone-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.drop-zone-hint { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.file-input-hidden { display: none; }

/* ---------- Selected Files ---------- */
.selected-files {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(7, 20, 38, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
}

.file-item-icon { font-size: 18px; flex-shrink: 0; }
.file-item-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.file-item-size { font-size: 12px; color: var(--text-muted); }

.upload-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}


/* ---------- Processing Progress ---------- */
.processing-progress-container {
    text-align: center;
    padding: 16px 0;
}

.processing-progress-value {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.progress-bar-lg {
    height: 12px;
    border-radius: 6px;
    margin: 16px 0;
}

.progress-fill-animated {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
    background-size: 200% 100%;
    animation: progress-glow 2s ease infinite;
}

@keyframes progress-glow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.processing-progress-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---------- Processing Log ---------- */
.processing-log {
    max-height: 280px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.8;
    background: rgba(3, 10, 20, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}

.log-line {
    padding: 2px 0;
    color: var(--text-secondary);
}

.log-line.success { color: var(--success); }
.log-line.error { color: var(--error); }
.log-line.info { color: var(--accent-cyan); }
.log-line.warn { color: var(--warn); }

/* ---------- Result Summary ---------- */
.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.result-item {
    background: rgba(7, 20, 38, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.result-item-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.result-item-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}


/* ---------- Download Buttons ---------- */
.download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-user-select: none;
    user-select: none;
}

.btn-download.primary {
    background: linear-gradient(135deg, var(--success), #2dd4bf);
    color: var(--text-inverted);
    box-shadow: 0 4px 16px rgba(66, 211, 146, 0.25);
}

.btn-download.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(66, 211, 146, 0.35);
}

.btn-download.secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn-download.secondary:hover {
    background: var(--bg-surface);
    border-color: var(--border-strong);
}

.btn-download.share {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: var(--text-inverted);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.28);
}

.btn-download.share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(34, 211, 238, 0.32);
}

.share-target-row {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.share-target-btn {
    border: 1px solid var(--border-default);
    background: rgba(15, 23, 42, 0.74);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-target-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: rgba(59, 130, 246, 0.14);
}

/* ---------- Output File List ---------- */
.output-file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
}

.output-file-row:last-child { border-bottom: none; }

.output-file-icon { font-size: 18px; }
.output-file-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.output-file-size { color: var(--text-muted); font-size: 12px; }
.output-file-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.output-file-badge.video { background: var(--accent-purple-dim); color: var(--accent-purple); }
.output-file-badge.report { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.output-file-badge.other { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }

.output-file-download {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid rgba(45, 212, 191, 0.36);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.14);
    color: var(--accent-cyan);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.output-file-download:hover {
    border-color: rgba(45, 212, 191, 0.64);
    background: rgba(20, 184, 166, 0.22);
    color: var(--text-primary);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .output-file-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .output-file-name {
        flex-basis: calc(100% - 32px);
    }

    .output-file-download {
        width: 100%;
    }
}
