:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --ink: #1f2937;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #d1d5db;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.page-wrap {
    width: min(1040px, calc(100% - 32px));
    margin: 40px auto;
    display: grid;
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 28px;
}

h1,
h2 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 60ch;
    line-height: 1.6;
}

.upload-form {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.file-input-wrap {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 500;
    color: var(--ink);
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.file-input-wrap input[type="file"] {
    font-family: inherit;
    color: var(--muted);
}

button {
    border: none;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease;
}

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

.alerts {
    margin: 16px 0 0;
    padding: 12px 14px;
    list-style: none;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
}

.results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.image-card {
    padding: 16px;
}

.image-card h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.image-card img {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #fff;
}

.reveal {
    animation: revealUp 420ms ease both;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .results {
        grid-template-columns: 1fr;
    }

    .upload-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        padding: 22px;
    }
}
