:root {
    color-scheme: light;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color: #1f2937;
    background-color: #f3f6fb;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, #ffffff 0, #f3f6fb 55%, #e8eef7 100%);
}

header {
    padding: 2rem 1.25rem 0;
    text-align: center;
}

header h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    line-height: 1.2;
}

main {
    display: grid;
    min-height: calc(100vh - 8rem);
    place-items: center;
    padding: 2rem 1.25rem 3rem;
}

.cartao {
    width: min(100%, 42rem);
    padding: clamp(1.5rem, 5vw, 2.75rem);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1.25rem;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 1.25rem 3rem rgba(30, 41, 59, 0.12),
        0 0.25rem 0.75rem rgba(30, 41, 59, 0.06);
    text-align: center;
}

.cartao h2 {
    margin: 0 0 1rem;
    color: #1d4ed8;
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.cartao p {
    margin: 0 0 1.5rem;
    color: #475569;
    font-size: 1rem;
}

#testar-ponte {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1.4rem;
    border: 0;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0.6rem 1.25rem rgba(37, 99, 235, 0.25);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

#testar-ponte:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.85rem 1.5rem rgba(37, 99, 235, 0.32);
}

#testar-ponte:active {
    transform: translateY(0);
}

#testar-ponte:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.4);
    outline-offset: 4px;
}

#resultado {
    min-height: 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background-color: #eef2f7;
    color: #475569;
    font-weight: 600;
}

#resultado:empty {
    display: none;
}

#resultado.sucesso {
    border: 1px solid #86efac;
    background-color: #f0fdf4;
    color: #166534;
}

#resultado.erro {
    border: 1px solid #fca5a5;
    background-color: #fef2f2;
    color: #991b1b;
}

@media (max-width: 36rem) {
    header {
        padding-top: 1.5rem;
    }

    main {
        min-height: auto;
        padding-top: 1.5rem;
    }

    .cartao {
        border-radius: 1rem;
    }

    #testar-ponte {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #testar-ponte {
        transition: none;
    }
}
