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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-section {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 500;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.options {
    margin: 20px 0;
}

select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    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: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    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 5px 20px rgba(102, 126, 234, 0.4);
}

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

.progress-section, .results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
}

.progress-list, #resultsList {
    list-style: none;
}

.progress-item, .result-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-item {
    background: #f5f5f5;
    border-left: 4px solid #667eea;
}

.result-item {
    background: #f0f9ff;
    border-left: 4px solid #10b981;
}

.result-item.error {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.status-icon {
    margin-right: 12px;
    font-size: 18px;
}

.status-text {
    flex: 1;
}

.status-label {
    font-weight: 500;
    color: #333;
    display: block;
}

.status-value {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

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

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

.error-message {
    padding: 15px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    color: #991b1b;
    margin-top: 20px;
}

.file-list {
    list-style: none;
    margin-top: 10px;
    padding-left: 20px;
}

.file-list li {
    padding: 6px 0;
    color: #666;
    font-size: 14px;
}

.file-list li:before {
    content: "📄 ";
    margin-right: 8px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
