* {
    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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Drop Zone */
.drop-zone {
    padding: 60px 20px;
    text-align: center;
    border: 3px dashed #667eea;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone.dragover {
    border-color: #764ba2;
    background-color: #f0ebf8;
    box-shadow: inset 0 0 10px rgba(118, 75, 162, 0.1);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    width: 80px;
    height: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.drop-zone h2 {
    color: #333;
    margin-bottom: 10px;
}

.drop-zone p {
    color: #666;
    margin: 15px 0;
}

.file-types {
    font-size: 0.9rem;
    color: #999;
    margin-top: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    pointer-events: all;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Status Section */
.status-section {
    padding: 40px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.status-section h2 {
    margin-bottom: 20px;
    color: #333;
}

/* Progress Bar */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.progress-bar-wrapper {
    width: 100%;
    height: 24px;
    background-color: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
    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%);
    }
}

#statusContainer {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 10px 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.results-section {
    padding: 40px 20px;
}

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

.results-header h2 {
    color: #333;
}

.results-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
}

.result-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
}

.result-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.result-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.result-table tr:hover {
    background-color: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Error Section */
.error-section {
    padding: 40px 20px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.error-section h2 {
    color: #721c24;
    margin-bottom: 15px;
}

.error-section p {
    color: #721c24;
    margin-bottom: 20px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.json-viewer {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.json-viewer pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

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

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
    }

    .result-table th,
    .result-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

