@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6c5ce7;
    --primary-light: #a29bfe;
    --secondary-color: #00b894;
    --secondary-light: #55efc4;
    --dark-color: #2d3436;
    --gray-dark: #636e72;
    --gray-light: #b2bec3;
    --background: #f9f9f9;
    --white: #ffffff;
    --error: #ff7675;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: var(--dark-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tagline {
    color: var(--gray-dark);
    font-size: 1rem;
    font-weight: 400;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-title i {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-right: 10px;
}

.card-title h2, .card-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="file"] {
    display: none;
}

.drop-area {
    border: 2px dashed var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 30px;
    margin: 15px 0;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: rgba(108, 92, 231, 0.05);
}

.drop-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.1);
}

.drop-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(108, 92, 231, 0.15);
    transform: scale(1.02);
}

.drop-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.drop-area p {
    margin-bottom: 15px;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.primary-btn, .secondary-btn, .upload-label, .download-btn {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    width: 100%;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
}

.primary-btn:hover {
    background-color: #5b4ecc;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: #e9e9e9;
    color: var(--dark-color);
}

.secondary-btn:hover {
    background-color: #dedede;
    transform: translateY(-2px);
}

.upload-label {
    background-color: var(--primary-light);
    color: var(--white);
    display: inline-block;
    width: auto;
    font-size: 0.9rem;
}

.upload-label:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.download-btn {
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    margin-top: 20px;
    font-weight: 500;
}

.download-btn:hover {
    background-color: #019d7e;
    transform: translateY(-2px);
}

button:disabled {
    background-color: var(--gray-light);
    cursor: not-allowed;
    transform: none;
}

.loading {
    margin: 15px 0;
    font-size: 0.95rem;
    color: var(--primary-color);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.error {
    margin: 15px 0;
    color: var(--error);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(108, 92, 231, 0.15);
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.4s ease;
}

.image-output {
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.image-output img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.image-output img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.image-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.image-container {
    flex: 1;
    min-width: 250px;
    max-width: 100%;
    text-align: center;
    padding: 10px;
    background-color: rgba(108, 92, 231, 0.05);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.image-container:hover {
    background-color: rgba(108, 92, 231, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.image-container h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 1rem;
}

.original-image, .processed-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.processed-image {
    background-image: linear-gradient(45deg, #f1f1f1 25%, transparent 25%),
                     linear-gradient(-45deg, #f1f1f1 25%, transparent 25%),
                     linear-gradient(45deg, transparent 75%, #f1f1f1 75%),
                     linear-gradient(-45deg, transparent 75%, #f1f1f1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-text {
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.social-sharing {
    text-align: center;
    margin: 30px 0;
}

.social-sharing p {
    margin-bottom: 15px;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-light);
    transform: translateY(-3px);
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--gray-dark);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .drop-area {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .image-comparison {
        flex-direction: column;
    }
    
    .image-container {
        min-width: 100%;
        margin-bottom: 15px;
    }
}

@media (min-width: 768px) {
    .image-output {
        max-height: 400px;
        overflow-y: auto;
    }
}
