@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    touch-action: none; /* 禁止默认触摸行为 */
}

#game-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    border: 1px solid #333;
    /* 固定 9:16 竖屏比例 */
    aspect-ratio: 9 / 16;
    /* 高度优先，最大不超过视口高度的 95% */
    height: min(95vh, 900px);
    width: auto;
    max-width: 95vw;
}

/* 移动端全屏 */
@media (max-width: 600px) {
    #game-container {
        width: 100vw;
        height: 100vh;
        border: none;
        aspect-ratio: unset;
        max-width: none;
    }
    
    body {
        align-items: flex-start;
    }
}

/* 横屏模式下的特殊处理 */
@media (max-aspect-ratio: 9/16) {
    /* 当屏幕比 9:16 还窄时，宽度优先 */
    #game-container {
        width: 95vw;
        height: auto;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #000000;
    cursor: default;
}
