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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d1117;
    color: #e6edf3;
    min-height: 100vh;
    padding: 2rem 1rem;
    line-height: 1.5;
}

.container {
    max-width: 720px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #8b949e;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #e6edf3;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #58a6ff;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e6edf3;
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #58a6ff;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn.primary {
    background: #238636;
    color: #fff;
}

.btn.primary:hover:not(:disabled) {
    background: #2ea043;
}

.btn.secondary {
    background: #30363d;
    color: #e6edf3;
    border: 1px solid #484f58;
}

.btn.secondary:hover:not(:disabled) {
    background: #484f58;
}

.btn.small {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

#submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #58a6ff 0%, #a371f7 100%);
    color: #fff;
}

#submit-btn:hover:not(:disabled) {
    filter: brightness(1.1);
}

.progress-card {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.task-id {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #8b949e;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.queued { background: #30363d; color: #8b949e; }
.status-badge.starting { background: #1f3a5f; color: #58a6ff; }
.status-badge.downloading { background: #1f3a5f; color: #58a6ff; }
.status-badge.finished { background: #1a3c2e; color: #3fb950; }
.status-badge.done { background: #1a3c2e; color: #3fb950; }
.status-badge.error { background: #4c1a1a; color: #f85149; }

.progress-bar-container {
    height: 8px;
    background: #0d1117;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #58a6ff 0%, #a371f7 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #8b949e;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.progress-info .percent {
    color: #58a6ff;
    font-weight: 600;
}

.progress-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #30363d;
}

@media (max-width: 560px) {
    .row {
        grid-template-columns: 1fr;
    }
    .checkboxes {
        flex-direction: column;
    }
}