* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #000000; /* 纯黑色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    background: #f0f0f0;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#ui {
    /* UI现在在Canvas上绘制，隐藏HTML元素 */
    display: none;
}

#ui div {
    margin-bottom: 10px;
}

#status {
    color: #ffd700;
    font-size: 16px;
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 40, 40, 0.85); /* 偏暖的深灰色，降低压迫感 */
    color: #E8E8E8; /* 浅灰色文字 */
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#gameOver.hidden {
    display: none;
}

#gameOver h2 {
    margin-bottom: 20px;
    font-size: 32px;
    color: #FFFFFF; /* 白色标题 */
    font-weight: normal; /* 不使用粗体，保持克制 */
}

#gameOver p {
    margin-bottom: 30px;
    font-size: 24px;
    color: #E8E8E8; /* 浅灰色文字 */
    line-height: 1.6;
}

/* 数量数字使用浅橙色/浅棕色 */
#gameOver p .score-number {
    color: #D4A574; /* 浅橙色/浅棕色，与开始界面配色一致 */
    font-weight: 500;
}

#restartBtn {
    background: #FFFFFF; /* 白色背景 */
    color: #D4A574; /* 浅橙色文字 */
    border: 2px solid #D4A574; /* 浅橙色描边 */
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px; /* 胶囊形状（完全圆角） */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

#restartBtn:hover {
    background: #F5F5F5; /* 悬停时稍微变暗 */
    border-color: #C8955F; /* 描边稍微加深 */
    color: #C8955F;
}

#restartBtn:active {
    transform: scale(0.98);
    background: #EEEEEE;
}

