/* Mār Online — styles */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; overflow: hidden; background: #0b0e1a; color: #eef1ff;
  font-family: Vazirmatn, Tahoma, sans-serif;
  user-select: none; -webkit-user-select: none;
  touch-action: none; overscroll-behavior: none;
}
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.chip {
  position: fixed; top: calc(10px + env(safe-area-inset-top));
  background: rgba(15, 20, 40, .78); border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px; padding: 7px 14px; text-align: center; line-height: 1.15;
  backdrop-filter: blur(6px);
}
.chip b { font-size: 17px; display: block; }
.chip small { font-size: 10px; opacity: .6; }
#score-chip { right: 12px; }
#online-chip { left: 12px; font-size: 14px; }
#online-chip b { display: inline; }
#online-chip small { margin-right: 3px; }

#lb-box {
  position: fixed; top: calc(58px + env(safe-area-inset-top)); left: 10px;
  background: rgba(15, 20, 40, .72); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 8px 12px; min-width: 150px; max-width: 190px;
  backdrop-filter: blur(6px);
}
#lb-title { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 4px; }
#lb { list-style: none; font-size: 12px; }
#lb li { display: flex; justify-content: space-between; gap: 10px; padding: 1.5px 0; opacity: .9; }
#lb li.me { color: #7dff6b; font-weight: 700; }
#lb li b { font-weight: 400; }

#boost-btn {
  position: fixed; bottom: calc(26px + env(safe-area-inset-bottom)); left: 18px;
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid rgba(255, 224, 77, .55);
  background: radial-gradient(circle at 32% 28%, rgba(255,236,120,.95), rgba(255,180,40,.85) 70%);
  color: #4a3200; font-size: 28px; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(255, 190, 40, .35);
  pointer-events: auto; transition: transform .08s;
}
#boost-btn span { font-size: 10px; font-weight: 900; margin-top: -3px; }
#boost-btn.active { transform: scale(1.12); background: radial-gradient(circle at 32% 28%, #fff8c8, #ffcf30 70%); }

#minimap {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); right: 14px;
  width: 108px; height: 108px; opacity: .85; border-radius: 50%;
}

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 7, 16, .74); backdrop-filter: blur(9px);
  padding: 18px;
}
.panel {
  position: relative;
  width: min(92vw, 380px); text-align: center;
  background: rgba(19, 25, 48, .94);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px; padding: 26px 22px 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
#lang-btn {
  position: absolute; top: 14px; inset-inline-start: 14px;
  width: auto; margin: 0; padding: 5px 12px;
  background: rgba(94, 201, 255, .12); color: #5ec9ff;
  font-size: 11px; font-weight: 800; border: 1px solid rgba(94,201,255,.3);
  border-radius: 20px;
}
#skin-lbl { font-size: 12px; opacity: .7; margin: 2px 0 7px; }
#skin-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 13px; }
.skin-dot {
  width: 38px; height: 38px; border-radius: 50%; padding: 0; margin: 0;
  border: 2px solid rgba(255,255,255,.16);
  box-shadow: inset -5px -7px 10px rgba(0,0,0,.38);
  transition: transform .1s;
}
.skin-dot.sel {
  border-color: #fff; transform: scale(1.14);
  box-shadow: 0 0 14px rgba(255,255,255,.5);
}
.logo { font-size: 52px; line-height: 1; margin-bottom: 4px; }
h1 {
  font-size: 30px; font-weight: 900; letter-spacing: -1px;
  background: linear-gradient(90deg, #5ec9ff, #7dff6b, #ffe14d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { font-size: 13px; opacity: .65; margin: 4px 0 16px; }
input#name-input {
  width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #fff; font-size: 15px; font-family: inherit;
  text-align: center; outline: none; margin-bottom: 10px;
}
input#name-input:focus { border-color: #5ec9ff; }
button {
  width: 100%; padding: 13px; border: none; border-radius: 13px; font-family: inherit;
  font-size: 16px; font-weight: 800; cursor: pointer; margin-bottom: 8px;
}
button.primary {
  background: linear-gradient(135deg, #34c759, #30b350); color: #06280f;
  box-shadow: 0 8px 26px rgba(52, 199, 89, .35);
}
button.primary:active { transform: scale(.97); }
#share-btn { background: rgba(255,255,255,.09); color: #dfe6ff; }
#invite-btn, #invite-btn2 {
  background: rgba(94, 201, 255, .10); color: #9fdcff;
  font-size: 14px; padding: 10px; border: 1px solid rgba(94,201,255,.22);
}
.skin-dot.locked { filter: grayscale(.9) brightness(.55); position: relative; }
.skin-dot.locked::after {
  content: '🔒'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.hof-tabs {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  margin-bottom: 5px; flex-wrap: wrap;
}
.htab {
  width: auto; margin: 0; padding: 4px 12px; font-size: 10.5px;
  border-radius: 12px; background: rgba(255,255,255,.07); color: #cdd6ff;
  font-weight: 700;
}
.htab.on { background: rgba(94, 201, 255, .18); color: #5ec9ff; }
.ref-chip { font-size: 10.5px; color: #7dff6b; margin-inline-start: 4px; }
#dead-stats {
  background: rgba(255,255,255,.05); border-radius: 13px; padding: 12px;
  font-size: 15px; margin-bottom: 14px; line-height: 2;
}
#dead-stats b { color: #ffe14d; font-size: 20px; }
#hof { font-size: 11.5px; opacity: .8; margin-top: 12px; line-height: 1.9; }
.hints { margin-top: 12px; font-size: 11px; opacity: .55; line-height: 2; }
#conn-status { margin-top: 10px; font-size: 11px; color: #5ec9ff; }
#conn-status.err { color: #ff6b6b; }

/* ---------- toast ---------- */
#toast {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(20, 26, 48, .95); border: 1px solid rgba(255,255,255,.14);
  padding: 9px 20px; border-radius: 30px; font-size: 13px; font-weight: 700;
  z-index: 40; transition: transform .3s; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }
