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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background: #0f0c29;
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29); 
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
}

/* Background Animation */
.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.blob {
    position: absolute;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.4) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: float 10s infinite ease-in-out;
}

.blob:nth-child(1) { width: 500px; height: 500px; top: -100px; left: -100px; animation-duration: 12s; }
.blob:nth-child(2) { width: 400px; height: 400px; bottom: -50px; right: -50px; background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, rgba(0,0,0,0) 70%); animation-duration: 8s;}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(20px, 30px); }
    100% { transform: translate(0, 0); }
}

/* Main Card */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
}

p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(0,0,0,0.2);
}

.upload-area:hover, .upload-area.dragover {
    border-color: #764ba2;
    background: rgba(255, 255, 255, 0.05);
}

.icon {
    font-size: 3rem;
    color: #a0a0a0;
    margin-bottom: 1rem;
    display: block;
}

.upload-text {
    font-size: 0.9rem;
    color: #d0d0d0;
}

#fileInput {
    display: none;
}

/* Button */
.btn {
    margin-top: 1.5rem;
    background: var(--primary-gradient);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: box-shadow 0.3s ease, transform 0.2s;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn:hover {
    box-shadow: 0 0 20px rgba(118, 75, 162, 0.5);
    transform: scale(1.02);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Status & result */
.status {
    margin-top: 1rem;
    min-height: 1.5rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.status.visible {
    opacity: 1;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.download-link {
    display: none;
    margin-top: 1rem;
    background: transparent;
    border: 1px solid #764ba2;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.download-link:hover {
    background: #764ba2;
}
