:root {
    --primary: #4a6fa5;
    --secondary: #166088;
    --light: #f5f9ff;
    --dark: #2d3748;
    --success: #48bb78;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light);
    color: var(--dark);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 2.5rem;
}

.subtitle {
    opacity: 0.9;
    font-weight: 300;
    margin-top: 0.5rem;
}

.drag-area {
    height: 300px;
    border: 3px dashed var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 2rem 0;
    position: relative;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.drag-area.active {
    border-color: var(--success);
    background-color: rgba(72, 187, 120, 0.1);
}

.drag-area h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--dark);
}

.drag-area span {
    font-size: 1rem;
    color: #718096;
    margin: 10px 0 15px 0;
}

.drag-area button {
    padding: 10px 25px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drag-area button:hover {
    background-color: var(--secondary);
}

.drag-area input {
    display: none;
}

.comparison-container {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

.comparison-container.active {
    opacity: 1;
}

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

.comparison-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.reset-btn {
    padding: 8px 16px;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background-color: #c53030;
}

.image-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 500px;
    width: 100%;
    margin: 0 auto;
}

.before-image, .after-image {
    width: 48%; /* Ensure both images fit side by side */
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-text {
    margin-top: 1rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 500;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(74, 111, 165, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem;
    color: #718096;
    font-size: 0.875rem;
}