body {
    margin: 0;
    overflow: hidden;
    background-color: #020208;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
canvas {
    display: block;
}
#instructions {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    pointer-events: none;
    display: none;
}
h1 { margin: 0 0 10px 0; font-size: 1.2rem; color: #333; }
p { margin: 5px 0; font-size: 0.9rem; color: #555; }
.key {
    display: inline-block;
    background: #333;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}
#ui { position: absolute; bottom: 20px; left: 20px; color: white; text-shadow: 1px 1px 2px black; font-family: sans-serif; pointer-events: none; z-index: 10; }
#kill-streak { color: #ffd700; font-size: 1.5rem; font-weight: bold; margin-bottom: 8px; text-shadow: 1px 1px 3px black; }
#buff-info { font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; text-shadow: 1px 1px 3px black; line-height: 1.4; }
#hp-bar-container { width: 200px; height: 20px; background: rgba(255,0,0,0.5); border: 2px solid #fff; margin-bottom: 5px; border-radius: 4px; overflow: hidden; }
#hp-bar { width: 100%; height: 100%; background: #00ff00; transition: width 0.2s; }
#weapon-info { font-size: 1.2rem; font-weight: bold; }
#boss-warning { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); color: #ff3333; font-size: 2rem; font-weight: bold; display: none; text-transform: uppercase; text-shadow: 0 0 10px black; pointer-events: none; z-index: 10; }
#boss-pointer { position: absolute; font-weight: bold; font-size: 1.2rem; color: #ff3333; text-shadow: 0 0 4px black, 0 0 8px red; pointer-events: none; z-index: 10; display: none; transform: translate(-50%, -50%); }
#notification { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); color: #00ffff; font-size: 1.2rem; font-weight: bold; text-shadow: 1px 1px 4px black; pointer-events: none; opacity: 0; transition: opacity 0.3s; z-index: 10; text-align: center; }
#crosshair { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; background: white; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; mix-blend-mode: difference; z-index: 10; }

/* Kill Feed & Scoreboard UI */
#kill-feed { position: absolute; top: 20px; right: 20px; width: 300px; display: flex; flex-direction: column; align-items: flex-end; z-index: 50; pointer-events: none; }
.kill-entry { background: rgba(0,0,0,0.8); border: 1px solid #444; border-radius: 4px; padding: 6px 12px; margin-bottom: 5px; font-size: 0.95rem; color: #eee; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; transition: opacity 1s; box-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.kill-entry.boss-kill { border: 1px solid #ff3333; box-shadow: 0 0 10px #ff3333; background: rgba(50,10,0,0.9); }

#scoreboard-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; z-index: 100; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
#scoreboard { background: rgba(15,15,20,0.95); border: 2px solid #555; border-radius: 10px; padding: 20px 30px; width: 80%; max-width: 700px; color: white; box-shadow: 0 0 30px rgba(0,0,0,1); font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
#scoreboard h2 { text-align: center; margin-top: 0; color: #ffd700; text-transform: uppercase; font-size: 1.8rem; letter-spacing: 2px; }
.sb-table { width: 100%; border-collapse: collapse; }
.sb-table th, .sb-table td { padding: 12px; text-align: left; border-bottom: 1px solid #333; }
.sb-table th { background: rgba(255,255,255,0.05); color: #aaa; text-transform: uppercase; font-size: 0.85rem; }
.sb-table tr:hover { background: rgba(255,255,255,0.05); }
.sb-row-player { font-weight: bold; background: rgba(0, 255, 0, 0.1) !important; }

/* Floating HP Bars */
#hp-bars-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; overflow: hidden; }
.entity-hp-bar { position: absolute; width: 40px; height: 6px; background: rgba(255,0,0,0.7); border: 1px solid #000; border-radius: 3px; transform: translate(-50%, -50%); display: none; }
.entity-hp-fill { height: 100%; background: #00ff00; width: 100%; border-radius: 2px; transition: width 0.1s linear; }

#critical-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(150, 0, 0, 0.4) 80%, rgba(200, 0, 0, 0.7) 100%);
    pointer-events: none; z-index: 20; opacity: 0; transition: opacity 0.5s;
    box-shadow: inset 0 0 100px rgba(255,0,0,0.5);
}
/* Death Screen */
#death-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 0, 0, 0.85); color: #fff;
    display: none; align-items: center; justify-content: center; flex-direction: column;
    z-index: 1000; font-family: 'Orbitron', sans-serif;
    border: 5px solid #bd0000; box-sizing: border-box;
}
#death-screen h2 { margin-bottom: 20px; color: #ffaa00; }
.death-instructions { background: rgba(0,0,0,0.5); padding: 20px; border-radius: 10px; border: 1px solid #555; text-align: left; }
.death-instructions p { margin: 10px 0; font-size: 16px; }
