:root {
    --bg-1: #eaf4ff;
    --bg-2: #d5e8fb;
    --ink: #12324f;
    --muted: #4b6784;
    --card: #ffffff;
    --line: #d5e2ef;
    --accent: #0a8ad8;
    --accent-dark: #086ea9;
    --ok: #2d9b4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    font-family: 'IBM Plex Sans', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(10, 138, 216, 0.20), transparent 36%),
        radial-gradient(circle at 92% 85%, rgba(13, 108, 168, 0.18), transparent 38%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.container {
    width: min(100%, 520px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px 24px 24px;
    text-align: center;
    box-shadow: 0 18px 36px rgba(15, 54, 88, 0.14);
}

.brand-pill {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent-dark);
    background: rgba(10, 138, 216, 0.12);
    margin-bottom: 14px;
}

.logo {
    width: min(62vw, 240px);
    margin: 0 auto 14px;
    display: block;
}

h1 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.3rem, 2.8vw, 1.7rem);
    line-height: 1.25;
    color: #0c2e4d;
}

.lead {
    margin: 12px 0 22px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--muted);
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-input-container {
    width: 100%;
    max-width: 360px;
    border: 1px dashed #9bb8d2;
    background: #f8fbff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.file-label {
    background: linear-gradient(180deg, #0d9be9, var(--accent));
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    display: inline-block;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 7px 14px rgba(10, 138, 216, 0.28);
}

.file-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 16px rgba(10, 138, 216, 0.33);
}

#file-input {
    display: none;
}

.file-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 38px;
}

#file-name {
    font-size: 0.85rem;
    color: #244865;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.check-icon {
    color: transparent;
    transition: color 0.3s ease;
    margin-top: 4px;
}

.check-icon.visible {
    color: var(--ok);
}

input[type="submit"] {
    width: 100%;
    max-width: 360px;
    background: linear-gradient(180deg, #37b764, #2d9b4d);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 12px 18px;
    font-size: 0.98rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 8px 14px rgba(44, 140, 72, 0.28);
}

input[type="submit"]:hover {
    transform: translateY(-1px);
}

input[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
}

.loading p {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.spinner {
    border: 4px solid #e6eef7;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

@media (max-width: 480px) {
    .container {
        border-radius: 16px;
        padding: 22px 16px 18px;
    }

    .lead {
        font-size: 0.9rem;
    }

    .file-input-container,
    input[type="submit"] {
        max-width: 100%;
    }
}