* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none; /* 禁止浏览器默认的触摸行为（如滚动/缩放） */
}

body {
    background-color: #222;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow: hidden; /* 防止溢出 */
    width: 100vw;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#gameCanvas, #animCanvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

#gameCanvas {
    background-color: #000;
    z-index: 1;
}

#animCanvas {
    pointer-events: none; /* 让点击穿透到游戏层 */
    z-index: 2; /* 降低层级，确保不遮挡游戏 */
    background-color: transparent;
}

#start-screen, #game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6); /* 降低浓度，让背景透出来 */
    backdrop-filter: blur(5px); /* 添加模糊效果，更显高级 */
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
}

#start-screen.hidden, #game-over.hidden {
    display: none;
}

.title {
    font-size: 48px;
    margin-bottom: 30px;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.loading-status {
    font-size: 18px;
    margin-bottom: 20px;
    color: #aaa;
}

.message {
    font-size: 32px;
    margin-bottom: 10px;
    color: #ff4444;
}

.final-score {
    font-size: 20px;
    margin-bottom: 25px;
    color: #fff;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

#start-btn, #restart-btn, #share-btn {
    padding: 12px 25px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#share-btn {
    background-color: #2196F3;
}

#share-btn:hover {
    background-color: #1976D2;
    transform: scale(1.05);
}

#start-btn.hidden {
    display: none;
}

#start-btn:hover, #restart-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

