:root {
    --primary-color: #2563eb;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --warning-color: #f59e0b;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Upload Section */
.upload-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.drop-zone.has-file {
    border-color: var(--success-color);
    background-color: #f0fdf4;
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.drop-zone.dragover .upload-icon {
    color: var(--primary-color);
}

.drop-zone h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.drop-zone p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.file-info {
    font-size: 0.875rem;
    color: #9ca3af;
}

.file-input {
    display: none;
}

.select-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-btn:hover {
    background-color: #1d4ed8;
}

/* File Preview */
.file-preview {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.file-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-name {
    font-weight: 500;
    color: var(--text-color);
}

.file-size {
    color: #6b7280;
    font-size: 0.875rem;
    margin-left: 1rem;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.remove-btn:hover {
    color: var(--error-color);
}

/* Upload Button */
.upload-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: #15803d;
}

.upload-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Progress Section */
.progress-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.progress-header {
    text-align: center;
    margin-bottom: 2rem;
}

.progress-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.progress-steps {
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.step.active {
    background-color: #eff6ff;
    border-color: var(--primary-color);
}

.step.completed {
    background-color: #f0fdf4;
    border-color: var(--success-color);
}

.step.error {
    background-color: #fef2f2;
    border-color: var(--error-color);
}

.step-icon {
    font-size: 2rem;
    margin-right: 1.5rem;
}

.step-info {
    flex: 1;
}

.step-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.step-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e5e7eb;
}

.step.active .step-status {
    background-color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

.step.completed .step-status {
    background-color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step.completed .step-status::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--success-color);
}

.new-upload-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.new-upload-btn:hover {
    background-color: #1d4ed8;
}

.results-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.json-viewer {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
}

.download-btn,
.copy-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn:hover,
.copy-btn:hover {
    background-color: #f9fafb;
}

/* Error Message */
.error-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
    border: 1px solid var(--error-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
}

.error-icon {
    font-size: 1.5rem;
}

.error-text {
    flex: 1;
    color: var(--error-color);
}

.close-error {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .upload-container,
    .progress-section,
    .results-section {
        padding: 2rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .step {
        padding: 1rem;
    }
    
    .step-icon {
        font-size: 1.5rem;
        margin-right: 1rem;
    }
    
    .error-message {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}