html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-attachment: fixed; /* 关键：固定背景 */
    background-size: cover; /* 覆盖整个页面 */
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    /* 确保背景延伸到内容区域 */
    background-position: center;
}
#game-container {
    position: relative;
    width: 90vw;
    max-width: 800px;
    margin: 0 auto;
}
canvas {
    width: 100%;
    height: 100%;
    border: 2px solid #096611;
    background-color: #111;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: block;
    z-index: 1; /* 确保 canvas 在底层 */
}
#instructions {
    text-align: center;
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 10px;
    font-size: 20px;
    max-width: 300px;
    display: none; /* 若想测试悬停，临时改为 block */
    z-index: 10; /* 高于 canvas，能接收鼠标事件 */
    pointer-events: auto;
}
#instructions button {
    /* margin-left: auto;
    margin-right: auto;
    padding: 5px 10px;
    font-size: 30px;
    border: none;
    border-radius: 5px;
    background-color: red;
    color: white;
    cursor: pointer; */
    background: linear-gradient(to right, #ff6b6b, #ff9e3d);
    color: white;
    border: none;
    padding: 12px 25px;
    margin-top: 15px;
    border-radius: 50px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.game-btn, #singlePlayerBtn, #multiPlayerBtn {
  cursor: pointer;
  transition: transform 0.12s ease;
  pointer-events: auto;
  box-shadow: 
  0 4px 8px rgba(255, 107, 107, 0.4);
    /* 0 0 5px rgba(175, 91, 6, 0.8),
    0 0 30px rgba(167, 86, 5, 0.8);   */

}
.game-btn:hover, #singlePlayerBtn:hover, #multiPlayerBtn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 12px rgba(255, 107, 107, 0.6);

}
#Command{
    width:200px;
}
#Submitdiv{
    display: none;
    margin-left: 0%;
    padding: auto;
}
#suggestions {
    color: #000000;
    position: absolute;
    background: #ffffff;
    border: 1px solid #4cc9f0;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
}
.suggestion-item:hover {
    background: #264b57;
    color: #75b0e4;
}
#output{
    display: none;
    color: rgb(0, 255, 60);
}
@media (max-width: 600px) {
    #game-container {
        width: 95vw;
        aspect-ratio: 3/4;
    }
    
    #score, #lives {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .instructions {
        font-size: 12px;
        max-width: 200px;
    }
}
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    text-align: center;
}