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

body {
    background: #0a1628;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    position: relative;
    width: 1200px;
    height: 700px;
    border-radius: 30px;
    box-shadow: 0 0 60px rgba(0, 180, 255, 0.3), inset 0 0 100px rgba(0, 100, 200, 0.1);
    background: linear-gradient(180deg, #0a2a4a 0%, #052040 100%);
    overflow: hidden;
    border: 2px solid rgba(0, 180, 255, 0.3);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* HUD 顶部栏 */
#hud {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(10, 22, 40, 0.75);
    backdrop-filter: blur(8px);
    padding: 10px 20px;
    border-radius: 40px;
    border: 1px solid rgba(0, 180, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 10;
    align-items: center;
}

.hud-item {
    color: #e0f0ff;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(0,150,255,0.5);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 50, 100, 0.3);
    padding: 5px 14px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}

.hud-icon {
    font-size: 18px;
}

#scoreDisplay {
    color: #ffd700;
    font-size: 18px;
}

#levelDisplay {
    color: #00e5ff;
}

#ammoSelect {
    background: #0d1b3e;
    color: #fff;
    border: 1px solid #00b4db;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.hud-btn {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    border: none;
    color: #fff;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 15px rgba(0,180,255,0.3);
    margin-left: auto;
}

.hud-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0,180,255,0.6);
}

/* 道具快捷栏 */
#item-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.item-btn {
    background: linear-gradient(135deg, #2a3a5a, #1a2a4a);
    border: 2px solid rgba(0, 180, 255, 0.6);
    color: #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 0 30px rgba(0,150,255,0.2);
    backdrop-filter: blur(6px);
}

.item-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: #00e5ff;
    box-shadow: 0 0 40px rgba(0,200,255,0.5);
}

/* 弹窗 */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(145deg, #0d1b3e, #1a2a4a);
    padding: 30px 40px;
    border-radius: 30px;
    min-width: 350px;
    max-height: 80%;
    overflow-y: auto;
    border: 1px solid rgba(0, 180, 255, 0.5);
    box-shadow: 0 0 80px rgba(0, 100, 255, 0.4);
    color: #fff;
}

.modal-content h2, .modal-content h3 {
    border-bottom: 2px solid #00b4db;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.close-btn {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: #ff6b6b;
    transition: 0.2s;
}

.close-btn:hover {
    transform: rotate(90deg);
}

#rankList, #achievementList {
    list-style: none;
    padding: 0;
}

#rankList li, #achievementList li {
    padding: 8px 12px;
    margin: 6px 0;
    background: rgba(0, 50, 100, 0.3);
    border-radius: 12px;
    font-size: 16px;
}

#rankList li::before {
    content: "🏅 ";
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #00b4db;
    border-radius: 10px;
}

/* 响应式微调 */
@media (max-width: 1250px) {
    #game-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
}