/* Analyze Video — local Qwen3.5-27B visual interpretation */

#analyzeVideoMode {
    color: var(--text-primary, #e6e8ef);
}

.analyze-breadcrumb {
    margin: 0 0 10px;
    color: var(--text-muted, #94a3b8);
    font-size: 13px;
}

.analyze-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 14px;
}

.analyze-card {
    background: var(--surface, #1b1e26);
    border: 1px solid var(--border, #3a3f4b);
    border-radius: 12px;
    padding: 16px;
}

.analyze-info-card {
    border-color: rgba(250, 204, 21, 0.55);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.08), rgba(27, 30, 38, 0.9));
}

.analyze-dropzone {
    border: 2px dashed var(--border, #3a3f4b);
    background: #111827;
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}

.analyze-dropzone:hover,
.analyze-dropzone.drag-hover {
    background: #171b25;
    border-color: #8b5cf6;
}

.analyze-dropzone-icon {
    display: block;
    font-size: 38px;
    margin-bottom: 8px;
}

.analyze-dropzone-main {
    font-weight: 700;
    margin-bottom: 4px;
}

.analyze-dropzone-sub {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

.analyze-preview {
    width: 100%;
    max-height: 340px;
    margin-top: 12px;
    background: #000;
    border-radius: 10px;
    border: 1px solid #2b2f3a;
}

.analyze-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.analyze-metadata div {
    background: #111827;
    border: 1px solid #2b2f3a;
    border-radius: 8px;
    padding: 8px 10px;
}

.analyze-metadata span {
    display: block;
    color: var(--text-muted, #94a3b8);
    font-size: 11px;
    margin-bottom: 3px;
}

.analyze-metadata strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.analyze-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.analyze-settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.analyze-settings-grid select,
.analyze-settings-grid input[type="number"] {
    background: var(--input-bg, #12141a);
    color: var(--text-primary, #e6e8ef);
    border: 1px solid var(--border, #3a3f4b);
    border-radius: 7px;
    padding: 7px 8px;
}

.analyze-settings-grid .analyze-checkbox {
    justify-content: center;
    flex-direction: row;
    align-items: center;
    color: var(--text-primary, #e6e8ef);
}

.analyze-warning {
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(250, 204, 21, 0.55);
    border-radius: 8px;
    color: #fde68a;
    background: rgba(120, 53, 15, 0.35);
    font-size: 12px;
}

.analyze-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.analyze-actions .danger {
    border-color: #ef4444;
    color: #fecaca;
}

.analyze-progress {
    margin-top: 14px;
}

.analyze-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

.analyze-progress-bar {
    height: 7px;
    border-radius: 999px;
    background: #111827;
    overflow: hidden;
    margin: 8px 0;
}

.analyze-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #7c3aed, #c084fc);
    transition: width 160ms ease;
}

.analyze-steps {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

.analyze-log-tail {
    margin-top: 10px;
    padding: 8px 10px;
    background: #0b1220;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #cbd5e1;
    font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    max-height: 120px;
    overflow: auto;
}

.analyze-log-tail span {
    color: #94a3b8;
    margin-right: 6px;
}

.analyze-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

.analyze-step::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #374151;
}

.analyze-step.active::before {
    background: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.analyze-step.done::before {
    background: #22c55e;
}

.analyze-results {
    margin-top: 14px;
}

.analyze-result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.analyze-result-tab {
    border: 1px solid #3a3f4b;
    color: var(--text-primary, #e6e8ef);
    background: #111827;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
}

.analyze-result-tab.active {
    background: #7c3aed;
    border-color: #a78bfa;
    color: #fff;
}

.analyze-result-content {
    max-height: 520px;
    overflow: auto;
    background: #0b1220;
    border: 1px solid #2b2f3a;
    border-radius: 10px;
    padding: 12px;
}

.analyze-result-content pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
    font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.analyze-status-line {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
    margin-left: 4px;
}

@media (max-width: 900px) {
    .analyze-layout {
        grid-template-columns: 1fr;
    }
}
