/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #f59e0b;
    --background-dark: #0f0f23;
    --background-card: #1a1a2e;
    --background-hover: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #374151;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Base */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Upload Section */
.upload-section {
    margin-bottom: 40px;
}

.upload-area {
    background: var(--background-card);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-area:hover::before {
    left: 100%;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--background-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--background-hover);
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.upload-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Image Comparison Section */
.image-comparison-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Image Sections */
.image-section {
    text-align: center;
}

.image-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Controls Section */
.controls-section {
    background: var(--background-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.image-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.image-wrapper {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.image-wrapper:hover {
    transform: scale(1.02);
}

.preview-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}


/* Quick Filters */
.quick-filters {
    margin-bottom: 25px;
}

.quick-filters h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-align: center;
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.filter-btn {
    background: var(--background-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Custom Controls */
.custom-controls {
    margin-bottom: 25px;
}

.custom-controls h4 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.control-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 5px;
    background: var(--background-hover);
    outline: none;
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.reset-btn {
    background: var(--background-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85rem;
    display: block;
    margin: 0 auto;
    width: 100%;
}

.reset-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Download Section */
.download-section {
    text-align: center;
    margin-top: 20px;
}

.download-btn {
    background: var(--background-hover);
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.download-btn:hover::before {
    left: 0;
}

.download-btn:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.download-icon {
    font-size: 1.2rem;
}

/* Demo Section */
.demo-section {
    margin-top: 60px;
    text-align: center;
}

.demo-section h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.demo-image-container {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.demo-image-container:hover {
    transform: scale(1.05);
}

.demo-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    display: block;
}

.demo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-image-container:hover .demo-overlay {
    opacity: 1;
}

.demo-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Filter Classes */
.aesthetic-basic {
    filter: contrast(1.4) saturate(0.5) brightness(0.8) sepia(0.0) hue-rotate(-20deg) blur(0.0px);
}

.aesthetic-vintage {
    filter: contrast(1.3) saturate(0.6) brightness(0.85) sepia(0.2) hue-rotate(-15deg);
}

.aesthetic-cold {
    filter: contrast(1.4) saturate(0.5) brightness(0.8) hue-rotate(-30deg) blur(0.2px);
}

.aesthetic-warm {
    filter: contrast(1.1) saturate(0.8) brightness(0.95) sepia(0.15) hue-rotate(10deg);
}

.aesthetic-dreamy {
    filter: contrast(1.1) saturate(0.6) brightness(1.1) sepia(0.1) hue-rotate(-5deg) blur(0.5px);
}

.aesthetic-dark {
    filter: contrast(1.3) saturate(0.4) brightness(0.7) sepia(0.3) hue-rotate(-20deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .image-comparison-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preview-image {
        height: 320px;
    }
    
    .filter-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .controls-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .controls-section {
        padding: 15px;
    }
    
    .filter-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .filter-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .upload-area {
        padding: 30px 10px;
    }
    
    
    .preview-image {
        height: 350px;
    }
    
    .upload-content h3 {
        font-size: 1.2rem;
    }
    
    .control-group label {
        font-size: 0.75rem;
    }
    
    .download-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


.preview-section,
.filters-section {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-card);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
