body {
    font-family: Inter, sans-serif;
    background-color: #09090b;
}

/* EmulatorJS fixes */

#game {
    width: 100%;
    height: 80vh;
    min-height: 700px;
}

.ejs_container {
    width: 100% !important;
    height: 80vh !important;
    min-height: 700px !important;
}

.ejs_canvas {
    width: 100% !important;
    height: 100% !important;
/* Hide Scrollbars */

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}}
/* Immersive Mode */

body.immersive-mode {
    overflow: hidden;
    background: black;
}

body.immersive-mode #game {
    height: 100vh;
}

body.immersive-mode .ejs_canvas {
    border-radius: 0 !important;
}
@media (orientation: landscape) and (max-width: 1024px) {

    body.immersive-mode {
        overflow: hidden;
        background: black;
    }

    /*
    Main emulator area
    */

    body.immersive-mode #game {
        height: 100vh;
    }

    /*
    Critical Fix:
    Shrink ONLY gameplay viewport
    so touch controls fit below
    */

    body.immersive-mode .ejs_canvas_parent {
        height: 58vh !important;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    /*
    Keep game properly scaled
    */

    body.immersive-mode .ejs_canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }

}
/* Auto-hide touch controls in immersive mode */

body.immersive-mode .ejs_touch_controls {
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

body.immersive-mode .ejs_touch_controls:hover,
body.immersive-mode .ejs_touch_controls:active {
    opacity: 1;
}

/* Image Loading Enhancement */

img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}
/* Performance Optimizations */

.game-card {
    content-visibility: auto;
    contain-intrinsic-size: 320px 220px;
}
