html, body { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
    font-family: 'Courier New', Courier, monospace;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    background: #000;
    image-rendering: pixelated;
    border: 4px double #ffaa00;
}

#start-overlay { display: none !important; }

#start-overlay button {
    background: #ffaa00;
    color: #000;
    border: none;
    padding: 1rem 2rem;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
}

#ui-layer {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    color: #ffaa00;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 2px 2px #000;
}

#stats-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#leaderboard {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ffaa00;
    padding: 10px;
    min-width: 150px;
    font-size: 0.9rem;
}

.leaderboard-title {
    border-bottom: 1px solid #ffaa00;
    margin-bottom: 5px;
    padding-bottom: 2px;
    text-align: center;
    font-size: 0.8rem;
}

#leaderboard-list div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

#game-container::after {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 5;
}

canvas, #gameCanvas {
    max-width: 100vw !important;
    max-height: 100dvh !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    touch-action: none !important;
    box-sizing: border-box !important;
}
