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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2d3748;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
    line-height: 1.6;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.upload-area p {
    color: #718096;
    margin-bottom: 20px;
}

.file-requirements {
    margin-top: 20px;
}

.file-requirements small {
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Processing Section */
.processing-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.processing-card {
    text-align: center;
}

.processing-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.processing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.processing-card p {
    color: #718096;
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.processing-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.step.active {
    opacity: 1;
    color: #667eea;
}

.step i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.step span {
    font-size: 0.9rem;
    text-align: center;
}

/* Result Section */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.result-card {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.result-card.success .result-icon {
    color: #48bb78;
}

.result-card.error .result-icon {
    color: #f56565;
}

.result-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.result-card p {
    color: #718096;
    margin-bottom: 30px;
}

.download-area {
    margin-bottom: 20px;
}

.download-btn {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.3);
}

.new-file-btn, #tryAgainBtn {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.new-file-btn:hover, #tryAgainBtn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    margin-top: 40px;
    text-align: center;
}

#resultSection { background: rgba(255,255,255,.95) !important; }
.result-card.success { background: transparent !important; }

.footer-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer p {
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-info small {
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .processing-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .step {
        flex-direction: row;
        justify-content: center;
        min-width: auto;
    }
    
    .step span {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .header-content, .upload-section, .processing-section, .result-section, .footer-content {
        padding: 25px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon, .processing-icon, .result-icon {
        font-size: 3rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-section, .processing-section, .result-section {
    animation: fadeIn 0.5s ease;
}

/* Loading animation for processing icon */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.processing-icon i {
    animation: pulse 2s infinite;
}

