* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #111; font-family: Ubuntu, "Segoe UI", sans-serif; color: #fff; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud { pointer-events: none; }
#stats { position: fixed; left: 12px; bottom: 12px; padding: 8px 12px; background: rgba(0,0,0,.45); border-radius: 6px; font-size: 15px; line-height: 1.5; }
#leaderboard { position: fixed; right: 12px; top: 12px; width: 210px; padding: 8px 12px 10px; background: rgba(0,0,0,.45); border-radius: 6px; }
#leaderboard h3 { margin: 0 0 6px; text-align: center; font-size: 18px; }
#lb { margin: 0; padding-left: 22px; font-size: 14px; line-height: 1.45; }
#lb li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lb li.me { color: #ffcf40; font-weight: bold; }
#lb li span { float: right; opacity: .7; margin-left: 6px; }
#minimap { position: fixed; right: 12px; bottom: 12px; background: rgba(0,0,0,.45); border-radius: 6px; }

#menu { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); }
#menu.hidden { display: none; }
.panel { width: 340px; max-width: calc(100% - 32px); padding: 24px; background: #1c1c22; border: 1px solid #333; border-radius: 10px; text-align: center; }
.panel h1 { margin: 0 0 16px; font-size: 40px; letter-spacing: 1px; }
.panel h1 span { color: #ff3b3b; }
#nick { width: 100%; padding: 10px 12px; font-size: 16px; border-radius: 6px; border: 1px solid #444; background: #0f0f13; color: #fff; outline: none; }
#nick:focus { border-color: #ff3b3b; }
#play { width: 100%; margin-top: 10px; padding: 11px; font-size: 18px; font-weight: bold; border: 0; border-radius: 6px; background: #ff3b3b; color: #fff; cursor: pointer; }
#play:hover { background: #ff5555; }
.keys { list-style: none; padding: 0; margin: 18px 0 8px; text-align: left; font-size: 13px; color: #bbb; columns: 2; }
.keys li { margin: 3px 0; break-inside: avoid; }
kbd { display: inline-block; min-width: 22px; padding: 1px 5px; margin-right: 4px; border-radius: 4px; background: #333; color: #fff; font: 12px monospace; text-align: center; }
#modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mode { padding: 9px 6px; border: 2px solid #333; border-radius: 8px; background: #0f0f13; color: #bbb; cursor: pointer; font: inherit; font-size: 14px; font-weight: bold; }
.mode:hover { border-color: #555; }
.mode.sel { border-color: #ff3b3b; color: #fff; }
#top { margin-top: 14px; text-align: left; }
#top h4 { margin: 0 0 4px; font-size: 13px; color: #ffcf40; }
#toplist { margin: 0; padding-left: 22px; font-size: 12px; line-height: 1.5; color: #ccc; }
#toplist li span { float: right; color: #888; }
#classinfo { min-height: 50px; margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: #aaa; text-align: left; }
#classinfo b { color: #fff; }

#skillbar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 6px; }
.slot { position: relative; width: 64px; height: 56px; padding: 4px; border-radius: 6px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.15); overflow: hidden; text-align: center; }
.slot .k { position: absolute; left: 4px; top: 2px; font: bold 12px monospace; color: #ffcf40; }
.slot .n { position: absolute; left: 2px; right: 2px; bottom: 4px; font-size: 10px; line-height: 1.1; color: #ddd; }
.slot .ico { margin-top: 6px; font-size: 18px; }
.slot .cd { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.65); font: bold 16px Ubuntu, sans-serif; }
.slot.cooling .cd { display: flex; }
@media (max-width: 700px) { #skillbar { bottom: 70px; } }

#status { margin: 8px 0 0; font-size: 12px; color: #888; }
