body {
    font-family: sans-serif;
    text-align: center;
    min-height: 100vh;
    margin: 0;
    padding-top: 2.5em;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
@media (max-width: 600px) {
    body { font-size: 1.1em; }
    .cell { font-size: calc(4vmin); }
}
body[data-region="all"] {
    /* Placeholder image shown when all regions are selected */
    background-image: url('/static/images/all.png');
}
body[data-region="europe"] {
    background-image: url('/static/images/europe.png');
}
body[data-region="north_america"] {
    background-image: url('/static/images/north_america.png');
}
body[data-region="north_america_usa"] {
    background-image: url('/static/images/USA.png');
}
body[data-region="north_america_canada"] {
    background-image: url('/static/images/canada.png');
}
body[data-region="north_america_mexico"] {
    background-image: url('/static/images/mexico.png');
}
body[data-region="central_america"] {
    background-image: url('/static/images/central_america.png');
}
body[data-region="south_america"] {
    background-image: url('/static/images/south_america.png');
}
body[data-region="middle_east"] {
    background-image: url('/static/images/middle_east.png');
}
body[data-region="africa"] {
    background-image: url('/static/images/africa.png');
}
body[data-region="australia_new_zealand"] {
    background-image: url('/static/images/australia_new_zealand.png');
}
body[data-region="asia"] {
    background-image: url('/static/images/asia.png');
}
#grid {
    margin: 0 auto;
    width: 90vmin;
    height: 90vmin;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
}
/*
 * Give each grid square a light background so its text remains
 * readable over the region images.
 */
.cell {
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    font-size: calc(3vmin);
    padding: 2px;
    background-color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 2px #000;
}
#bingo-notice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
    font-size: 10vmin;
    font-weight: bold;
    z-index: 1000;
}
#menu {
    position: fixed;
    top: 0;
    right: 0;
    text-align: right;
    margin: 0;
    padding: 0.5em;
    z-index: 1000;
}

#menu-toggle {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.1em 0.25em;
    border-radius: 0.25em;
    border: none;
    cursor: pointer;
}

#nav-buttons {
    margin-top: 0.5em;
    display: flex;
    justify-content: center;
    gap: 0.5em;
    flex-direction: row;
    flex-wrap: wrap;
}

/*
 * Make game headings and controls stand out against background images.
 */
#title,
#region-title,
h2,
#nav-buttons button,
#region-label,
#generate-btn,
#bingo-instructions p {
    display: inline-block;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.1em 0.25em;
    border-radius: 0.25em;
}
#region-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 0.5em;
}
/* Display the title as a block so the region selector appears below */
#title { display: block; }
