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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

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

header h1 {
    font-size: 2rem;
    color: #00a1d6;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    font-size: 1rem;
}

.download-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #00a1d6;
}

.options {
    display: flex;
    gap: 1rem;
}

.options .input-group {
    flex: 1;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background-color: #00a1d6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #0091c6;
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.task-list {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-list h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: #333;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 2rem;
}

.task-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f9f9f9;
}

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

.task-title {
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.task-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-downloading {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

.task-progress {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top-color: #00a1d6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-label {
    font-size: 0.875rem;
    color: #004085;
}

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

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #00a1d6;
    transition: width 0.3s ease;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.btn-download {
    background-color: #00a1d6;
    color: white;
    border-color: #00a1d6;
}

.btn-download:hover {
    background-color: #0091c6;
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-delete:hover {
    background-color: #dc3545;
    color: white;
}
