:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --card: #ffffff;
    --accent: #1a73e8;
    --text: #1b1f23;
    --muted: #55657a;
    --border: #d6deeb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

main.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px 64px;
}

header h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

header p {
    margin: 0 0 24px;
    color: var(--muted);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field label {
    font-weight: 600;
}

.field input,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fbfdff;
}

textarea {
    resize: vertical;
    min-height: 160px;
}

.hint {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 12px;
}

button {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--accent);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.08s ease,
        box-shadow 0.1s ease;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.2);
}

button:hover {
    transform: translateY(-1px);
}

button#clear {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
    box-shadow: none;
}

#status {
    min-height: 20px;
    color: var(--muted);
}

#image-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

#image-container.hidden {
    display: none;
}

#result {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.download {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    background: #f5f7fb;
    font-weight: 600;
}

@media (max-width: 640px) {
    .actions {
        flex-direction: column;
    }
    button,
    button#clear {
        width: 100%;
    }
}
