* { box-sizing: border-box; margin: 0; }
body { background: #0a0e1a; color: #fff; font-family: system-ui, sans-serif; overflow: hidden; user-select: none; }
canvas#game { position: fixed; inset: 0; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 50% 30%, #1b2b55cc, #05070fee); }
h1 { font-size: 72px; letter-spacing: 8px; color: #ffd23f; text-shadow: 0 0 24px #ff7a00; }
h2 { font-size: 36px; }
.sub { color: #9fb3d9; }
.row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
button { background: #1d2a4d; color: #fff; border: 2px solid #3a5099; border-radius: 10px; padding: 10px 20px; font-size: 16px; cursor: pointer; }
button:hover, button.on { background: #ff7a00; border-color: #ffd23f; }
button.big { font-size: 22px; padding: 14px 40px; background: #e8590c; }
.card { width: 120px; padding: 10px; text-align: center; }
.card b { display: block; margin-top: 6px; }
.card .dot { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto; box-shadow: 0 0 14px currentColor; background: currentColor; }
.card small { color: #cfd9f5; font-size: 11px; }
label { display: flex; gap: 12px; align-items: center; width: 340px; justify-content: space-between; }
#roster { list-style: none; display: grid; grid-template-columns: repeat(5, 90px); gap: 4px; font-size: 12px; max-height: 40vh; overflow: hidden; color: #cfd9f5; }
#roster li.me { color: #ffd23f; font-weight: bold; }
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud button { pointer-events: auto; }
#top { white-space: nowrap; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 20px; background: #000a; padding: 8px 18px; border-radius: 20px; }
#pauseBtn { position: absolute; top: 12px; left: 12px; padding: 6px 14px; }
#mini { position: absolute; top: 12px; right: 12px; border-radius: 50%; border: 2px solid #3a5099; background: #0a1a2fcc; }
#feed { position: absolute; top: 190px; right: 12px; text-align: right; font-size: 13px; text-shadow: 0 0 4px #000; }
#cross { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -5px; border: 2px solid #fff; border-radius: 50%; opacity: .8; }
#toast { position: absolute; bottom: 150px; width: 100%; text-align: center; font-size: 20px; color: #ffd23f; text-shadow: 0 0 6px #000; }
#bottom { position: absolute; bottom: 30px; left: 20px; display: flex; gap: 20px; align-items: flex-end; }
.bar { width: 260px; height: 16px; background: #000a; border-radius: 8px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; }
.hp i { background: #3ddc84; } .sh i { background: #3aa7ff; }
#slots { display: flex; gap: 6px; }
.slot { width: 92px; padding: 6px; background: #000a; border: 2px solid #3a5099; border-radius: 8px; font-size: 12px; text-align: center; }
.slot.sel { border-color: #ffd23f; }
#stats { background: #000a; padding: 8px 12px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
#help { position: absolute; bottom: 6px; left: 20px; font-size: 11px; color: #9fb3d9; }
#profileBar { display: flex; gap: 14px; align-items: center; background: #000a; padding: 8px 18px; border-radius: 20px; font-size: 14px; }
#profileBar .xp { width: 160px; height: 10px; background: #1d2a4d; border-radius: 5px; overflow: hidden; } #profileBar .xp i { display: block; height: 100%; background: #4dd2ff; }
#navs i, i.badge { font-style: normal; background: #ff3355; border-radius: 10px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
#navs i:empty { display: none; }
#panel { z-index: 12; justify-content: flex-start; padding-top: 24px; overflow: auto; }
#panelBox { width: min(900px, 94vw); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.grid { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.item { width: 130px; padding: 10px 6px; text-align: center; border-width: 3px; font-size: 13px; }
.item small { display: block; color: #cfd9f5; margin-top: 3px; }
.item.locked { opacity: .6; }
.item.on { box-shadow: 0 0 14px #ffd23f; }
.coins { color: #ffd23f; font-weight: bold; }
#prev { border-radius: 14px; background: #0a1228; border: 2px solid #3a5099; }
.mis { width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #0008; padding: 10px 14px; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; } td, th { padding: 5px 10px; text-align: left; border-bottom: 1px solid #2a3a66; }
input[type=text] { background: #0a1228; color: #fff; border: 2px solid #3a5099; border-radius: 8px; padding: 8px; font-size: 16px; width: 120px; text-transform: uppercase; }
.reveal { font-size: 28px; padding: 24px; border: 3px solid; border-radius: 16px; background: #000a; min-width: 300px; text-align: center; }
#dimTxt { position: absolute; top: 56px; width: 100%; text-align: center; color: #e0a8ff; text-shadow: 0 0 10px #b06cff; font-size: 18px; }
#touch { position: absolute; inset: 0; }
#joy { position: absolute; left: 30px; bottom: 90px; width: 130px; height: 130px; border-radius: 50%; background: #ffffff22; border: 2px solid #ffffff55; pointer-events: auto; touch-action: none; }
#knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: #ffffff88; }
#tbtns { position: absolute; right: 20px; bottom: 210px; display: grid; grid-template-columns: repeat(2, 78px); gap: 6px; }
#tbtns button { padding: 8px 4px; font-size: 13px; background: #1d2a4dcc; }
#fireBtn { position: absolute; right: 24px; bottom: 80px; width: 110px; height: 110px; border-radius: 50%; background: #e8590cdd; font-size: 20px; touch-action: none; }
@media (pointer: coarse) { #help, #stats { display: none; } #bottom { bottom: 6px; left: 8px; } .bar { width: 160px; } #mini { width: 110px; height: 110px; } h1 { font-size: 44px; } }
#flash { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 120px 30px #ff1f3d; }
.bar { position: relative; height: 20px; } .bar span { position: absolute; inset: 0; text-align: center; font-size: 13px; line-height: 20px; font-weight: bold; text-shadow: 0 0 3px #000; }
.hp i { transition: width .2s; }
#top { background: linear-gradient(90deg, #0b1230cc, #1b2b55cc); border: 1px solid #3a5099; box-shadow: 0 0 14px #33aaff55; font-weight: bold; }
#menu h1 { animation: glow 2.5s ease-in-out infinite alternate; }
@keyframes glow { to { text-shadow: 0 0 40px #ff7a00, 0 0 8px #ffd23f; } }
button { transition: transform .1s, box-shadow .15s; } button:hover { transform: translateY(-2px); box-shadow: 0 0 14px #ffd23f88; }
.dmg { position: absolute; transform: translate(-50%, -50%); font-weight: bold; font-size: 18px; text-shadow: 0 0 4px #000, 0 0 8px #000; pointer-events: none; }
#hit { position: absolute; top: 50%; left: 50%; width: 26px; height: 26px; margin: -13px; opacity: 0; transition: opacity .15s; }
#hit::before, #hit::after { content: ""; position: absolute; left: 12px; top: -4px; width: 3px; height: 34px; background: #fff; transform: rotate(45deg); box-shadow: 0 0 6px #fff; }
#hit::after { transform: rotate(-45deg); }
#hit.crit::before, #hit.crit::after { background: #ff3355; box-shadow: 0 0 8px #ff3355; }
#buffs { position: absolute; top: 90px; left: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: bold; }
#buffs span { background: #000a; padding: 3px 10px; border-radius: 10px; border: 1px solid currentColor; }
#alive { font-size: 18px; color: #7fffd4; }
#end ul { list-style: none; padding: 0; margin: 8px 0; line-height: 1.7; }
#end li b { color: #ffd23f; }
#mates { position: absolute; top: 60px; left: 12px; width: 150px; font-size: 12px; text-shadow: 0 0 4px #000; display: flex; flex-direction: column; gap: 4px; }
#mates div { position: relative; background: #000a; border-radius: 6px; padding: 3px 6px 6px; overflow: hidden; }
#mates div.dead { opacity: .4; text-decoration: line-through; }
#mates i { position: absolute; left: 0; bottom: 0; height: 4px; background: #33ffee; box-shadow: 0 0 6px #33ffee; }
#tList { list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 30vh; overflow: auto; width: min(420px, 90vw); }
#tList li { background: #0a1228; border: 1px solid #3a5099; border-radius: 8px; padding: 6px 10px; }
@media (max-width: 700px) {
  .row { flex-wrap: wrap; justify-content: center; }
  button.big { font-size: 16px; padding: 10px 14px; }
  #panelBox { width: 96vw; }
  #mates { top: 52px; width: 110px; font-size: 11px; }
  #roster { grid-template-columns: repeat(3, 90px); }
  #profileBar { flex-wrap: wrap; font-size: 12px; }
}
