/* Custom Styles for EachLabs Nano-Banana-Edit Interface */

:root {
    --primary-purple: #8b5cf6;
    --secondary-purple: #a78bfa;
    --dark-purple: #6d28d9;
    --accent-pink: #ec4899;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --border-purple: rgba(139, 92, 246, 0.2);
    --glow-purple: rgba(139, 92, 246, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--dark-purple) 50%, var(--bg-darker) 100%);
    min-height: 100vh;
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

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

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

/* Glass morphism effect */
.glass {
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-purple);
}

/* Upload Area Styling */
.upload-area {
    border: 2px dashed var(--border-purple);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.2);
}

.upload-area:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

.upload-area.drag-over {
    border-color: var(--accent-pink);
    background: rgba(236, 72, 153, 0.05);
    transform: scale(1.02);
}

/* Result placeholder */
.result-placeholder {
    border: 2px dashed rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.1);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-pink));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Button Hover Effects */
button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
}

button:not(:disabled):active {
    transform: translateY(0);
}

/* Input Focus Effects */
input:focus, textarea:focus {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
    background: rgba(15, 23, 42, 0.5);
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-purple);
    border: 2px solid var(--text-light);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--secondary-purple);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-track {
    background: rgba(15, 23, 42, 0.5);
    height: 6px;
    border-radius: 3px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-purple);
    border: 2px solid var(--text-light);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

/* API Status Indicator */
.api-status {
    display: flex;
    align-items: center;
    space-x: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 9999px;
    border: 1px solid var(--border-purple);
}

.api-status.connected {
    border-color: rgba(34, 197, 94, 0.3);
}

.api-status.connected i {
    color: #22c55e;
}

.api-status.connected span {
    color: #22c55e;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .result-placeholder {
        padding: 2rem 1rem;
        min-height: 200px;
    }
    
    header .flex {
        flex-direction: column;
        space-y: 1rem;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Animation for image preview */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-scale {
    animation: fadeInScale 0.3s ease-out;
}

/* Pulse animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Custom tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(15, 23, 42, 0.9);
    color: var(--text-light);
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    border: 1px solid var(--border-purple);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating elements animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}