
:root {
    --ink:       #1a1a1a;
    --paper:     #f5f2eb;
    --cream:     #ede9df;
    --accent:    #c0392b;
    --muted:     #7a7060;
    --border:    #ccc5b0;
    --radius:    4px;
    --font-head: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Courier New', 'Courier', monospace;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 80px;
}

header {
    display: flex;
    flex-direction: row;
    text-align: center;
    margin-bottom: 40px;
    align-items:center;
}

header ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    align-items: center;
}

header li a{
    margin-left: 5vw;
    margin-right: 5vw;
    text-decoration: none;
    color: var(--ink)
}

header h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -1px;
    color: var(--ink);
}

header h1 span {
    color: var(--accent);
}

header p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.card {
    width: 100%;
    max-width: 680px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 4px 4px 0 var(--cream);
}

label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--paper);
    resize: vertical;
    color: var(--ink);
    transition: border-color 0.2s;
}
textarea:focus {
    outline: none;
    border-color: var(--ink);
}

.field { margin-bottom: 24px; }

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--ink);
    background: var(--cream);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-zone .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone .upload-text { font-size: 0.85rem; color: var(--muted); }

#image-preview {
    display: none;
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: var(--ink);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
button[type="submit"]:hover  { background: #333; }
button[type="submit"]:active { transform: scale(0.99); }
button[type="submit"]:disabled {
    background: var(--muted);
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    display: none;
}
#status.info    { background: #eef; border: 1px solid #aac; color: #336; }
#status.error   { background: #fee; border: 1px solid #faa; color: var(--accent); }
#status.loading { background: var(--cream); border: 1px solid var(--border); color: var(--muted); }

.spinner {
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

#output {
    width: 100%;
    max-width: 680px;
    margin-top: 32px;
    display: none;
}

#output h2 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--muted);
    font-weight: normal;
    letter-spacing: 0.05em;
}

#output img {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 4px 4px 0 var(--cream);
    display: block;
}

#output a {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: underline;
}

