:root {
    font-family:
            Inter,
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;

    display: grid;
    place-items: center;

    padding: 28px;

    background:
            linear-gradient(135deg, #eef2ff 0%, #f8fafc 42%, #ecfdf5 100%);
    color: #111827;
}

.upload-card {
    width: min(620px, 100%);
    padding: 30px;

    border: 1px solid rgb(15 23 42 / 8%);
    border-radius: 18px;
    background: rgb(255 255 255 / 92%);

    box-shadow:
            0 22px 60px rgb(15 23 42 / 14%);
}

.header {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;

    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 10px;

    font-size: 32px;
    line-height: 1.15;
}

.description {
    max-width: 520px;
    margin: 0;

    color: #64748b;
    line-height: 1.55;
}

#file-input {
    display: none;
}

.actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.button {
    width: 100%;

    padding: 14px 18px;

    border: 0;
    border-radius: 10px;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    background: #111827;
    color: #ffffff;

    transition:
            transform 120ms ease,
            box-shadow 120ms ease,
            opacity 120ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);

    box-shadow:
            0 10px 22px rgb(15 23 42 / 16%);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-secondary {
    background: #2563eb;
}

.copy-button {
    background: #047857;
}

.hidden {
    display: none;
}

.status {
    min-height: 24px;
    margin: 18px 0 0;

    color: #475569;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.status.error {
    color: #b91c1c;
}

.status.success {
    color: #047857;
}

.preview {
    display: none;
    margin-top: 22px;
    overflow: hidden;

    border: 1px solid rgb(15 23 42 / 10%);
    border-radius: 14px;
    background: #f8fafc;
}

.preview.visible {
    display: block;
}

.preview img {
    display: block;
    width: 100%;
    max-height: 440px;

    object-fit: contain;

    background:
            linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
            linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
            linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
    background-color: #f8fafc;
    background-position:
            0 0,
            0 8px,
            8px -8px,
            -8px 0;
    background-size: 16px 16px;
}

.file-name {
    margin: 0;
    padding: 14px 16px;

    border-top: 1px solid rgb(15 23 42 / 8%);

    color: #334155;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 16px 16px;
}

.image-link {
    display: block;
    padding: 12px 14px;

    border: 1px solid rgb(37 99 235 / 18%);
    border-radius: 10px;

    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.image-link:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    body {
        padding: 14px;
    }

    .upload-card {
        padding: 22px;
        border-radius: 14px;
    }

    h1 {
        font-size: 28px;
    }
}
