:root {
    --primary-color: #005f73;
    --secondary-color: #ee6c4d;
    --background-color: #f0f0f0;
    --border-color: #dee2e6;
    --text-color: #212529;
    --success-color: #28a745;
    --error-color: #dc3545;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

header p {
    color: var(--secondary-color);
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    background-color: white;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(0, 95, 115, 0.05);
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.drop-zone img {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.file-input {
    display: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--secondary-color);
    color: white;
    font-weight: 500;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn.primary {
    background-color: var(--primary-color);
}

.btn.secondary {
    background-color: var(--secondary-color);
}

.preview-container {
    display: grid;
    gap: 2rem;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.image-preview {
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    position: relative;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.comparison-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: white;
    cursor: ew-resize;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -10px;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    transform: translateY(-50%);
}

.controls {
    display: grid;
    gap: 1.5rem;
}

.dimension-controls, .compression-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
}

.input-group input, .input-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 95, 115, 0.1);
}

.input-group input[type="range"] {
    padding: 0;
    height: 8px;
    -webkit-appearance: none;
    background: var(--border-color);
    border-radius: 4px;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.progress-container {
    margin-top: 1rem;
}

.progress-bar {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--secondary-color);
}

footer nav {
    margin-bottom: 1rem;
}

footer nav a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

footer nav a:hover {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .comparison-slider {
        height: 300px;
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
} 