* {
    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;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.upload-section,
.processing-section,
.results-section,
.error-section {
    animation: fadeIn 0.5s ease-out;
}

.upload-box,
.processing-box,
.results-box {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.upload-box h2,
.processing-box h2,
.results-box h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 15px;
}

.upload-box p {
    color: #666;
    margin-bottom: 30px;
}

#uploadForm {
    margin-top: 30px;
}

input[type="file"] {
    display: none;
}

.file-label {
    display: block;
    padding: 15px 30px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    color: #666;
    font-size: 1em;
}

.file-label:hover {
    background: #e8e8e8;
    border-color: #667eea;
}

.file-label.has-file {
    background: #e8f4f8;
    border-color: #667eea;
    border-style: solid;
    color: #333;
}

.submit-btn,
.new-upload-btn {
    width: 100%;
    padding: 18px 40px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover,
.new-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.submit-btn:active,
.new-upload-btn:active {
    transform: translateY(0);
}

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

/* Processing Section */
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.processing-box h2 {
    color: #667eea;
}

#processingMessage {
    color: #666;
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

/* Results Section */
.results-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.results-box.success {
    border-top: 5px solid #4caf50;
}

.results-box.error {
    border-top: 5px solid #f44336;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    color: #333;
    font-weight: 700;
}

.download-info {
    color: #4caf50;
    font-weight: 600;
    margin: 20px 0 10px;
    font-size: 1.1em;
}

.download-message {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.error-message {
    color: #f44336;
    background: #ffebee;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.info-section h3 {
    text-align: center;
    font-size: 1.8em;
    color: #333;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.info-item {
    text-align: center;
}

.info-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 auto 15px;
}

.info-item p {
    color: #555;
    line-height: 1.6;
}

.features {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 10px;
}

.features h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    color: #555;
    padding: 8px 0;
    line-height: 1.6;
}

/* Footer */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9em;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .upload-box,
    .processing-box,
    .results-box,
    .info-section {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .subtitle {
        font-size: 0.95em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
