@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg:      #ffffff;
    --ink:     #000000;
    --accent:  #2563eb;
    --muted:   #6b7280;
    --border:  rgba(0,0,0,0.05);
    --surface: #fafafa;
    --success: #16a34a;
}

[data-theme="dark"] {
    --bg:      #050505;
    --ink:     #ffffff;
    --accent:  #d9ff00;
    --muted:   #9ca3af;
    --border:  rgba(255,255,255,0.06);
    --surface: #0f0f0f;
    --success: #4ade80;
}

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

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 40px 20px;
    transition: background 0.3s, color 0.3s; min-height: 100vh; display: flex; flex-direction: column; align-items: center; }

header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    max-width: 1200px;
    margin-left: auto; width: 100%;
    margin-right: auto;
}

.back-link {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--ink); }

.logo {
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.1;
}

.tagline {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-top: 12px;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover { opacity: 0.6; }

/* Layout */
.layout {
    max-width: 1200px;
    margin: 0 auto; width: 100%; width: 100%;
    display: grid;
    gap: 24px;
    flex: 1;}

@media (min-width: 900px) {
    .layout {
        grid-template-columns: 1fr 1fr;
        flex: 1;}
    .layout-output {
        position: sticky;
        top: 40px;
        align-self: start;
    }
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 28px;
    margin-bottom: 20px;
}

.hidden { display: none !important; }

.label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 12px;
}

/* Inputs */
.input {
    width: 100%;
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

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

.input--select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.row { display: flex; gap: 10px; align-items: center; }
.row--mt { margin-top: 12px; }
.select-field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.color-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.color-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
}

.info-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    background: var(--ink);
    color: var(--bg);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn:hover { opacity: 0.8; }
.btn:disabled { opacity: 0.3; cursor: default; }

.btn--outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn--small {
    padding: 8px 16px;
    font-size: 0.75rem;
}

.btn--full {
    width: 100%;
    padding: 16px;
}

/* Upload zone */
.upload-zone {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-zone:hover { border-color: var(--accent); }

.upload-placeholder {
    text-align: center;
    color: var(--muted);
}

.upload-text {
    font-size: 0.85rem;
    margin-top: 12px;
}

.upload-preview {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 240px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Result */
.result-placeholder {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
}

.result-placeholder .meta {
    font-size: 1.1rem;
}

.result-placeholder .info-row {
    justify-content: center;
}

.result-placeholder .info-row .meta {
    font-size: 0.9rem;
}

/* Quality slider */
input[type="range"] {
    width: 100%;
    accent-color: var(--ink);
    height: 6px;
    cursor: pointer;
}

/* Footer */

.footer {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
        margin: 96px auto 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    color: var(--muted);
    line-height: 1.6;
        max-width: 1200px;
}

.footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

@media (min-width: 640px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
            max-width: 1200px;
}
    .footer-inner {
        flex-direction: row;
        gap: 4px;
    }
}

@media (min-width: 768px) {
    body { padding: 60px 40px; }
}

@media (min-width: 1024px) {
    body { padding: 60px 80px; }
}













