html, body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #06080f;
    height: 100%;
    overflow: hidden;
    /* Mobile: stop pull-to-refresh, double-tap zoom, long-press selection. */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container canvas {
    touch-action: none;
}

/* Landscape-only game: ask portrait phones to rotate. */
#rotate-overlay {
    display: none;
}

@media (orientation: portrait) and (pointer: coarse) {
    #rotate-overlay {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 100;
        background: #06080f;
        color: #c8d4e8;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        font-family: monospace;
        font-size: 20px;
        text-align: center;
    }
}

#rotate-overlay .phone-icon {
    font-size: 56px;
    animation: rotate-hint 1.6s ease-in-out infinite;
}

@keyframes rotate-hint {
    0%, 25% { transform: rotate(0deg); }
    60%, 100% { transform: rotate(90deg); }
}
