/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #222;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 游戏容器 */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100vw;
    width: 100%;
    padding: 20px;
}

/* 游戏头部 */
.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    margin-bottom: 15px;
}

/* 记分板 */
.scoreboard {
    display: flex;
    gap: 30px;
    font-size: 1.5rem;
}

.player-score {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #4CAF50;
}

.player-score span {
    color: #4CAF50;
    font-weight: bold;
}

/* 游戏画布 */
#gameCanvas {
    border: 3px solid #4CAF50;
    border-radius: 5px;
    background-color: #333;
    max-width: 100%;
    height: auto;
}

/* 控制区域 */
.controls-container {
    margin-top: 20px;
    width: 100%;
}

/* 移动设备控制 */
.mobile-controls {
    display: none;
    width: 100%;
    justify-content: space-between;
    margin-top: 20px;
}

/* 虚拟摇杆 */
.joystick {
    position: relative;
    width: 100px;
    height: 100px;
}

.joystick-base {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid #4CAF50;
}

.joystick-stick {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-radius: 50%;
    background-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* 射击按钮 */
.shoot-button {
    position: relative;
    width: 80px;
    height: 80px;
    background-color: #f44336;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
}

/* 游戏说明 */
.game-instructions {
    margin-top: 20px;
    text-align: center;
    font-size: 1rem;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-header h1 {
        font-size: 2rem;
    }
    
    .scoreboard {
        gap: 15px;
        font-size: 1.2rem;
    }
    
    .mobile-controls {
        display: flex;
    }
    
    .game-instructions {
        font-size: 0.8rem;
    }
}