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

body {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    user-select: none;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    background-color: #111;
    cursor: crosshair;
    display: block;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

#healthBar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    border-radius: 10px;
    overflow: hidden;
}

#shieldBar {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    border-radius: 8px;
    overflow: hidden;
}

#healthBarFill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f00 0%, #ff0 50%, #0f0 100%);
    transition: width 0.3s ease;
}

#shieldBarFill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #004499 0%, #0088ff 50%, #00ccff 100%);
    transition: width 0.3s ease;
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

#shieldText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

#weaponList {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    font-size: 14px;
    color: #fff;
    min-width: 180px;
    font-family: 'Courier New', monospace;
}

.weapon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    color: #aaa;
    transition: all 0.2s ease;
}

.weapon-item.active {
    color: #ff8800;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    font-size: 16px;
}

.weapon-item.empty {
    color: #666;
    font-style: italic;
}

.weapon-name {
    flex: 1;
    text-align: left;
}

.weapon-ammo {
    text-align: right;
    min-width: 40px;
}

.weapon-separator {
    height: 1px;
    background: #444;
    margin: 6px 0;
    border: none;
}

#ammo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 16px;
}

#ammoValue {
    color: #ff8800;
}

#reloadMessage {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #ff8800;
    text-shadow: 1px 1px 2px #000;
    display: none;
}

#restartMessage {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 30px;
    border: 3px solid #ff0000;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #ff0000;
    text-align: center;
    text-shadow: 2px 2px 4px #000;
    display: none;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border: 2px solid #f00;
    border-radius: 8px;
}

.game-over h1 {
    color: #f00;
    font-size: 36px;
    margin-bottom: 20px;
}

.game-over button {
    background: #333;
    color: #fff;
    border: 2px solid #666;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 20px;
}

.game-over button:hover {
    background: #666;
}