/* AB Roll Pro Max — Linear emerald theme */

:root {
    --emerald: #0a7d5a;
    --emerald-dark: #075e43;
    --emerald-light: #e6f4ee;
    --paper: #fafaf9;
    --paper-dark: #f4f4f3;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-subtle: #999;
    --border: #e5e5e5;
    --border-dark: #d4d4d4;
    --blue: #2563eb;
    --orange: #ea580c;
    --red: #dc2626;
    --green: #16a34a;
    --yellow: #ca8a04;
    --code-bg: #f8f8f7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-lg: 12px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Prompt', 'Inter', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
}

a {
    color: var(--emerald);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    height: 56px;
    display: flex;
    align-items: center;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.topbar-logo {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}

.topbar-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.topbar-nav a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.topbar-nav a:hover { color: var(--emerald); }

.topbar-cta {
    background: var(--emerald) !important;
    color: white !important;
    padding: 6px 14px;
    border-radius: var(--radius);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-dark);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.user-email { color: var(--text-muted); }

.logout-link {
    color: var(--red) !important;
    font-size: 12px;
}

/* Main */
main {
    padding: 48px 0 96px;
}

h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 64px 24px 32px;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--emerald) 0%, #0a9d6f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--emerald);
}

.hero-tagline {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: inline-flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--emerald);
    color: white;
}

.btn-primary:hover { background: var(--emerald-dark); text-decoration: none; }

.btn-secondary {
    background: white;
    color: var(--text);
    border-color: var(--border-dark);
}

.btn-secondary:hover { border-color: var(--text-muted); text-decoration: none; }

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-num {
    width: 40px;
    height: 40px;
    background: var(--emerald);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 17px;
    margin-bottom: 4px;
}

.card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Specs */
.specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
    margin: 16px 0;
}

.spec {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.spec-label { color: var(--text-muted); }
.spec-value { font-weight: 500; font-family: monospace; }

/* Comparison */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 24px 0;
}

.compare-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.compare-item.compare-good {
    border-color: var(--emerald);
    background: var(--emerald-light);
}

.compare-item ul {
    list-style: none;
    padding: 0;
    margin-top: 12px;
}

.compare-item li {
    padding: 6px 0;
    font-size: 14px;
}

/* Job creator */
.job-creator {
    margin-top: 24px;
}

.step {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.step h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--emerald);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

/* Upload zones */
.upload-zone {
    background: var(--paper-dark);
    border: 2px dashed var(--border-dark);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.15s;
}

.upload-zone.drag-over {
    border-color: var(--emerald);
    background: var(--emerald-light);
}

.btn-upload {
    background: var(--emerald);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-upload:hover { background: var(--emerald-dark); }

.upload-info {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.upload-list {
    margin-top: 12px;
    text-align: left;
}

.upload-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

/* Settings */
.settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.settings label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.settings input {
    padding: 8px 12px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text);
    background: white;
}

.settings input:focus {
    outline: none;
    border-color: var(--emerald);
}

/* Start button */
.btn-start {
    background: var(--emerald);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-start:hover:not(:disabled) {
    background: var(--emerald-dark);
    transform: translateY(-1px);
}

.btn-start:disabled {
    background: var(--border-dark);
    cursor: not-allowed;
}

.status {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.status.error { color: var(--red); }
.status.success { color: var(--green); }

/* Job list */
.jobs-list {
    margin-top: 24px;
}

.job-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.job-card:hover {
    border-color: var(--emerald);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-id {
    font-family: monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.job-status {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.job-status.pending { background: #fef3c7; color: var(--yellow); }
.job-status.uploading { background: #dbeafe; color: var(--blue); }
.job-status.ready { background: #dbeafe; color: var(--blue); }
.job-status.processing { background: var(--emerald-light); color: var(--emerald-dark); }
.job-status.done { background: #d1fae5; color: var(--green); }
.job-status.failed { background: #fee2e2; color: var(--red); }
.job-status.canceled { background: var(--paper-dark); color: var(--text-muted); }

.job-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.job-progress-bar {
    height: 100%;
    background: var(--emerald);
    transition: width 0.3s;
}

.job-files {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Job detail */
.job-detail {
    margin-top: 16px;
}

.detail-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.events {
    background: var(--paper-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
}

.event-line {
    padding: 2px 0;
    color: var(--text-muted);
}

.event-line.error { color: var(--red); }
.event-line.warn { color: var(--yellow); }
.event-line.info { color: var(--text); }

.download-btn {
    background: var(--emerald);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    margin-top: 12px;
}

.download-btn:hover { background: var(--emerald-dark); text-decoration: none; }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    background: var(--paper-dark);
    padding: 24px 0;
    margin-top: 64px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--emerald); }

/* Mobile */
@media (max-width: 768px) {
    .topbar-nav { gap: 12px; }
    .topbar-nav a:not(.topbar-cta):not(.user-pill *) { display: none; }
    h1 { font-size: 28px; }
    .hero h1 { font-size: 40px; }
    .hero-tagline { font-size: 18px; }
    .comparison { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    main { padding: 24px 0 64px; }
}
