html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    overscroll-behavior: none;
}

body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000;
    /* 禁用 iOS 长按放大镜和文本选择 */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    overscroll-behavior: none;
}

#app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

canvas {
    display: block;
    /* 确保 canvas 上禁用长按功能 */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* 游戏启动错误提示样式 */
.game-error {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    text-align: center;
    z-index: 1000;
    max-width: 80%;
    box-sizing: border-box;
}

.game-error h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.game-error p {
    margin: 10px 0;
    font-size: 14px;
    word-break: break-word;
}

.game-error button {
    background: white;
    color: #ff6b6b;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.game-error button:hover {
    background: #f0f0f0;
}