body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border: 2px solid #000;
}

#score {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    color: #000; /* 将得分颜色改为黑色 */
    text-shadow: 1px 1px 1px #fff; /* 添加白色阴影以增加可读性 */
    z-index: 2; /* 确保得分显示在画布上方 */
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    z-index: 10; /* 确保覆盖层在最上面 */
    display: block; /* 强制显示 */
    color: #000; /* 将覆盖层文本颜色改为黑色 */
    text-align: center;
}

#start-screen h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #000; /* 确保标题也是黑色 */
}

#leaderboard {
    margin-left: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    color: #000; /* 确保排行榜文本是黑色 */
}

.hidden {
    display: none !important; /* 使用 !important 确保隐藏 */
}

button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white; /* 保持按钮文字为白色，以保证对比度 */
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

input {
    margin-top: 10px;
    padding: 5px;
    font-size: 16px;
    color: #000; /* 确保输入框文字是黑色 */
}

#start-screen {
    /* 确保这里没有 display: none; */
}