/* ── Transcriber Page Styles ── */

.tr-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* ── Drop Zone ── */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-light);
    background: rgba(83, 52, 131, 0.1);
}

.drop-zone.drag-over {
    transform: scale(1.01);
}

.drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}

.drop-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin: 8px 0;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
}

.btn-primary {
    background: var(--accent-light);
    color: white;
}

.btn-primary:hover {
    background: #6b44a8;
}

.btn-secondary {
    background: var(--bg-input);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d63851;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-start {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: var(--success);
    color: white;
    border-radius: var(--radius);
}

.btn-start:hover:not(:disabled) {
    background: #00a381;
}

.btn-start:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── File List ── */
.file-list {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
}

.file-list-items {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.file-item-size {
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.file-item-status {
    margin-left: 8px;
    flex-shrink: 0;
    font-size: 12px;
}

.file-item.status-transcribing { color: var(--accent-light); }
.file-item.status-done { opacity: 0.6; }
.file-item.status-done .file-item-status { color: var(--success); }
.file-item.status-error { opacity: 0.6; }
.file-item.status-error .file-item-status { color: var(--danger); }

/* ── Settings Grid ── */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.setting-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.setting-group select:focus {
    outline: none;
    border-color: var(--accent-light);
}

input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    border: none;
    margin-top: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-light);
    cursor: pointer;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-light);
}

/* ── Reviewer Section ── */
.reviewer-section {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.reviewer-section select {
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
}

.reviewer-section select:disabled {
    opacity: 0.4;
}

/* ── Progress ── */
.progress-section {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light), var(--success));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Log ── */
.log-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
}

.log-output {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-line {
    color: var(--text-muted);
}

.log-line.status { color: var(--accent-light); }
.log-line.success { color: var(--success); }
.log-line.error { color: var(--danger); }
.log-line.progress { color: #e0c97f; }

/* ── Results ── */
.results-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
}

.results-container h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item-name {
    flex: 1;
}

.result-item-meta {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 12px;
}

.result-item-links {
    display: flex;
    gap: 6px;
}

.result-item-links a {
    padding: 3px 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
}

.result-item-links a:hover {
    background: var(--accent);
}

/* ── Spinner ── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent-light);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .reviewer-section {
        flex-wrap: wrap;
    }
}
