@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap');

:root {
    --bg-color: #121212;      /* Tom 1: Fundo */
    --surface-color: #1e1e1e; /* Tom 2: Superfície/Inputs */
    --border-color: #333333;  /* Tom 3: Bordas/Divisores */
    --text-secondary: #a0a0a0;/* Tom 4: Texto secundário */
}

* {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    outline: none;
    box-sizing: border-box;
}

body {
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
    color: #ffffff;
}

h1 {
    margin-bottom: 30px;
    font-style: normal;
    font-weight: 300;
    font-size: 40px;
    line-height: 38px;
    color: #fff;
    text-align: center;
}

.content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 10px;
}

.input {
    padding: 10px;
    width: 100px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1.1rem;
    color: #fff;
    transition: border-color 0.3s ease;
}

.input:focus {
    border-color: #ffffff;
}

.result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.button {
    padding: 10px 25px;
    max-width: 230px;
    background: #ffffff;
    color: #121212;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
}

.button:hover {
    background: #cccccc;
    opacity: 1;
}

.button:active {
    transform: scale(0.98);
}

label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 20px;
    font-weight: 400;
    max-width: 225px;
}

.solution {
    margin-bottom: 20px;
    padding: 5px;
    min-width: 100px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 250px;
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}

@media (max-width: 720px) {
    body {
        padding: 20px;
    }

    img {
        width: 100%;
        max-width: 200px;
    }

    h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    .content {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 280px;
        gap: 0; /* Remove gap para controlar via margem nos labels */
    }

    .input {
        width: 100%;
        margin-bottom: 15px;
    }

    .button {
        width: 100%;
        max-width: none;
        padding: 15px; /* Botão maior para facilitar o toque */
    }

    .solution {
        font-size: 2rem;
        width: 100%;
        max-width: 280px;
    }

    label {
        margin-top: 10px;
        margin-bottom: 5px;
    }
}