/* Reset padrão */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: url(imagens/bg-loteria.png) no-repeat center center fixed;
    background-size: cover;
    background-color: #ededed;
}

.main-h1 {
    position: relative;
    margin-top: 20px;
    min-width: 300px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    color: #fff;
    transition: all 0.6s ease;
    word-break: break-word;
}

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    gap: 20px;
    width: 90%;
    max-width: 1600px;
    margin-top: 60px;
    flex-grow: 1;
}

.container-0,
.container-1,
#resultado-oficial-container {
    width: 100%;
    padding: 20px;
    background: #f4f4f6;
    text-align: center;
    color: #008f58;
    border-radius: 8px;
    transition: all 0.6s ease;
}

.container-0,
.container-1 {
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .main-container {
        flex-direction: row;
        justify-content: space-evenly;
    }

    .container-0,
    .container-1 {
        width: 100%;
        margin-bottom: 20px;
    }

    .main-h1 {
        font-size: 24px;
        margin-top: 10px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .main-h1 {
        top: 0;
        font-size: 20px;
        padding: 15px;
    }

    .main-container {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .container-0,
    .container-1 {
        width: 90%;
        padding: 15px;
        margin: 0 auto;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-game {
        width: 80%;
        max-width: 200px;
        height: 40px;
        font-size: 18px;
    }

    .btn {
        width: 80%;
        max-width: 200px;
        height: 40px;
        font-size: 16px;
    }

    .acerto-item {
        width: 70px;
    }

    .ball {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .main-h1 {
        font-size: 18px;
        margin: 0 10px;
        line-height: 1.2;
    }

    .main-h1 span:first-child {
        display: block;
    }

    .main-h1 span:nth-child(2) {
        display: block;
        font-size: 24px;
        font-weight: bold;
    }

    .container-0,
    .container-1 {
        padding: 10px;
        margin: 0 auto;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-game {
        width: 100%;
        height: 40px;
        font-size: 16px;
    }

    .btn {
        width: 100%;
        height: 40px;
        font-size: 14px;
    }

    .acerto-item {
        width: 60px;
    }

    .ball {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    h1 {
        font-size: 22px;
    }

    h2.only-h1 {
        font-size: 24px;
    }
}

.result-acertos {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        align-items: center;
        gap: 20px;
        margin-top: 20px;
    }

    .acerto-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 80px;
        padding: 8px;
        text-align: center;
        color: #4c546d;
        transition: all 0.3s ease;
    }

    .acerto-item p {
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: bold;
    }

    .ball {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: #7a86ae;
        border-radius: 50%;
        color: #fff;
        font-size: 18px;
        font-weight: bolder;
        transition: all 0.3s ease;
    }

    .ball:hover {
        transform: scale(1.1);
        background: #ffdc2d;
        color: #008f58;
    }

    .input-group {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 20px;
    }

    .input-game {
        width: 100px;
        height: 50px;
        background: transparent;
        border: 2px solid #0065b7;
        outline: none;
        border-radius: 4px;
        padding: 0 20px;
        text-align: center;
        font-size: 24px;
        color: #4c546d;
        transition: all 0.3s ease;
        font-weight: bolder;
    }

    .input-game:focus,
    .input-game:hover {
        border-color: #008f58;
    }

    .btn {
        width: 120px;
        height: 50px;
        background: #0065b7;
        border: none;
        border-radius: 4px;
        color: #fff;
        cursor: pointer;
        font-size: 19px;
        transition: all 0.3s ease;
    }

    .btn:hover {
        background: #008f58;
        transform: scale(1.05);
    }

    #btn-clear:hover {
        background: #ff4b4b;
    }

    .only-h1 {
        font-size: 40px;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.10);
    }

    h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    h5 {
        font-size: 18px;
        font-weight: normal;
    }

    input[type="number"] {
        -webkit-appearance: none;
        -moz-appearance: textfield;
        appearance: none;
        margin: 0;
    }

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

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

    .jogos-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 20px;
        margin-top: 30px;
    }

    .jogo-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: #f4f4f6;
        border: 2px solid #008f58;
        border-radius: 8px;
        padding: 20px;
        width: 180px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
    }

    .jogo-item:hover {
        transform: translateY(-4px);
    }

    .jogo-title {
        font-size: 18px;
        color: #4c546d;
        margin-bottom: 12px;
        font-weight: bold;
    }

    .jogo-numbers {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .number-item {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: #adc0c4;
        border-radius: 50%;
        color: #fff;
        font-size: 16px;
        font-weight: bold;
        transition: all 0.3s ease;
    }

    .number-item:hover {
        background: #008f58;
        color: #ffdc2d;
        transform: scale(1.1);
    }

    #resultado-oficial-container {
        flex: 1;
        min-width: 300px;
        padding: 20px;
        background: #f4f4f6;
        text-align: center;
        border-radius: 8px;
        transition: all 0.6s ease;
        margin-top: 20px;
    }

    #resultado-oficial-container h2 {
        color: #0065b7;
    }

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

    #dezenas-sorteadas {
        display: flex;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-top: 15px;
    }

    #dezenas-sorteadas div {
        width: 44px;
        height: 44px;
        background-color: #7a86ae;
        color: #f3f3f3;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 18px;
        font-weight: bold;
        transition: all 0.3s ease;
    }

    #dezenas-sorteadas div:hover {
        background-color: #008f58;
        color: #ffdc2d;
        transform: scale(1.1);
    }

    @media (max-width: 1024px) {
        #resultado-oficial-container {
            width: 100%;
            margin-bottom: 20px;
        }
    }

    @media (max-width: 768px) {
        #resultado-oficial-container {
            width: 90%;
            padding: 15px;
        }

        #dezenas-sorteadas div {
            width: 40px;
            height: 40px;
            font-size: 16px;
        }
    }

    @media (max-width: 480px) {
        #resultado-oficial-container {
            width: 100%;
            padding: 10px;
        }

        #dezenas-sorteadas div {
            width: 36px;
            height: 36px;
            font-size: 14px;
        }
    }

    .footer {
        font-weight: normal;
        position: relative;
        width: 100%;
        text-align: center;
        margin-top: 18px;
        color: #4c546d;
        background: transparent;
        font-size: 13px;
        z-index: 1000;
    }
