.canvas-container {
    height: 93vh!important;
    display: flex;
    transform: scale(1);  /* Scale down by 10% */
    transform-origin: top left; 
    justify-content: center;
    align-items: center;
    overflow-x: auto; /* Enable horizontal scrolling on mobile */
    box-sizing: border-box;
}
.grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    height: auto;
    max-width: 1600px;
    max-height: 800px;
    min-width: 1400px;
    min-height: 700px;

    position: relative;
    z-index: 1;
}
@media (max-width: 768px) {
    .canvas-container {
        margin-left:4%;
        margin-right: 4%;
        align-items: start!important;

    }
    .grid {
        
        transform: scale(0.9);
    }
}
.square {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px dashed #00000023;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.city-layer {


    max-width: 100%;
    max-height: 100%;

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    z-index: 12;  /* Higher than grid tiles */
}

.road-layer {


    max-width: 100%;
    max-height: 100%;

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    z-index: 11;  /* Higher than grid tiles */
}

.city {
    position: absolute;
    width: 50px;  
    height: 50px;
    
    border: 5px solid #3e3e3e;
    background-color: lightgrey;
    transform: translate(-50%, -50%);
    z-index: 21;
}

.city.p1 {
    border-color: #0000ff;
    background-color: #9b9bf5;
}
.city.p2 {
    border-color: #ff0000;
    background-color: #f2b6b6;
}
.city.b1 {
    border-color: #6d5581;
    background-color: #dfc1f7;
}
.city.b2 {
    border-color: #dbbb05;
    background-color: #f2e59b;
}



.road {
    background-color: #a0522d;  /* Light brown for roads */
    width: 20px;
    height: 20px;
    z-index: 20;
}
.no-junction{
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: pink;  
    z-index: 5;
    transform: translate(-50%, -50%); 
}
.road-junction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #a0522d; 
    z-index: 5;
    transform: translate(-50%, -50%);
}
.road-end {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #a0522d; 
    z-index: 5;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: .85;
}



.shore {
    position: absolute;
    background-color: #f4d03f;  /* Light yellow/tan for shores */
    z-index: 3;  /* Slightly below roads to ensure layering */
}
.shore-junction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #f4d03f;  /* Shore color (light yellow/tan) */
    z-index: 5;
    transform: translate(-50%, -50%);
}
.shore-end {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #f4d03f; 
    z-index: 5;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: .95;
}

.gravel-junction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #d69335;  /* Tan/Gravel color */
    z-index: 35;
    transform: translate(-50%, -50%);
}

.waterway {
    position: absolute;
    background-color: #4da6ff;  /* Match water tile color */
    z-index: 74;
}
.waterway-end {
    position: absolute;
    width: 16px;
    height: 16px;
    /* background: linear-gradient(to bottom, #4da6ff, rgba(77, 166, 255, 0)); */
    z-index: 5;
    transform: translate(-50%, -50%);
    border-radius: 15%;
}
.waterway-end.top{
    background: linear-gradient(to top, #4da6ff, rgba(77, 166, 255, 0));
}
.waterway-end.bottom{
    background: linear-gradient(to bottom, #4da6ff, rgba(77, 166, 255, 0));
}
.waterway-end.right{
    background: linear-gradient(to right, #4da6ff, rgba(77, 166, 255, 0));
}
.waterway-end.left{
    background: linear-gradient(to left, #4da6ff, rgba(77, 166, 255, 0));
}


.waterway-junction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #4da6ff;
    z-index: 76;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.waterway-junction-bg {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #4da6ff;
    z-index: 76;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.bridge-junction {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: #3e5973;
    z-index: 76;
    transform: translate(-50%, -50%);
}

.bay {
    position: absolute;
    width: 125px;
    height: 125px;
    background-color: #4da6ff;  
    z-index: 76;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    


}

.lake {
    position: absolute;
    width: 65px;
    height: 65px;
    background-color: #4da6ff; 
    z-index: 76;
    transform: translate(-50%, -50%);
    border-radius: 50%;

}




.tooltip {
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;

    width: 170px!important;
    height: 170px!important;
}

.tooltip.show {
    opacity: 1;
}





/* @media (max-width: 768px) {
    .canvas-container {
        height: calc(100vh - 65px);
        padding: 0; 
    }
    .grid {
        grid-template-columns: repeat(16, 100px); 
        grid-template-rows: repeat(8, 100px);    
        width: 1600px; 
        height: 800px; 
    }
    .square {
        width: 100px;  
        height: 100px; 
    }
} */
.navbar {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1050;
}
.dropup .dropdown-menu {
    bottom: 100%;
    top: auto;
}
body, html {
    background: grey;
    background-image: 
        radial-gradient(circle at top right, rgba(255, 0, 0, 0.5), transparent 50%),
        radial-gradient(circle at bottom left, rgba(0, 0, 255, 0.5), transparent 50%);
    height: 100%;
    margin: 0;
}


