/* For Mobile */
@media screen and (max-width: 540px) {
    .view {
        width: 400px;
    }
}

/* For Tablets */
@media screen and (min-width: 540px) and (max-width: 780px) {
    .view {
        width: 600px;
    }
}

html {
    margin: 0px;
    padding: 0px;
}

body {
    background-color: #6a90c6;
    font-family: Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-variant: small-caps;
    text-rendering: geometricPrecision;
    margin: 0px;
    padding: 0px;
    font-size: clamp(9px, 1.8vh, 24px)
}


a {
color: cyan;
}
#bottom_menu {

    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    /* Ensure it does not overflow the viewport */
    box-sizing: border-box;
    /* Include padding and borders in the width */
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;

}

img {
    image-rendering: pixelated;
    /* For pixel-perfect scaling */
    image-rendering: crisp-edges;
    /* For sharper edges */
}

#screen-container {
    top: 8vh;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 201px;
    Overflow: hidden
}


#screen {
    position: fixed;
    top: 8vh;
    align-items: center;
    justify-content: center;

    max-width: 100vw;
    /* Ensure it does not overflow the viewport */
    ;

}



.game-container {

    margin: 0px;
    padding: 0px;
    height: auto !important;



}


.image-container {
    background: black;
    margin: 0px;
    padding: 10px;
    height: auto !important;
    position: relative;
    overflow: visible;

    text-align: center;
    /* Existing Border */
    border: 10px double rgb(103, 205, 225);
    /* Add this line for rounded corners */
    border-radius: 15px;

}

.image-container.enlarged {

    width: 100vw;
    height: 82vh;
    transform-origin: top center;
    transition: transform 250ms ease-in-out, filter 1000ms ease-in;
}


.image-container img {
    padding: 1vw;
    background-color: black;
    display: block;
    /* Remove inline spacing */
    margin: 0px;
    padding: 0px;

    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
   image-rendering: pixelated;

}



/* Scanline Overlay */
#scanline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5) 0px,
        rgba(0, 0, 0, 0.5) 1px,
        transparent 1px,
        transparent 2px
    );
    image-rendering: pixelated;
}

/* Hidden by default */
#scanline-overlay.hidden {
    display: none;
}

 

/* Controls: Float above */
#scale {
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    pointer-events: auto;
    text-align: right;

}   

#game {
    padding: 0px;
    margin: 0px;
   vertical-align: top;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
        image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}    

/* Tab Styles */
.size a {
    background: grey;
    padding: 4px 8px;
    margin: 0px;
    border-left: 1px solid #ccc;

    border-top: none;
    border-bottom-left-radius: 10px;

    cursor: pointer;
    text-decoration: none;
    color: black;
    display: inline-block;
    font-size: 13px;
}

.size a:hover {
    background: orange;
}

.size.active a {
    background: #fff;
    font-weight: bold;
    border-color: #666;
}

/* Scanline Button */
.scanline-btn {
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 0px 0 1px 10px;
    cursor: pointer;

    font-size: 13px;
    color: #ccc;
}

.scanline-btn a {
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

.scanline-btn:hover {
    background: #555;
    color: #fff;
}

.scanline-btn.active {
    background: #00bcd4;
    color: #fff;
    border-color: #008ba3;
}