body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

code {
    background: #e5eefc;
    padding: 2px 6px;
    border-radius: 6px;
}

.container {
    max-width: 920px;
    margin: 40px auto;
    padding: 0 16px 40px;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 20px;
}

.subtitle {
    color: #4b5563;
    line-height: 1.7;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border: 2px dashed #93c5fd;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
    margin-top: 18px;
    text-align: center;
    padding: 18px;
    gap: 8px;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
}

.upload-hint {
    color: #4b5563;
    font-size: 14px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
}

.actions {
    margin-top: 18px;
}

button,
.ghost-button {
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
}

button[disabled] {
    background: #9ca3af;
    cursor: not-allowed;
}

.ghost-button {
    background: #e5e7eb;
    color: #111827;
}

.progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin: 12px 0;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.25s ease;
}

.status-text {
    color: #334155;
}

.log-area {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.55;
}

.error {
    color: #b91c1c;
    margin-top: 14px;
    line-height: 1.6;
}

.success {
    border: 1px solid #86efac;
    background: #f0fdf4;
}

.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

#loadingOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.88);
    z-index: 9999;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-title {
    font-size: 18px;
    font-weight: 600;
}

.loading-subtitle {
    color: #4b5563;
    text-align: center;
}

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