* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 核心：禁止手机端长按弹出菜单和点击高亮 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 解决手机端高度计算错误 */
    min-height: 100vh;
    min-height: -webkit-fill-available;
    
    /* 背景图修复 */
    background-image: url('../img/bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* 锁定背景不随视口变动 */
    
    background-color: #000;
    overflow: hidden;
    position: fixed; /* 防止下拉刷新 */
    width: 100%;
}

#game {
    width: 95vw;
    max-width: 600px;
    height: 200px;
    border: 2px solid #fff;
    position: relative;
    background-color: #87CEEB; /* 兜底背景色 */
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.role {
    width: 35px;
    position: absolute;
    bottom: 0;
    left: 10%;
    z-index: 5;
}

.za, .za1, .za2 {
    position: absolute;
    right: -100px; 
    bottom: 0;
}

.za { height: 50px; width: 50px; }
.za1 { height: 75px; width: 50px; }
.za2 { height: 50px; width: 50px; bottom: 50px; }

/* 动画效果 */
.animate {
    animation: jump 500ms linear;
}

@keyframes az {
    0% { right: -60px; }
    100% { right: 110%; } /* 确保完全滑出左侧 */
}

@keyframes jump {
    0% { bottom: 0; }
    30% { bottom: 80px; }
    70% { bottom: 80px; }
    100% { bottom: 0; }
}

/* UI 元素 */
#jumpCountDisplay {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #333;
    z-index: 10;
    text-shadow: 1px 1px 0 white;
}

#customAlert {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    width: 260px;
}

#customAlert button {
    margin-top: 15px;
    padding: 10px 25px;
    font-size: 1rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
}