#hex-container {
    position: relative;
    overflow: hidden;
    opacity: 0%;
    width: 100%;
    min-width: 500px;
    height: 85vh;
    min-height: 550px;
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    mask-image: radial-gradient(circle, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask-image: radial-gradient(circle, rgba(255, 255, 255, 1) 40%, rgba(255, 255, 255, 0) 100%);
    transition: opacity 0.3s ease;
}

#hexGrid {
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(26, 2fr);
    grid-template-rows: repeat(13, 2fr);
    grid-gap: 10px;

    padding: 0;
    margin: 0;
    list-style-type: none;
    transition: margin 0.3s ease-in-out, opacity 0.5s ease-out;
}

#hexGrid.locked {
    pointer-events: none;
}

.hex {
    grid-column-end: span 2;
    grid-row-start: span 1;
    aspect-ratio: 0.9;
    width: 140px;
    padding: 0;
    box-sizing: border-box;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    margin-top: -25%;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    transition: background-color 0.15s ease;
    z-index: 100;
    background-color: white;
}

.hex:nth-child(25n+1) {
    grid-column-start: 1;
}

.hex:nth-child(25n+14) {
    grid-column-start: 2;
}


.seen {
    background-color: #ccc;
}

.neighbors {
    background-color: #eee;
}

.neighbors:hover {
    cursor: pointer;
    background-color: #dedede;
}

.visited {
    background-color: #efd036;
}

.visited.neighbors {
    background-color: #faedae;
}

.visited#hex-root {
    background-color: #ffd924;
}

.visited.neighbors:hover {
    background-color: #ffe565 !important;
}


.hexText {
    box-sizing: border-box;
    margin: 0;
    align-items: center;
    text-align: center;
    justify-content: center;
    
    background-color: transparent;
    font-weight: 700;
    font-size: 0.9em;
    color: black;
    text-transform: uppercase;
    font-family: sans-serif;
}

@media screen and (max-width: 1260px) {
    #hex-container {
        height: 50vh;
        min-height: 500px;
    }
}

@media screen and (max-width: 580px) {
    #hex-container {
        height: 45vh;
        min-height: 500px;
        margin-top: 20px;
        min-width: 400px;
    }

    .hex {
        width: 110px;
        font-size: 0.85em;
    }
}

@media screen and (max-width: 400px) {
    #hex-container {
        height: 45vh;
        min-height: 320px;
        margin-top: 20px;
        min-width: 300px;
    }

    .hex {
        width: 100px;
        font-size: 0.8em;
    }
}