/* Gemini Car Cleaner V2 Styles */
.gemini-car-cleaner-v2 {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cleaner-container {
    background: #faf9f6;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #e04f28;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Cleaning Buttons */
.cleaning-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.cleaning-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #191919 0%, #2a2a2a 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.cleaning-btn:hover {
    background: linear-gradient(135deg, #e04f28 0%, #ff6b47 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(224, 79, 40, 0.3);
}

.cleaning-btn.active {
    background: linear-gradient(135deg, #e04f28 0%, #ff6b47 100%);
    box-shadow: 0 8px 25px rgba(224, 79, 40, 0.3);
}

.cleaning-btn.active .btn-check {
    opacity: 1;
    transform: scale(1);
}

.btn-check {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-icon {
    font-size: 18px;
}

/* Image Upload */
.image-upload-section {
    text-align: center;
    margin-bottom: 30px;
}

.upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e04f28 0%, #ff6b47 100%);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
}

.upload-label:hover {
    background: linear-gradient(135deg, #191919 0%, #2a2a2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.upload-icon {
    font-size: 20px;
}

.file-info {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    color: #666;
    margin-left: 8px;
}

/* Image Comparison */
.image-comparison-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 300px;
    max-height: 600px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.before-image, .after-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    transition: none;
}

.before-image {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    z-index: 1;
}

.after-image {
    z-index: 0;
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #e04f28;
    z-index: 10;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.comparison-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #e04f28;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.comparison-labels {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 5;
}

.label-before, .label-after {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Generate Button */
.generate-section {
    text-align: center;
    margin: 30px 0;
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e04f28 0%, #ff6b47 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
}

.generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #191919 0%, #2a2a2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    display: none;
}

.loading.show {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e04f28;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    color: #e04f28;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Result Area */
.result-area {
    margin-top: 30px;
}

.result-area h4 {
    color: #e04f28;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4em;
}

/* Cleaning Instructions */
.cleaning-instructions {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #e04f28;
}

.cleaning-instructions h4 {
    color: #e04f28;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.instructions-content {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}


/* Preview Sections */
.default-preview, .image-preview {
    margin: 30px 0;
}

.default-preview h4, .image-preview h4 {
    color: #e04f28;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gemini-car-cleaner-v2 {
        padding: 15px;
    }
    
    .cleaner-container {
        padding: 20px;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    .cleaning-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cleaning-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .comparison-wrapper {
        min-height: 250px;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .cleaner-container {
        padding: 15px;
    }
    
    .comparison-wrapper {
        min-height: 200px;
        max-height: 300px;
    }
    
    .upload-label {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .generate-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
