* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

.upload-zone {
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-zone.dragover {
    border-color: #3b82f6;
    background: #dbeafe;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #3b82f6;
}

.upload-text {
    color: #374151;
    font-size: 18px;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #9ca3af;
    font-size: 14px;
}

#fileInput {
    display: none;
}

.button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 20px;
}

.button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

#buttonGroup {
    margin-top: 20px;
}

#buttonGroup .button {
    margin-top: 0;
    margin-right: 10px;
}

.cancel-button {
    background: #ef4444;
}

.cancel-button:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Upload Progress Bar */
.upload-progress-container {
    display: none;
    margin-bottom: 30px;
}

.upload-progress-container.active {
    display: block;
}

.upload-progress-label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.upload-progress-bar {
    height: 40px;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    background: repeating-linear-gradient(
            45deg,
            #3b82f6,
            #3b82f6 10px,
            #93c5fd 10px,
            #93c5fd 20px
    );
    background-size: 200% 100%;
    animation: stripes 1s linear infinite;
    transition: width 0.3s ease;
}

@keyframes stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 0;
    }
}

/* File List */
.file-list {
    display: none;
    margin-top: 30px;
}

.file-list.active {
    display: block;
}

.file-list-header {
    color: #374151;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.file-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.file-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.file-name {
    color: #1f2937;
    font-weight: 500;
    flex: 1;
    margin-right: 10px;
    word-break: break-all;
}

.file-status {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.file-status.queued {
    background: #f3f4f6;
    color: #6b7280;
}

.file-status.processing {
    background: #dbeafe;
    color: #2563eb;
}

.file-status.success {
    background: #d1fae5;
    color: #059669;
}

.file-status.failed {
    background: #fee2e2;
    color: #dc2626;
}

/* Progress Bar for Each File */
.file-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.file-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Queued State - Gray */
.file-progress-fill.queued {
    width: 0%;
    background: #d1d5db;
}

/* Processing State - Animated Blue */
.file-progress-fill.processing {
    width: 100%;
    background: #3b82f6;
    animation: slide 1.5s ease-in-out infinite;
}

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

/* Success State - Green */
.file-progress-fill.success {
    width: 100%;
    background: #10b981;
}

/* Failed State - Red */
.file-progress-fill.failed {
    width: 100%;
    background: #ef4444;
}

.file-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px;
    background: #fee2e2;
    border-radius: 4px;
}

/* Summary */
.summary {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
}

.summary.active {
    display: block;
}

.summary.has-errors {
    background: #fef3c7;
    border-color: #fcd34d;
}

.summary-text {
    color: #166534;
    font-weight: 600;
    margin-bottom: 15px;
}

.summary.has-errors .summary-text {
    color: #92400e;
}

.download-button {
    background: #10b981;
    margin-top: 0;
}

.download-button:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.reset-button {
    background: #6b7280;
    margin-top: 10px;
    margin-left: 10px;
}

.reset-button:hover {
    background: #4b5563;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* Alert */
.alert {
    display: none;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert.active {
    display: block;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    margin-top: 0;
    color: #ff6b6b;
}

.modal-content p {
    margin: 15px 0;
    line-height: 1.6;
}

.modal-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

.modal-button:hover {
    background-color: #45a049;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .upload-zone {
        padding: 40px 15px;
    }

    .file-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
