@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf') format('truetype');
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
    font-style: italic;
    font-weight: 300 800;
    font-display: swap;
}

:root {
    --color-background: #222;
    --color-font: #fff;
    --color-focus-outline: #555;
    --color-outline: #777;
    --color-input-background: #444;
    --color-input-hover: #444;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
    background-color: var(--color-background);
    color: var(--color-font);
    margin: 0;
}

h1 {
    font-size: 2.75rem;
    font-weight: 600;
    margin: 0;
}

h2 {
    font-size: 2rem;
    font-weight: 300;
    margin: 0 0 20px;
}

a {
    color: var(--color-font);
}

.hero {
    padding: 1.5rem 1rem;
    text-align: center;
}

.container {
    max-width: 700px;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 2rem 1rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.input-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
    justify-content: center;
    max-width: 600px;
}

.input-label,
.input-row input,
.input-row button {
    color: var(--color-font);
    background-color: transparent;
    border: solid 1px var(--color-outline);
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 300;
}

.input-row input:focus,
.input-row button:focus {
    outline: solid 4px var(--color-focus-outline);
    border: none;
}

.input-row label {
    border: none;
    display: flex;
    align-items: center;
}

.input-row input {
    min-width: 0;
    height: 40px;
    flex: 1 1 auto;
    padding: 0 0.75rem;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.input-row button {
    background-color: transparent;
    cursor: pointer;
    padding: 0 1rem;
}

.input-row button:hover {
    background-color: var(--color-input-hover);
}

.stat {
    margin-top: 2rem;
}

.title-top {
    font-weight: 700;
    font-size: 1.56rem;
    margin-bottom: -5px;
    visibility: hidden;
}

.title-bottom{
    font-size: 6.25rem;
    font-weight: 300;
    letter-spacing: -0.15rem;
    margin-bottom: -1rem;
}

#toast-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    bottom: 20px;
    right: 20px;
    gap: 10px;
    max-height: 20vh;
    max-height: 20dvh;
    font-size: 1rem;
    overflow: hidden;
}

@keyframes toast-fade-in {
    from { opacity: 0; transform: translateY(-0.5rem); }
    to   { opacity: 1; transform: none; }
}

@keyframes toast-fade-out {
    to { opacity: 0; transform: translateY(0.5rem); }
}

.toast {
    background: var(--color-input-hover);
    padding: 0.5rem 1rem;
    animation: toast-fade-in 0.1s ease;
}

.toast.exiting {
    animation: toast-fade-out 0.2s ease-out forwards;
}

footer {
    font-size: 1rem;
    font-weight: 300;
    text-align: center;
    padding: 1rem 0;
}

footer p {
    margin: 0;
}

@media only screen and (max-width: 767px) {
    .title-top{
        font-size: 1.25rem;
    }

    .title-bottom{
        font-size: 4.05rem;
    }
}

@media only screen and (max-width: 480px) {
    .input-row {
        flex-direction: column;
    }

    .input-row label {
        justify-content: center;
    }

    .input-row input {
        text-align: center;
    }

    .input-row button {
        padding: 0.3rem 0;
    }

    .title-top {
        font-size: 1.25rem;
    }

    .title-bottom {
        font-size: 4rem;
    }

    h1 {
        font-size: 2.375rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    #toast-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    footer {
        font-size: 0.875rem;
    }
}
