:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate linear;
}
.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -100px;
    left: -100px;
}
.blob-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 100px) scale(1.2); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -1px;
}

header h1 .dot {
    color: var(--primary);
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

h2 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.jobs-header h2 { margin-bottom: 0; }

.form-group { margin-bottom: 1.5rem; }
.form-group.row { display: flex; gap: 1rem; }
.form-group .col { flex: 1; }

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

input[type="file"], select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 500;
    margin-right: 1rem;
    transition: background 0.3s ease;
}

input[type="file"]:hover, select:hover { border-color: var(--primary); }
select option { background: var(--bg-color); }

.checkbox-col { display: flex; align-items: flex-end; }
.checkbox-container {
    display: flex; align-items: center; cursor: pointer;
    font-size: 0.95rem; margin-bottom: 0.8rem; user-select: none;
}
.checkbox-container input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.checkmark {
    height: 20px; width: 20px; background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--panel-border); border-radius: 6px;
    margin-right: 10px; display: inline-block; position: relative; transition: all 0.3s ease;
}
.checkbox-container:hover input ~ .checkmark { border-color: var(--primary); }
.checkbox-container input:checked ~ .checkmark { background-color: var(--primary); border-color: var(--primary); }
.checkmark:after {
    content: ""; position: absolute; display: none; left: 6px; top: 2px; width: 5px; height: 10px;
    border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after { display: block; }

.primary-btn {
    width: 100%; padding: 1rem; background: var(--primary); color: white; border: none;
    border-radius: 12px; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.primary-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6); }

.icon-btn {
    background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}
.icon-btn:hover { color: var(--text-main); transform: rotate(180deg); }

.status-msg { margin-top: 1rem; font-size: 0.9rem; text-align: center; min-height: 1.2rem; }

.jobs-list { display: flex; flex-direction: column; gap: 1rem; max-height: 600px; overflow-y: auto; padding-right: 0.5rem; }
.jobs-list::-webkit-scrollbar { width: 6px; }
.jobs-list::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 3px; }

.job-card {
    background: rgba(0, 0, 0, 0.2); border: 1px solid var(--panel-border); border-radius: 16px;
    padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; transition: transform 0.3s ease;
}
.job-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }

.job-header { display: flex; justify-content: space-between; align-items: flex-start; }
.job-info { display: flex; flex-direction: column; }
.job-filename { font-weight: 600; font-size: 1.1rem; word-break: break-all; }
.job-meta { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }
.job-status { padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.status-queued { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-processing { background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); }
.status-done { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }

.progress-container { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), #a855f7); width: 0%; transition: width 0.5s ease; }

.job-actions { display: flex; gap: 0.8rem; align-items: center; border-top: 1px solid var(--panel-border); padding-top: 1rem; flex-wrap: wrap; }
.action-btn {
    padding: 0.5rem 1rem; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
    color: var(--text-main); border-radius: 8px; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.action-btn:hover { background: rgba(255, 255, 255, 0.1); }
.action-btn.delete:hover { background: rgba(239, 68, 68, 0.2); border-color: var(--error); color: var(--error); }

.error-text {
    color: var(--error); font-size: 0.85rem; margin-top: 0.5rem; background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem; border-radius: 6px; border-left: 3px solid var(--error);
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
