

/* 移动端优化 */
    @media (max-width: 768px) {
        #fullscreen-btn {
            padding: 12px;
        }

        #fullscreen-btn svg {
            width: 24px;
            height: 24px;
        }
    }

    /* 全屏时的容器样式 */
    .game-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 999999 !important;
        background-color: #000 !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
    }

    /* 按钮基础样式 */
    #fullscreen-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        user-select: none;
        cursor: pointer;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }

    /* 适配 iOS Safari */
    @supports (-webkit-touch-callout: none) {
        .game-fullscreen {
            height: -webkit-fill-available !important;
        }

        #fullscreen-btn {
            bottom: max(env(safe-area-inset-bottom, 1rem), 1rem);
            right: max(env(safe-area-inset-right, 1rem), 1rem);
        }
    }

    /* 防止iOS橡皮筋效果 */
    body.fullscreen-active {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* 优化性能 */
    #game-container, #game-wrapper {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }