* {
    margin: 0;
    padding: 0;
    text-align: center;
    box-sizing: border-box;
    font-family: sans-serif;
}

body {
    background-color: rgb(65, 4, 65);
    width: 100%;
    min-height: calc(var(--bp-vh, 1vh) * 100);
    padding: 52px 8px calc(var(--bp-gamepad-height, 0px) + 24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow-x: hidden;
}

#message{
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(18px, 6vw, 30px);
    color: white;
    text-shadow: 1px 2px 5px black;
    line-height: 1.2;
    background-color: rgb(83, 49, 124);
    width: min(100%, 390px);
    min-height: clamp(64px, 18vw, 90px);
    padding: 12px;
    border-radius: 5px;
}

#restart{
    color: white;
    background-color: rgb(85, 88, 130);
    box-shadow: 3px 2px 0px rgb(66, 68, 102);
    border-radius: 25px;
    min-height: 48px;
    width: min(100%, 12rem);
    padding: 12px 18px;
    border: 0;
}

#board {
    margin-top: 0;
    background-color: rgb(132, 10, 132);
    border: solid rgb(98, 8, 98) clamp(4px, 1.4vw, 7px);
    border-radius: clamp(14px, 4vw, 25px);
    width: min(94vw, 560px);
    max-width: calc(100vw - 16px);
    aspect-ratio: 7 / 5;
    height: auto;
    padding: clamp(6px, 1.8vw, 12px);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: clamp(4px, 1.3vw, 10px);
    touch-action: manipulation;
}

.cell {
    background-color: rgb(65, 4, 65);
    border-radius: 50px;
    height: 100%;
    width: 100%;
    box-shadow: 0px 6px 0px rgb(103, 8, 103);
    border: 0;
    cursor: pointer;
    min-width: 0;
}


#btnContainer {
    margin-top: 0;
    width: min(94vw, 560px);
    max-width: calc(100vw - 16px);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(2px, 1vw, 8px);
}

.column-button {
    background-color: rgb(132, 10, 132);
    box-shadow: 3px 2px 0px rgb(93, 8, 93);
    border-radius: 25px;
    border: 0;
    min-width: 40px;
    min-height: clamp(40px, 11vw, 48px);
    width: 100%;
    color: white;
    font-weight: 700;
    touch-action: manipulation;
}

.column-button:hover,
.column-button:focus-visible {
    background-color: rgb(149, 13, 149);
    cursor: pointer;
    transition: 0.3s;
    outline: 3px solid #fff36a;
    outline-offset: 3px;
}

.column-button:active{
    background-color: rgb(128, 11, 128);
    transform: translate(3px, 2px);
    box-shadow: none;
}

@media (max-width: 360px) {
    body {
        padding-inline: 6px;
    }

    #message {
        width: min(100%, 308px);
    }

    #board,
    #btnContainer {
        width: min(100%, 308px);
    }

    .column-button {
        min-width: 40px;
        font-size: 0.85rem;
    }
}
