* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --accent: #ff7043; --accent2: #4fc3f7; --ok: #69db7c; --bad: #ff4d6d;
  --panel: rgba(20, 22, 38, 0.94);
}
html, body { width: 100%; height: 100%; overflow: hidden; background: #05060d;
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; color: #fff; user-select: none; }
#app { position: fixed; inset: 0; }
#app canvas { display: block; }
.hidden { display: none !important; }

/* ------- Екрани ------- */
.screen { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(circle at 50% 30%, #1a1330, #05060d); }
.panel { background: var(--panel); border: 3px solid rgba(255,255,255,0.1); border-radius: 22px; padding: 26px;
  width: 100%; max-width: 400px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.panel.wide { max-width: 480px; }
h1 { font-size: 32px; letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,0.4); }
h1 .d3 { color: var(--accent); }
h2 { font-size: 26px; margin-bottom: 14px; }
.tag { font-size: 13px; opacity: 0.8; margin: 10px 0 18px; line-height: 1.5; }
.hint { font-size: 12px; opacity: 0.6; margin-top: 12px; line-height: 1.4; }
input { width: 100%; padding: 13px 16px; margin: 7px 0; font-size: 17px; font-family: inherit; text-align: center;
  border: 2px solid rgba(255,255,255,0.15); border-radius: 13px; background: rgba(0,0,0,0.35); color: #fff; outline: none; }
input:focus { border-color: var(--accent); }
button { cursor: pointer; font-family: inherit; font-weight: bold; border: none; border-radius: 13px; color: #0b0b16;
  background: var(--accent); padding: 12px 18px; font-size: 15px; box-shadow: 0 4px 0 rgba(0,0,0,0.3); transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
button.big { width: 100%; padding: 15px; font-size: 18px; margin-top: 8px; }
button.mini { font-size: 12px; padding: 6px 11px; background: rgba(255,255,255,0.15); color: #fff; box-shadow: none; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.row { display: flex; gap: 8px; } .row input { margin: 0; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 6px; }

.codebox { background: rgba(0,0,0,0.35); border-radius: 13px; padding: 11px; margin-bottom: 14px; font-size: 15px; }
#lobbyCode { font-size: 26px; font-weight: bold; letter-spacing: 6px; color: var(--accent); }
#playerList { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.pl-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border-radius: 11px; padding: 8px 12px; border-left: 5px solid; }
.pl-dot { width: 16px; height: 16px; border-radius: 50%; }
.pl-name { flex: 1; text-align: left; font-size: 15px; }
.pl-badge { font-size: 11px; padding: 2px 8px; border-radius: 8px; }
.badge-host { background: var(--accent); color: #0b0b16; }
.badge-ready { background: var(--ok); color: #06210c; }
.badge-wait { background: rgba(255,255,255,0.15); }
.badge-bot { background: #b197fc; color: #0b0b16; }
.lobby-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.lobby-btns button { flex: 1; min-width: 88px; }
button.leave { margin-top: 12px; }

/* ------- HUD ------- */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#crosshair { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 26px; color: rgba(255,255,255,0.85);
  text-shadow: 0 0 4px #000; }
#topcenter { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 34px; font-weight: bold;
  text-shadow: 0 2px 8px #000; }
#scoreboard { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.sb-row { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.45); border-radius: 9px; padding: 4px 9px; font-size: 13px; }
.sb-row.me { outline: 2px solid var(--accent); }
.sb-row.dead { opacity: 0.45; }
.sb-dot { width: 12px; height: 12px; border-radius: 50%; }
.sb-k { font-weight: bold; color: var(--accent); min-width: 18px; text-align: right; }

#killfeed { position: absolute; top: 60px; right: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.kf { background: rgba(0,0,0,0.5); border-radius: 8px; padding: 4px 10px; font-size: 13px; animation: fade 4s forwards; }
.kf b { color: var(--accent); }
@keyframes fade { 0%,80% { opacity: 1; } 100% { opacity: 0; } }

#bottomleft { position: absolute; bottom: 46px; left: 18px; }
#hpwrap { position: relative; width: 240px; height: 26px; background: rgba(0,0,0,0.5); border-radius: 13px; overflow: hidden; border: 2px solid rgba(255,255,255,0.15); }
#hpbar { height: 100%; width: 100%; background: linear-gradient(90deg, #2f9e44, #69db7c); transition: width .12s; }
#hptext { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); font-weight: bold; font-size: 14px; text-shadow: 0 1px 2px #000; }
#stamwrap { position: relative; width: 240px; height: 14px; margin-top: 6px; background: rgba(0,0,0,0.5); border-radius: 8px; overflow: hidden; border: 2px solid rgba(255,255,255,0.12); }
#stambar { height: 100%; width: 100%; background: linear-gradient(90deg, #f59f00, #ffd43b); transition: width .05s; }
#stambar.low { background: #e03131; }
#stamlabel { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); font-size: 9px; font-weight: bold; letter-spacing: 2px; opacity: 0.8; text-shadow: 0 1px 2px #000; }
#crosshair.hit { color: #ff5233; transform: translate(-50%,-50%) scale(1.5); }
#effects { display: flex; gap: 6px; margin-top: 8px; }
.eff-chip { background: rgba(0,0,0,0.55); border-radius: 20px; padding: 4px 11px; font-size: 12px; font-weight: bold; }

#bottomright { position: absolute; bottom: 46px; right: 18px; text-align: right; }
#weaponName { font-size: 20px; font-weight: bold; text-shadow: 0 2px 4px #000; }
#ammo { font-size: 15px; opacity: 0.85; }
#abilities { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.ab-chip { background: rgba(0,0,0,0.55); border-radius: 10px; padding: 5px 10px; font-size: 12px; font-weight: bold; min-width: 54px; }
.ab-chip.ready { color: var(--ok); }
.ab-chip.cd { color: #ff922b; }

#weaponbar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.wb { width: 44px; height: 44px; border-radius: 11px; background: rgba(0,0,0,0.5); display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-size: 20px; border: 2px solid transparent; position: relative; }
.wb.active { border-color: var(--accent); background: rgba(255,112,67,0.25); }
.wb.empty { opacity: 0.35; }
.wb .num { position: absolute; top: 1px; left: 4px; font-size: 9px; opacity: 0.6; }
.wb .amt { position: absolute; bottom: 1px; right: 4px; font-size: 9px; font-weight: bold; }

#hint { position: absolute; bottom: 6px; left: 12px; font-size: 11px; opacity: 0.45; }

/* ------- Оверлеї ------- */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; pointer-events: none; background: rgba(5,6,13,0.55); }
#respawn { background: rgba(120,10,10,0.35); }
.overlay .big-num { font-size: 120px; font-weight: bold; text-shadow: 0 6px 20px #000; }
.overlay .title { font-size: 48px; font-weight: bold; text-shadow: 0 5px 16px #000; }
.overlay .subtitle { font-size: 20px; opacity: 0.85; }
.overlay .btnwrap { pointer-events: auto; margin-top: 10px; }
#pauseHint { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 18; font-size: 22px;
  background: rgba(0,0,0,0.6); padding: 14px 26px; border-radius: 16px; pointer-events: none; }

/* ------- Налаштування / шестерня / тости ------- */
#gear { position: fixed; top: 12px; left: 12px; z-index: 16; width: 44px; height: 44px; font-size: 22px;
  background: rgba(0,0,0,0.5); color: #fff; border-radius: 12px; box-shadow: none; pointer-events: auto; }
#settings { z-index: 40; background: rgba(5,6,13,0.75); }
.set-row { text-align: left; margin: 14px 0; }
.set-row label { display: block; font-size: 14px; margin-bottom: 6px; opacity: 0.85; }
.set-row input[type=range] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; gap: 6px; }
.seg-btn { flex: 1; background: rgba(255,255,255,0.12); color: #fff; box-shadow: none; padding: 10px; }
.seg-btn.on { background: var(--accent); color: #0b0b16; }

#toasts { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 17; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: rgba(0,0,0,0.65); border: 2px solid var(--accent); border-radius: 20px; padding: 8px 18px; font-size: 16px; font-weight: bold;
  animation: toastIn 0.2s ease, fade 1.8s forwards; }
@keyframes toastIn { from { transform: translateY(-10px) scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }

/* charge meter */
#chargebar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, 34px); width: 110px; height: 4px;
  background: rgba(0,0,0,0.45); border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity .1s; }
#chargebar.on { opacity: 1; }
#chargefill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffd166, #ff5533); }
#mapName { display: block; font-size: 12px; opacity: 0.6; letter-spacing: 2px; }
#killcount { display: block; font-size: 16px; margin-top: 2px; color: #ffd43b; text-shadow: 0 2px 6px #000; }
.game-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; font-size: 13px; }
.game-row b { color: var(--accent); letter-spacing: 2px; }
.game-row span { opacity: 0.85; }
.game-row button { margin-left: auto; background: var(--accent); color: #0b0b16; }
#gamesList { max-height: 180px; overflow-y: auto; }

/* weapon slot */
#weaponSlot { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.5); border-radius: 14px; padding: 8px 14px; border: 2px solid rgba(255,255,255,0.15); }
#weaponIcon { font-size: 30px; }
#weaponName { font-size: 17px; font-weight: bold; }
#weaponUses { display: flex; gap: 4px; margin-top: 3px; }
.use-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.use-dot.spent { background: rgba(255,255,255,0.2); }
#weaponSlot.empty { border-color: var(--bad); }
#abilityChip { margin-top: 8px; background: rgba(0,0,0,0.5); border-radius: 12px; padding: 7px 12px; font-size: 14px; font-weight: bold; text-align: center; }
#abilityChip.ready { color: var(--ok); box-shadow: 0 0 12px rgba(105,219,124,0.4); }
#abilityChip.cd { color: #ff922b; }

/* scoreboard opponent weapon */
.sb-wpn { font-size: 15px; }

/* lobby pickers */
.lobby-section { margin-bottom: 14px; text-align: left; }
.lobby-lbl { font-size: 13px; opacity: 0.8; margin-bottom: 7px; }
.lobby-lbl .host-only { opacity: 0.5; font-size: 11px; }
#mapPicker { display: flex; flex-wrap: wrap; gap: 6px; }
.map-opt { flex: 1; min-width: 80px; background: rgba(255,255,255,0.08); border: 2px solid transparent; border-radius: 10px; padding: 8px 6px; font-size: 12px; text-align: center; cursor: pointer; transition: transform .1s; }
.map-opt:hover { transform: translateY(-2px); }
.map-opt.on { border-color: var(--accent); background: rgba(255,112,67,0.2); }
.map-opt .map-emoji { font-size: 22px; display: block; }
#abilityPicker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ab-opt { background: rgba(255,255,255,0.08); border: 2px solid transparent; border-radius: 10px; padding: 8px 4px; text-align: center; cursor: pointer; transition: transform .1s; }
.ab-opt:hover { transform: scale(1.06); }
.ab-opt.on { border-color: var(--accent); background: rgba(255,112,67,0.22); }
.ab-opt .ab-emoji { font-size: 22px; display: block; }
.ab-opt .ab-name { font-size: 9px; opacity: 0.85; margin-top: 2px; }
.ab-desc { font-size: 11px; opacity: 0.65; margin-top: 6px; min-height: 28px; text-align: center; }

@media (max-width: 780px) { #hint { display: none; } #hpwrap { width: 160px; } }

/* ------- Снайперський приціл ------- */
#scope { position: fixed; inset: -90px; z-index: 14; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 24vmin, rgba(0,0,0,0.97) 25vmin); }
.scope-cross-h { position: absolute; top: 50%; left: 50%; width: 48vmin; height: 2px; transform: translate(-50%,-50%); background: rgba(0,0,0,0.85); }
.scope-cross-v { position: absolute; top: 50%; left: 50%; width: 2px; height: 48vmin; transform: translate(-50%,-50%); background: rgba(0,0,0,0.85); }
#scopeZoom { position: absolute; top: calc(50% - 22vmin); left: 50%; transform: translateX(-50%); font-size: 18px; font-weight: bold; color: #cfe8ff; text-shadow: 0 2px 4px #000; }
#scope.sway { animation: scopeSway 1.1s ease-in-out infinite; }
@keyframes scopeSway { 0% { transform: translate(0,0); } 25% { transform: translate(6px,4px); } 50% { transform: translate(-4px,7px); } 75% { transform: translate(-7px,-4px); } 100% { transform: translate(0,0); } }
#crosshair.crit { color: #ffd43b; }

#fpsHud { position: absolute; top: 12px; left: 66px; font-size: 12px; opacity: 0.55; text-shadow: 0 1px 2px #000; }

/* ------- Заморозка: крижаний екран ------- */
#freezeOverlay { position: fixed; inset: 0; z-index: 15; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(150,205,255,0.10) 38%, rgba(120,190,255,0.45) 74%, rgba(210,240,255,0.85) 100%);
  backdrop-filter: blur(1.5px); }
#freezeOverlay .fo-label { position: absolute; top: 16%; left: 50%; transform: translateX(-50%);
  font-size: 26px; font-weight: bold; color: #eaf7ff; text-shadow: 0 0 14px #66bbff, 0 2px 4px #003; letter-spacing: 2px; }

/* ------- Редактор карт ------- */
#editor { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
#editor > div { pointer-events: auto; }
#edTop { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center;
  background: rgba(10,12,26,0.88); border: 1px solid #33385c; border-radius: 12px; padding: 8px 10px; }
#edTop input, #edTop select { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid #33385c; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
#edTop .save { background: rgba(105,219,124,0.25); }
#edTools { position: absolute; left: 10px; top: 70px; display: flex; flex-direction: column; gap: 4px;
  background: rgba(10,12,26,0.88); border: 1px solid #33385c; border-radius: 12px; padding: 8px; max-height: 75vh; overflow-y: auto; }
.ed-tool { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); border: 2px solid transparent;
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; color: #fff; white-space: nowrap; }
.ed-tool:hover { background: rgba(255,255,255,0.14); }
.ed-tool.on { border-color: var(--accent); background: rgba(255,112,67,0.22); }
#edProps { position: absolute; right: 10px; top: 70px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(10,12,26,0.88); border: 1px solid #33385c; border-radius: 12px; padding: 10px; width: 190px; font-size: 12px; color: #fff; }
#edProps label { opacity: 0.8; }
#edProps input[type=range] { width: 100%; }
#edProps input[type=color] { width: 100%; height: 26px; border: none; background: none; }
#edHint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #cfd8ff;
  background: rgba(10,12,26,0.8); border-radius: 10px; padding: 6px 14px; }
#edStatus { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: bold; color: #9fe8b0; text-shadow: 0 2px 4px #000; }

/* ------- Творчість ------- */
#cwWeapons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cw-opt { background: rgba(255,255,255,0.08); border: 2px solid transparent; border-radius: 10px; padding: 8px 4px; text-align: center; cursor: pointer; }
.cw-opt:hover { transform: scale(1.06); border-color: var(--accent); }
.cw-opt .cw-emoji { font-size: 22px; display: block; }
.cw-opt .cw-name { font-size: 9px; opacity: 0.85; margin-top: 2px; }
#edCross { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 21; font-size: 24px; color: #39ff70; text-shadow: 0 0 4px #000; pointer-events: none; }

/* випадні меню редактора: темний фон опцій (був білий текст на білому) */
#editor select, #editor option { background: #1a1c2e; color: #fff; }
#edProps select { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid #33385c; border-radius: 8px; padding: 5px; }

/* панель текстур: превʼю плитками, улюблені, свої */
#texPanel { position: absolute; right: 210px; top: 70px; width: 340px; max-height: 76vh; overflow-y: auto;
  background: rgba(10,12,26,0.96); border: 1px solid #33385c; border-radius: 12px; padding: 10px; z-index: 25; }
.tex-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #fff; }
.tex-sec { font-size: 12px; font-weight: bold; color: #9fb3ff; margin: 8px 0 4px; }
.tex-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tex-tile { position: relative; aspect-ratio: 1; border-radius: 8px; background-size: cover; background-position: center;
  cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.tex-tile:hover { border-color: var(--accent); transform: scale(1.06); }
.tex-tile.on { border-color: #39ff70; }
.tex-tile.none { background: rgba(255,255,255,0.08); }
.tex-star { position: absolute; top: 1px; right: 3px; font-size: 12px; color: rgba(255,255,255,0.35); cursor: pointer; text-shadow: 0 1px 2px #000; }
.tex-star.fav { color: #ffd43b; }
.tex-current { width: 100%; height: 44px; border-radius: 8px; background-size: cover; background-position: center;
  border: 2px solid #33385c; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; background-color: rgba(255,255,255,0.08); }
.tex-current:hover { border-color: var(--accent); }
/* ігровий курсор-прицільник у редакторі, коли миша відпущена (Alt) */
#editor, #editor * { cursor: crosshair; }
#editor button, #editor select, #editor .ed-tool, #editor .tex-tile, #editor .tex-current, #editor input { cursor: crosshair; }

/* рух = РОЗКИД (хрестик розходиться ширше), але лишається ЧІТКИМ — без розмиття */
#crosshair.spread { transform: translate(-50%,-50%) scale(1.85); opacity: 0.85; transition: transform .18s, opacity .18s; }
#crosshair { transition: transform .18s, opacity .18s; }

/* ===== ВИБІР СКІНА (меню + лобі) ===== */
.skin-strip { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.skin-opt { width: 60px; cursor: pointer; text-align: center; border-radius: 10px; padding: 4px 3px; background: rgba(255,255,255,0.05); border: 2px solid transparent; transition: transform .1s, border-color .1s; }
.skin-opt:hover { transform: translateY(-2px); background: rgba(255,255,255,0.1); }
.skin-opt.on { border-color: var(--accent); background: rgba(255,209,102,0.16); }
.skin-opt img { width: 46px; height: 46px; border-radius: 9px; display: block; margin: 0 auto 2px; }
.skin-opt span { font-size: 10px; opacity: 0.85; display: block; line-height: 1.1; }

/* ===== аватар + пінг у списку лобі ===== */
.pl-face { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.pl-ping { font-size: 12px; opacity: 0.8; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ===== TAB-таблиця гравців ===== */
#tabboard { position: absolute; top: 78px; left: 50%; transform: translateX(-50%); width: min(560px, 92vw);
  background: rgba(10,12,22,0.92); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 10px 12px 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 40; }
.tb-head, .tb-row { display: grid; grid-template-columns: 1fr 42px 42px 78px 30px; align-items: center; gap: 6px; }
.tb-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.55; padding: 0 6px 6px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.tb-head span:not(:first-child), .tb-row span:not(.tb-face) { text-align: center; }
.tb-row { padding: 5px 6px; border-radius: 8px; font-size: 14px; }
.tb-row:nth-child(odd) { background: rgba(255,255,255,0.04); }
.tb-row.me { background: rgba(255,209,102,0.16); }
.tb-row.dead { opacity: 0.5; }
.tb-face { display: flex; align-items: center; gap: 8px; text-align: left; overflow: hidden; }
.tb-face img { width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0; }
.tb-face b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-host { font-style: normal; font-size: 9px; background: var(--accent); color: #0b0b16; border-radius: 6px; padding: 1px 5px; }
.tb-ping { font-variant-numeric: tabular-nums; font-size: 13px; opacity: 0.9; }
.tb-foot { text-align: center; font-size: 10px; opacity: 0.4; margin-top: 6px; }

/* ===== лічильник FPS / пінг (F8) ===== */
#fpsHud { display: flex; gap: 12px; align-items: center; opacity: 0.85; }
#fpsHud .fh-fps { font-weight: bold; }
#fpsHud .fh-ping { display: inline-flex; align-items: center; gap: 4px; }

/* ===== АКАУНТ / ПРОФІЛЬ / МАЙСТЕРНЯ ===== */
#accountBar { display: flex; justify-content: flex-end; margin-bottom: 6px; min-height: 26px; }
#accGuest, #accUser { display: flex; align-items: center; gap: 8px; font-size: 13px; }
#accUser b { color: var(--accent); }
#authModal .panel, #profileModal .panel { text-align: center; }
#authModal input { display: block; width: 100%; margin: 8px 0; }
.prof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.prof-stats .ps { background: rgba(255,255,255,0.06); border-radius: 11px; padding: 10px 6px; display: flex; flex-direction: column; gap: 2px; }
.prof-stats .ps b { font-size: 20px; color: var(--accent); }
.prof-stats .ps span { font-size: 11px; opacity: 0.7; }
#myMaps { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.mm-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border-radius: 9px; padding: 6px 10px; }
.mm-name { flex: 1; text-align: left; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-meta { font-size: 11px; opacity: 0.7; white-space: nowrap; }
#leaderboard { display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.lb-row { display: grid; grid-template-columns: 28px 1fr auto auto auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 7px; font-size: 13px; }
.lb-row:nth-child(odd) { background: rgba(255,255,255,0.04); }
.lb-row.me { background: rgba(255,209,102,0.16); }
.lb-rank { font-weight: bold; opacity: 0.6; text-align: center; }
.lb-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* монети в HUD */
#hudCoins { position: relative; color: #ffd166; font-weight: bold; }
.coin-pop { position: absolute; left: 100%; top: -2px; margin-left: 6px; color: #ffe08a; font-weight: bold; white-space: nowrap; animation: coinUp .9s ease-out forwards; }
@keyframes coinUp { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* ===== непомітна кнопка «Додаток для ПК» (справа знизу в меню) ===== */
#dlApp { position: absolute; right: 16px; bottom: 14px; z-index: 5; font-size: 12px; opacity: 0.4;
  color: #d5d9e6; text-decoration: none; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 11px; padding: 7px 13px; display: flex; flex-direction: column; align-items: center; line-height: 1.3;
  box-shadow: none; transition: opacity .18s, transform .12s, background .18s; }
#dlApp:hover { opacity: 1; transform: translateY(-2px); background: rgba(255,112,67,0.18); border-color: var(--accent); }
#dlApp span { font-size: 9px; opacity: 0.7; margin-top: 1px; }
@media (max-width: 560px) { #dlApp { position: static; margin: 14px auto 0; width: fit-content; opacity: 0.75; } }

/* ===== слиз у лице (зелений екран, -50% швидкості) ===== */
#slimeOverlay { position: fixed; inset: 0; z-index: 16; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, rgba(120,220,60,0.05) 0%, rgba(80,190,40,0.28) 60%, rgba(50,140,20,0.55) 100%);
  box-shadow: inset 0 0 160px 40px rgba(60,170,30,0.55); animation: slimeIn .2s ease-out; }
@keyframes slimeIn { from { opacity: 0; } to { opacity: 1; } }
