*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
}

main {
    max-width: 720px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
}

header p {
    color: #666;
    font-size: 0.95rem;
}

#drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

#drop-zone.dragover {
    border-color: #4f46e5;
    background: #eef2ff;
}

#drop-zone p {
    color: #666;
    font-size: 0.9rem;
}

.file-label {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #4f46e5;
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.file-label:hover {
    background: #4338ca;
}

#file-name {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.muted {
    color: #999;
}

.provider-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.provider-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.provider-row select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    color: #1a1a1a;
}

#upload-btn,
#download-btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

#upload-btn {
    background: #4f46e5;
    color: #fff;
}

#upload-btn:hover:not(:disabled) {
    background: #4338ca;
}

#upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#download-btn {
    background: #059669;
    color: #fff;
}

#download-btn:hover {
    background: #047857;
}

#status-section {
    text-align: center;
    padding: 2rem 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#status-text {
    color: #666;
    font-size: 0.95rem;
}

#error-section {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

#error-text {
    color: #dc2626;
    font-size: 0.9rem;
}

#transcript {
    margin-bottom: 1rem;
}

.utterance {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.utterance:last-child {
    border-bottom: none;
}

.utterance-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.speaker-label {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.speaker-0 { background: #4f46e5; }
.speaker-1 { background: #059669; }
.speaker-2 { background: #d97706; }
.speaker-3 { background: #dc2626; }
.speaker-4 { background: #7c3aed; }
.speaker-5 { background: #0891b2; }

.timestamp {
    font-size: 0.75rem;
    color: #999;
    font-variant-numeric: tabular-nums;
}

.utterance-text {
    font-size: 0.95rem;
    line-height: 1.5;
}
