/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础页面样式 */
body {
    background-color: #000;
    color: #FFF;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    touch-action: manipulation;
}

/* 游戏容器 */
#gameContainer {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 游戏画布 */
#gameCanvas {
    display: block;
    background-color: #000;
    width: 100%;
    height: 100%;
}

/* 分数显示 */
#scoreDisplay {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 5px #000, 0 0 10px #FFD700;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #FFD700;
}

/* 控制提示 */
#controls {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #FFF;
    font-size: 16px;
    text-shadow: 0 0 5px #000;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
}

/* 游戏结束样式 */
.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #scoreDisplay {
        font-size: 18px;
        top: 10px;
        left: 10px;
        padding: 3px 10px;
    }

    #controls {
        font-size: 14px;
        bottom: 10px;
        padding: 8px;
    }
}
/* 双排子弹模式提示 */
.double-shot-notice {
    position: absolute;
    top: 60px;
    left: 20px;
    color: #4FC3F7;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 5px #000, 0 0 10px #4FC3F7;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #4FC3F7;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}
/* 用户选择界面 */
.user-selection {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #444;
    z-index: 100;
    max-width: 80%;
    text-align: center;
}

.user-list {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.user-card {
    background: rgba(30, 30, 30, 0.7);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    width: 120px;
}

.user-card.selected {
    background: rgba(70, 70, 70, 0.7);
    box-shadow: 0 0 10px #4FC3F7;
}

.ship-preview {
    width: 40px;
    height: 50px;
    margin: 0 auto 10px;
    clip-path: polygon(50% 0%, 100% 100%, 50% 70%, 0% 100%);
}

/* 排行榜 */
#leaderboard {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 8px;
    max-width: 200px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    padding: 5px;
}

.leaderboard-item .rank {
    color: #FFD700;
    font-weight: bold;
    width: 20px;
}

.leaderboard-item .name {
    flex-grow: 1;
    text-align: left;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}