body {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: larger;
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

main {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

input[type="checkbox"] {
    display: none;
}

/* Screen reader only content */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

h1 {
    font-family: Papyrus, fantasy;
    margin: 5px 0;
    font-size: clamp(1.2rem, 3vw, 2rem);
    flex-shrink: 0;
}

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

#bingo-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 10px;
    max-width: min(90vw, calc(100vh - 150px));
    width: auto;
    aspect-ratio: 1 / 1;
}

.bingo-item {
    border: 1px solid #ccc;
    padding: 5px;
    text-align: center;
    background: #f9f9f9;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    font-size: clamp(0.7rem, 1.5vw, 1rem);
    overflow: hidden;
}

.bingo-item:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.bingo-item:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
    z-index: 1;
}

.bingo-item.checked {
    background-color: #006400;
    color: white;
}

/* Improved contrast for checked items */
.bingo-item.checked:hover {
    background-color: #004d00;
}

.button-container {
    text-align: center;
    flex-shrink: 0;
    justify-content: center;
}

#reset-button {
    margin: 5px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: 2px solid #007bff;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    border-radius: 4px;
}

#reset-button:hover {
    background: #0056b3;
    border-color: #0056b3;
}

#reset-button:focus {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

/*row*/
.celebrate-row {
    /* add a horizontal roygbiv gradient that animates to the right repeating infinitely */
    /* background: linear-gradient(to right, red, orange, yellow, green, blue, violet, blue, green, yellow, orange, red); */
    /*start at green*/
    background: linear-gradient(to right, green, blue, violet, red, orange, yellow, orange, red, violet, blue, green);
    background-size: 4400% 100%;
    animation: gradient-row 440s linear infinite;
}

@keyframes gradient-row {
    0% {
        background-position: 4400% 0%;
    }

    100% {
        background-position: 0% 0%
    }
}



/*column*/
.celebrate-column {
    /* add a vertical roygbiv gradient that animates to the bottom repeating infinitely */
    background: linear-gradient(to bottom, green, blue, violet, red, orange, yellow, orange, red, violet, blue, green);
    background-size: 100% 4400%;
    animation: gradient-column 440s linear infinite;
}

@keyframes gradient-column {
    0% {
        background-position: 0% 4400%;
    }

    100% {
        background-position: 0% 0%
    }
}

/*spin*/

.celebrate-spin-right {
    animation: spin-right 1s linear infinite;
}

@keyframes spin-right {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: rotate(360deg);
        opacity: 1;
    }
}

.celebrate-spin-left {
    animation: spin-left 1s linear infinite;
}

@keyframes spin-left {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: rotate(-360deg);
        opacity: 1;
    }
}