/* 页面整体样式，设置背景色和去除默认边距，隐藏滚动条 */
body {
    margin: 0;
    overflow: hidden;
    background-color: #222; /* 深色背景，突出游戏区域 */
}

/* 游戏主容器，居中显示，固定宽高，黑色背景 */
#game-container {
    position: relative; /* 便于内部绝对定位元素 */
    width: 800px;
    height: 400px;
    margin: 20px auto; /* 上下20px，左右居中 */
    background-color: #000; /* 游戏区黑色背景 */
    overflow: hidden; /* 防止内容溢出 */
    margin-top: 100px;
}

/* 游戏画布，黑色背景 */
#game-canvas {
    background-color: #000;
}

/* 分数显示，左上角白色字体 */
#score {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 20px;
}

/* 生命值显示，右上角白色字体 */
#lives {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 20px;
}

/* 射击按钮样式，右下角绿色按钮，圆角阴影，半透明 */
.game-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 40px;
    padding: 10px;
    font-size: 18px;
    background-color: #4CAF50; /* 绿色背景 */
    color: white;
    border: none;
    /* 设置边框不可见 */
    border-radius: 5px;
    /* 弧度5度 */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* 按钮阴影 */
    transition: all 0.3s;
    opacity: 0.7; /* 半透明效果 */
}


/* 按钮按下时的样式变化，模拟按压效果 */
.game-btn:active {
    transform: translateY(2px); /* 向下移动2px */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 阴影变浅 */
    background-color: #45a049; /* 颜色变深 */
}

/* 游戏开始界面整体遮罩面板，居中显示内容 */
.start-panel{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.85); /* 半透明黑色遮罩 */
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    z-index:1; /* 保证在最上层 */  
}

/* 游戏开始界面标题文字样式 */
.start-panel1{
    color:white;
    font-size:36px;
    font-weight:bold;
    text-align:center;
    line-height:1.2;
}

/* 游戏开始界面按钮样式，绿色大按钮 */
.start-panel2{
    margin-top:32px;
    width:160px;
    height:48px;
    font-size:22px;
    background:#4CAF50;
    color:white;
    border:none;
    border-radius:8px;
    cursor:pointer;
    border-radius: 5px;
}