* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-color: #1a2525;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Press Start 2P', cursive;
    color: #87ceeb;
}

.game-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 600px;
    width: 100%;
}

#header {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

#game-title {
    font-size: 18px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
}

#settings-btn {
    font-size: 24px;
    padding: 5px 10px;
    background: #333333;
    color: #87ceeb;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#gameCanvas {
    border: 1px solid #87ceeb;
    max-width: 90vw;
    max-height: 70vh;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 20;
}

.menu.hidden {
    display: none;
}

.menu h2 {
    color: #87ceeb;
    font-size: 1em;
    margin-bottom: 20px;
}

.menu-item, .setting-item {
    color: #87ceeb;
    font-size: 0.8em;
    margin: 10px 0;
    cursor: pointer;
}

.menu-item:hover, .setting-item:hover {
    color: #17a2b8;
}

.setting-item span {
    color: #17a2b8;
}

.ad {
    width: 100%;
    max-width: 600px;
    height: 40px;
    background-color: #333333;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    overflow: hidden;
    z-index: 10;
}

.bottom-ad {
    order: 3;
    animation: scrollAd 10s infinite linear reverse;
}

@keyframes scrollAd {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.touch-controls {
    position: absolute;
    bottom: 50px;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-around;
    z-index: 15;
}

.touch-btn {
    padding: 10px 20px;
    background: #444444;
    color: #87ceeb;
    border: none;
    border-radius: 5px;
    font-size: 0.8em;
    cursor: pointer;
    touch-action: manipulation; /* Prevents zoom on touch */
}

.touch-btn:active {
    background: #17a2b8;
}

/* ORYX-GAMES Styling */
.oryx {
    color: #FFFFFF;
}

.dash {
    background: linear-gradient(to right, white 50%, #17a2b8 50%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.games {
    color: #17a2b8;
    font-weight: bold;
}

@media (max-width: 600px) {
    #gameCanvas {
        max-width: 100vw;
        max-height: 60vh;
    }
    .ad {
        height: 30px;
        font-size: 12px;
        line-height: 30px;
    }
    .menu {
        width: 80%;
    }
    #game-title {
        font-size: 14px;
    }
    #settings-btn {
        font-size: 18px;
        padding: 3px 8px;
    }
    .touch-controls {
        display: flex; /* Show on mobile */
    }
}