:root {
    --bg-dark: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --hover-overlay: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: blob-bounce 10s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    animation-delay: 2s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: #ec4899;
    animation-delay: 4s;
}

@keyframes blob-bounce {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Main Container */
.app-container {
    width: 90%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Header */
.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Upload Section */
.upload-section {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.upload-section:hover, .upload-section.drag-over {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.upload-icon {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.upload-section:hover .upload-icon {
    color: var(--accent-primary);
}

.browse-link {
    color: var(--accent-primary);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Preview Section */
.hidden {
    display: none !important;
}

.preview-section {
    margin-top: 2rem;
    animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.image-preview-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.image-preview-container img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

input[type="range"] {
    width: 60%;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.app-footer {
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .app-container {
        padding: 1.5rem;
        width: 95%;
    }
    
    .blob {
        opacity: 0.4;
    }
}
