* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0814; color: #f2eefa; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
canvas { display: block; cursor: none; }
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 5, 18, 0.72); backdrop-filter: blur(3px); padding: 16px; overflow: auto; }
.hidden { display: none !important; }
.panel { background: #171126; border: 1px solid #33284d; border-radius: 16px; padding: 28px; width: min(640px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.panel.small { width: min(420px, 100%); }
h1 { margin: 0; font-size: 42px; letter-spacing: -1px; }
h1 span { color: #ffb347; }
h2 { margin-top: 0; }
.sub { color: #a99fc4; margin: 4px 0 20px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #b9b0d4; }
input, select { background: #0f0b1a; color: #fff; border: 1px solid #3b3055; border-radius: 8px; padding: 9px 10px; font-size: 14px; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b9b0d4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
input:focus, select:focus { outline: 2px solid #ffb347; outline-offset: -1px; }
.buttons { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
button { flex: 1; background: #2a2140; color: #fff; border: 1px solid #45386a; border-radius: 10px; padding: 12px 14px; font-size: 15px; font-weight: 600; cursor: pointer; }
button:hover { background: #352a52; }
button.primary { background: #ff8c42; border-color: #ff8c42; color: #1a0f05; }
button.primary:hover { background: #ffa463; }
.join { display: flex; gap: 10px; margin-top: 10px; }
.join input { flex: 2; }
details { margin-top: 14px; color: #b9b0d4; font-size: 13px; }
summary { cursor: pointer; margin-bottom: 8px; }
.hint { color: #8a80a6; font-size: 12px; }
.msg { color: #ffd166; min-height: 1em; }
.help { margin-top: 14px; font-size: 12px; color: #8a80a6; line-height: 1.6; }
.wide { grid-column: 1 / -1; }
.speed-live { margin-top: 12px; }
.speed-live .hint { margin-top: 2px; }
#weaponPreview { width: 100%; height: 54px; background: linear-gradient(#a9b0ba, #737a85); border: 1px solid #3b3055; border-radius: 8px; cursor: default; }
.legal { margin: 16px 0 0; text-align: center; font-size: 12px; }
.legal a { color: #a99fc4; text-decoration: none; }
.legal a:hover { color: #ffb347; text-decoration: underline; }
.invite input { width: 100%; margin-bottom: 8px; }
#chat { position: fixed; left: 20px; bottom: 100px; width: min(420px, 80vw); }
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: #2a2140; border: 1px solid #45386a; padding: 8px 14px; border-radius: 8px; font-size: 14px; }
