:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --surface-hover: #1a2744;
    --primary: #0f3460;
    --accent: #e94560;
    --text: #eee;
    --text-muted: #999;
    --success: #00d26a;
    --warning: #ffc107;
    --error: #e94560;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Auth */
#auth-section {
    text-align: center;
    margin: 4rem 0;
}

#auth-section input {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto;
    padding: 0.75rem 1rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}

#auth-section button {
    margin-top: 0.5rem;
}

/* Upload */
.upload-zone {
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 1rem;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: var(--surface);
}

.upload-zone p {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.upload-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.upload-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.upload-options select, .upload-options input[type="checkbox"] {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--primary);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: var(--primary);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Jobs list */
.jobs-section {
    margin-top: 2rem;
}

.jobs-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.job-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: background 0.15s;
}

.job-card:hover {
    background: var(--surface-hover);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.job-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.job-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
}

.status-queued { background: var(--primary); }
.status-preprocessing, .status-upscaling, .status-encoding { background: #1b4d3e; color: var(--success); }
.status-complete { background: #0d3b1f; color: var(--success); }
.status-downloaded { background: var(--primary); color: var(--text-muted); }
.status-failed { background: #3b0d0d; color: var(--error); }
.status-deleted { background: var(--primary); color: var(--text-muted); }

.job-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Progress bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-bar.complete {
    background: var(--success);
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.error-msg {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Hidden */
.hidden { display: none; }

/* Upload progress */
.upload-progress {
    margin-top: 0.5rem;
}
