:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #3a0ca3;
    --success-color: #4ade80;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e2e8f0;
}

.language-selector select {
    border: none;
    background: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--dark-color);
    cursor: pointer;
    outline: none;
}

/* Upload Section */
.upload-section {
    margin-bottom: 1.5rem;
}

.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.upload-area p {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.file-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f5f9;
    border-radius: var(--border-radius);
    display: none;
}

/* Settings Section */
.settings-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-weight: 600;
    color: var(--dark-color);
}

.upscale-buttons {
    display: flex;
    gap: 0.5rem;
}

.upscale-btn {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upscale-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.setting-group select {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
}

.setting-group label[for] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.setting-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Preview Section */
.preview-section {
    margin-bottom: 1.5rem;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.preview-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.preview-box h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.125rem;
}

.image-container {
    min-height: 300px;
    border: 2px dashed #e2e8f0;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: #f8fafc;
}

.image-placeholder {
    text-align: center;
    color: var(--gray-color);
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.image-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--border-radius);
    object-fit: contain;
}

.image-details {
    font-size: 0.875rem;
    color: var(--gray-color);
    text-align: center;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: var(--border-radius);
}

/* Progress Container */
.progress-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s ease;
}

.progress-info {
    font-size: 0.875rem;
    color: var(--gray-color);
    text-align: center;
}

/* Action Section */
.action-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-process {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-process:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-process:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-download {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-download:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    color: var(--gray-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0 auto;
}

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

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    padding: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-buttons {
        grid-template-columns: 1fr;
    }
    
    .settings-section {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}