/* styles.css */
:root {
    --primary: #2c7be5;
    --success: #43d17d;
    --dark: #212529;
    --light: #f8f9fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    padding: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    background: var(--light);
    color: var(--dark);
}

header {
    background: linear-gradient(135deg, #4a90e2, #6a11cb);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.container {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.comparison-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.comparison-slider {
    width: 100%;
    height: 500px;
    position: relative;
    overflow: hidden;
}

.resize-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: rgba(255,255,255,0.8);
    cursor: ew-resize;
    z-index: 2;
    touch-action: none;
}

.image-container {
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.placeholder {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f0f0f0;
    color: #666;
    font-weight: 600;
}

.controls {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.slider-container {
    margin: 1.5rem 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.file-input {
    display: none;
}

.file-label {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-bottom: 1rem;
}

.file-label:hover {
    transform: translateY(-2px);
}

.action-btn {
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: transform 0.2s ease;
    margin-bottom: 1rem;
}

.action-btn:disabled {
    background: #d1d1d1;
    cursor: not-allowed;
}

.adsense-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
}

.error-message {
    color: #dc3545;
    margin: 1rem 0;
    padding: 0.5rem;
    border-radius: 4px;
    background: #ffebee;
    display: none;
}

.loader {
    color: var(--primary);
    text-align: center;
    padding: 1rem;
}

.hidden { display: none; }

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .comparison-slider {
        height: 300px;
    }

    .action-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}