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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 1rem;
}

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

.header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
    font-style: italic;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.left-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
}

.right-panel {
    position: sticky;
    top: 1rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

.conditional-fields {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid #667eea;
}

button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.status {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    margin-bottom: 1rem;
}

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

.status.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

.status.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.progress {
    background: #e9ecef;
    border-radius: 8px;
    height: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.4s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#progressText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 0.95rem;
}

.processing-details {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid #e1e8ed;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.processing-details h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.1rem;
}

.processing-step {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: #f8f9fa;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

.processing-step.running {
    border-left-color: #3498db;
    background: #ebf5fb;
    animation: pulse 1.5s ease-in-out infinite;
}

.processing-step.completed {
    border-left-color: #27ae60;
    background: #eafaf1;
}

.processing-step.failed {
    border-left-color: #e74c3c;
    background: #fadbd8;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.results {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px solid #27ae60;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease;
}

.results h3 {
    margin-bottom: 1rem;
    color: #27ae60;
    font-size: 1.2rem;
}

.result-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.result-item strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

.result-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.result-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.hidden {
    display: none;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .right-panel {
        position: static;
    }
    
    .header h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }
    
    .header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .left-panel {
        padding: 1.5rem;
    }
    
    .main-content {
        gap: 1rem;
    }
    
    button {
        font-size: 1rem;
    }
    
    .processing-details,
    .results {
        padding: 1rem;
    }
    
    .processing-details h3,
    .results h3 {
        font-size: 1rem;
    }
}