* {
    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, #2c3e50 0%, #34495e 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: 1px 1px 3px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

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

main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.file-upload-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.file-upload-card:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.file-upload-card h2 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.upload-area {
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area.dragover {
    opacity: 0.7;
    transform: scale(1.02);
}

.upload-content {
    text-align: center;
    padding: 30px;
}

.upload-icon {
    width: 60px;
    height: 60px;
    color: #3498db;
    margin-bottom: 15px;
    stroke-width: 2;
}

.upload-text {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 0.85rem;
    color: #6c757d;
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.file-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-name {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
}

.file-stats {
    font-size: 0.85rem;
    color: #6c757d;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.btn-download {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: #218838;
    transform: scale(1.1);
}

.progress-container {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 600;
    min-width: 200px;
    white-space: nowrap;
    text-align: right;
}

.message-container {
    margin-top: 20px;
}

.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

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

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

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

.merge-section {
    margin-top: 30px;
    text-align: center;
}

.btn-merge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-merge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
}

.btn-merge:active {
    transform: translateY(0);
}

.btn-merge:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }
}

