* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* 禁止选中文本 */
    -webkit-user-select: none;
    touch-action: none; /* 禁止浏览器默认触摸行为 */
}

body {
    background-color: #000;
    overflow: hidden; /* 隐藏滚动条 */
    font-family: 'Courier New', Courier, monospace;
    width: 100vw;
    height: 100vh;
}

canvas {
    display: block;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000 100%);
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 让点击穿透到 Canvas */
}

.score-box, .hp-box {
    position: absolute;
    top: 20px;
    font-size: 20px;
    color: #00f260;
    text-shadow: 0 0 5px #00f260;
    font-weight: bold;
}

.score-box { left: 20px; }
.hp-box { right: 20px; color: #ff4757; text-shadow: 0 0 5px #ff4757;}

.panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #00f260;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    pointer-events: auto; /* 恢复按钮点击 */
    box-shadow: 0 0 20px rgba(0, 242, 96, 0.2);
}

.hidden { display: none; }

h1 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 32px;
    text-shadow: 2px 2px 0px #0575E6;
}

p { color: #ccc; margin-bottom: 30px; line-height: 1.6; }

button {
    background: transparent;
    border: 2px solid #00f260;
    color: #00f260;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

button:hover {
    background: #00f260;
    color: #000;
    box-shadow: 0 0 20px #00f260;
}