* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0b0e14; color: #e6e6e6; font-family: ui-monospace, Menlo, Consolas, monospace; overflow: hidden; }
canvas { display: block; width: 100vw; height: 100vh; cursor: crosshair; }
.hidden { display: none !important; }

.menu {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1a2030 0%, #05070b 80%);
  padding: 24px;
}
.menu h1 { font-size: 56px; margin: 0 0 8px; letter-spacing: 4px; color: #ffd44d; text-shadow: 0 0 24px rgba(255,212,77,0.5); }
.menu .tag { color: #9aa3b2; margin: 0 0 24px; }
.menu label { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 12px; text-transform: uppercase; color: #9aa3b2; }
.menu input { background: #141925; border: 1px solid #2a3142; color: #fff; padding: 10px 12px; font-size: 16px; border-radius: 6px; min-width: 280px; font-family: inherit; }
.row { display: flex; gap: 12px; margin-top: 12px; }
button { background: #ffd44d; color: #111; border: 0; padding: 12px 20px; font-weight: bold; cursor: pointer; border-radius: 6px; font-family: inherit; font-size: 15px; }
button:hover { background: #ffe175; }
#newroom { background: #2a3142; color: #fff; }
#newcode { margin-top: 12px; font-size: 18px; color: #ffd44d; }
.how { margin-top: 28px; max-width: 480px; color: #9aa3b2; font-size: 13px; }
.how h3 { color: #e6e6e6; margin: 0 0 8px; font-size: 14px; }
.how ul { margin: 0; padding-left: 18px; line-height: 1.7; }
.how b { color: #fff; }

#hud { position: fixed; inset: 0; pointer-events: none; }
.panel {
  position: absolute;
  background: rgba(10, 14, 22, 0.78);
  border: 1px solid #2a3142;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
#lb { top: 12px; right: 12px; min-width: 220px; }
#lb .row { display: flex; justify-content: space-between; padding: 2px 0; }
#lb .row.me { color: #ffd44d; }
#lb h4 { margin: 0 0 6px; color: #ffd44d; font-size: 11px; letter-spacing: 1px; }
#me { top: 12px; left: 12px; min-width: 200px; }
#me .stat { display: flex; justify-content: space-between; padding: 2px 0; }
#me .buffs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.buff { background: #2a3142; color: #ffd44d; padding: 2px 6px; border-radius: 3px; font-size: 10px; text-transform: uppercase; }
#feed { bottom: 12px; left: 12px; max-width: 360px; max-height: 200px; overflow: hidden; }
#feed .ev { padding: 1px 0; opacity: 0.95; }
#feed .ev.bounty { color: #ff6b6b; font-weight: bold; }
#feed .ev.buff { color: #6bd5ff; }
#h2h { bottom: 12px; right: 12px; max-width: 240px; }
#h2h h4 { margin: 0 0 6px; color: #ffd44d; font-size: 11px; letter-spacing: 1px; }
#h2h .row { display: flex; justify-content: space-between; padding: 1px 0; font-size: 11px; }
#timer { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: 24px; color: #ffd44d; text-shadow: 0 0 12px rgba(255,212,77,0.5); }

.modal {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0,0,0,0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
  pointer-events: auto;
}
.modal h2 { color: #ffd44d; font-size: 36px; margin: 0 0 16px; letter-spacing: 3px; }
.modal ol { background: #141925; padding: 16px 32px; border-radius: 8px; min-width: 360px; }
.modal li { padding: 4px 0; font-size: 14px; }
.modal button { margin-top: 24px; }
