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

:root {
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.4);
    --secondary: #6366f1;
    --bg-dark: #09090b;
    --card-bg: rgba(24, 24, 27, 0.6);
    --text-main: #fafafa;
    --text-dim: #a1a1aa;
    --border: rgba(255, 255, 255, 0.08);
    --success: #22c55e;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Better for scrolling content */
    padding: 60px 20px;
    position: relative;
    overflow-y: auto;
}

/* Background Blobs Animation */
.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    filter: blur(80px);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.15;
    animation: move 20s infinite alternate;
}

.blob-1 { top: -100px; left: -100px; }
.blob-2 { bottom: -100px; right: -100px; animation-delay: -5s; }

@keyframes move {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(100px, 100px) rotate(90deg) scale(1.2); }
}

.container {
    width: 100%;
    max-width: 650px;
    padding: 20px;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 20px;
    padding: 50px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(168, 85, 247, 0.08);
    transform: scale(1.02);
}

.upload-zone i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.upload-zone p {
    font-weight: 500;
}

.upload-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.highlight {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input, select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    color: #fff !important;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

option {
    background-color: #18181b !important;
    color: white !important;
    padding: 10px;
}

input:focus, select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15);
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed 0%, #4338ca 100%);
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(124, 58, 237, 0.5);
    filter: brightness(1.15);
}

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

.status-area {
    margin-top: 24px;
    text-align: center;
    font-weight: 500;
}

.loader {
    width: 24px;
    height: 24px;
    border: 3.5px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
    .container { padding: 10px; }
    h1 { font-size: 2.2rem; }
    p.subtitle { font-size: 0.95rem; }
    .glass-card { padding: 20px 15px; border-radius: 20px; }
    .upload-zone { padding: 30px 10px; }
    form-group label { font-size: 0.75rem; }
    input, select { padding: 12px 14px; font-size: 0.9rem; }
    .btn-primary { padding: 15px; font-size: 1rem; }
}

@media (max-width: 400px) {
    h1 { font-size: 1.8rem; }
    .config-grid { gap: 15px; }
}

