* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.input-section {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.queue-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.task-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.task-item.completed {
    border-left-color: #28a745;
    background: #e8f5e9;
}

.task-item.failed {
    border-left-color: #dc3545;
    background: #ffebee;
}

.task-item.downloading {
    border-left-color: #ffc107;
    background: #fff8e1;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.task-title {
    font-weight: 600;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.task-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.task-status.pending {
    background: #e3f2fd;
    color: #1976d2;
}

.task-status.downloading {
    background: #fff3e0;
    color: #f57c00;
}

.task-status.completed {
    background: #e8f5e9;
    color: #388e3c;
}

.task-status.failed {
    background: #ffebee;
    color: #d32f2f;
}

.task-url {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    word-break: break-all;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    border-radius: 4px;
}

.task-error {
    margin-top: 10px;
    padding: 10px;
    background: #ffcdd2;
    border-radius: 4px;
    color: #c62828;
    font-size: 14px;
}

.task-download-link {
    margin-top: 10px;
}

.task-download-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.task-download-link a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    main {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .settings-row {
        grid-template-columns: 1fr;
    }
}

