:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --dark-color: #14213d;
    --light-color: #f8f9fa;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

header h1 span {
    color: var(--primary-color);
    font-weight: 800;
}

header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.upload-area {
    margin: 3rem 0;
}

.drop-zone {
    border: 3px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 4rem;
    text-align: center;
    background-color: white;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05) 0%, rgba(58, 12, 163, 0.05) 100%);
    z-index: 0;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.drop-zone i {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.drop-zone h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.drop-zone p {
    color: #666;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.formats {
    font-size: 0.9rem;
    color: #999;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn i {
    font-size: 1rem;
}

.btn-transparent {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 1rem;
    padding: 0.8rem 1.5rem;
}

.btn-transparent:hover {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    margin-left: 1rem;
    padding: 0.8rem 1.5rem;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.processing-area {
    text-align: center;
    margin: 3rem 0;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
}

.progress-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 50px;
    margin: 2rem 0;
    height: 15px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-container span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.processing-steps {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 2rem auto;
    position: relative;
}

.processing-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e0e0e0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    position: relative;
    opacity: 0.3;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
}

.step i {
    font-size: 1.5rem;
    background-color: white;
    color: var(--primary-color);
    border: 3px solid #e0e0e0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.step.active i {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.step span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
}

#statusText {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-top: 1rem;
}

.result-area {
    margin: 3rem 0;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.before, .after {
    display: flex;
    flex-direction: column;
}

.image-comparison h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: #f0f0f0;
    background-image: 
        linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd),
        linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-comparison img {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.image-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-download {
    background-color: var(--success-color);
    padding: 0.8rem 1.5rem;
}

.btn-download:hover {
    background-color: #27ae60;
}

.btn-enhance {
    background-color: var(--warning-color);
    color: var(--dark-color);
    padding: 0.8rem 1.5rem;
}

.btn-enhance:hover {
    background-color: #e67e22;
}

.advanced-options {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-group label span {
    font-weight: normal;
    color: #666;
    font-size: 0.9rem;
}

.option-group input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    transition: var(--transition);
}

.option-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.option-group input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.2);
}

.option-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.option-group input[type="color"]:hover {
    border-color: var(--primary-color);
}

.option-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-reset {
    background-color: #f1f1f1;
    color: var(--dark-color);
}

.btn-reset:hover {
    background-color: #e0e0e0;
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1rem 2rem;
}

.btn-apply:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.object-selection {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
    text-align: center;
}

.object-selection h3 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.5rem;
}

.objects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.object-item {
    border: 3px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.object-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.object-item.selected {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

.object-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.object-item .object-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem;
    font-size: 0.8rem;
    text-align: center;
}

.btn-confirm {
    background-color: var(--success-color);
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-confirm:hover {
    background-color: #27ae60;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(58, 12, 163, 0.1) 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    font-size: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

.tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 300px;
    text-align: center;
}

/* Responsive design */
@media (max-width: 992px) {
    .image-comparison {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .drop-zone {
        padding: 3rem 1rem;
    }
    
    .processing-steps {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .processing-steps::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }
    
    .image-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
    }
    
    .option-buttons {
        flex-direction: column;
    }
    
    .btn-apply, .btn-reset {
        width: 100%;
    }
}