:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px;
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    opacity: 0.2;
}

.blob-1 {
    background: #4f46e5;
    top: -100px;
    left: -100px;
    animation: move 20s infinite alternate;
}

.blob-2 {
    background: #ec4899;
    bottom: -100px;
    right: -100px;
    animation: move 25s infinite alternate-reverse;
}

.blob-3 {
    background: #0ea5e9;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: move 30s infinite alternate;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(50px, 50px) scale(1.1); }
}

/* Glass Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.app-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Upload Section */
.upload-section {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.upload-section:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-placeholder svg {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.upload-placeholder p {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.upload-placeholder span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Controls Section */
.controls-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
}

select, input[type="number"], input[type="range"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    color: white;
    outline: none;
    transition: all 0.2s;
}

select, input[type="number"] {
    height: 48px;
}

select:focus, input[type="number"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

select option {
    background: var(--bg-dark);
}

.dimension-group {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    align-items: flex-end;
    gap: 15px;
}

.lock-aspect {
    padding-bottom: 0;
}

#aspect-lock {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
}

#aspect-lock span {
    font-size: 0.9rem;
    white-space: nowrap;
}

#aspect-lock.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.quality-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input[type="range"] {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.primary-btn {
    flex: 2;
    background: linear-gradient(to right, #6366f1, #4f46e5);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    color: #4ade80;
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
    font-weight: 600;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .glass-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .dimension-group {
        grid-template-columns: 1fr;
    }
    
    .lock-aspect {
        display: flex;
        justify-content: center;
        padding: 0;
    }
    
    .actions {
        flex-direction: column;
    }
}
