* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace; /* Retro military feel */
}

body {
    overflow: hidden;
    background-color: #222;
    color: #eee;
}

#gameCanvas {
    display: block;
    background-color: #3b4d32; /* Fallback green */
    cursor: crosshair;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas when playing */
}

#menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    border: 2px solid #556b2f;
    border-radius: 8px;
    text-align: center;
    pointer-events: auto; /* Re-enable clicks for menu */
    min-width: 300px;
}

h1 {
    margin-bottom: 1.5rem;
    color: #8fbc8f;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.join-section {
    display: flex;
    gap: 0.5rem;
}

input {
    padding: 0.5rem;
    background: #333;
    border: 1px solid #555;
    color: white;
    flex-grow: 1;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn.primary {
    background-color: #556b2f;
    color: white;
}

.btn.primary:hover {
    background-color: #6b8e23;
}

.btn.secondary {
    background-color: #444;
    color: #ccc;
}

.btn.secondary:hover {
    background-color: #666;
}

.btn.start {
    background-color: #8b0000;
    color: white;
    width: 100%;
    margin-top: 1rem;
}

#host-info {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

code {
    display: block;
    background: #111;
    padding: 0.5rem;
    margin: 0.5rem 0;
    font-size: 1.2rem;
    color: #ffd700;
    user-select: all;
}

#hud {
    position: absolute;
    bottom: 20px;
    left: 20px;
    pointer-events: none;
}

.health-bar-container {
    width: 200px;
    height: 20px;
    background: #333;
    border: 2px solid #000;
    margin-bottom: 5px;
}

#health-bar {
    width: 100%;
    height: 100%;
    background-color: #cc3333;
    transition: width 0.2s;
}

.ammo-counter {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 0 #000;
}
