:root {
  --bg-a: #060a14;
  --bg-b: #101a2f;
  --glass: rgba(20, 20, 25, 0.7);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #ecf4ff;
  --muted: #9ba8bf;
  --neon: #00ffcc;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 204, 0.07), transparent 24%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
}

#map {
  position: fixed;
  inset: 0;
}

.hud-top {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 8;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(13, 18, 31, 0.66);
  backdrop-filter: blur(15px);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-text span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.panel-bottom {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 9;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(15px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
}

.panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.icon-btn,
.action-btn {
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.action-btn {
  width: 100%;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  background:
    linear-gradient(140deg, rgba(0, 255, 204, 0.18), rgba(88, 140, 255, 0.14)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 255, 204, 0.14);
}

.action-btn[disabled] {
  opacity: 0.75;
  cursor: default;
}

.avatar-marker {
  position: relative;
  width: 58px;
  height: 74px;
}

.avatar {
  position: absolute;
  left: 50%;
  top: 0;
  width: 48px;
  height: 48px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  overflow: hidden;
  background: #0e1424;
  box-shadow:
    0 0 0 4px rgba(0, 255, 204, 0.12),
    0 0 16px rgba(0, 255, 204, 0.45);
}

.avatar.friend {
  box-shadow:
    0 0 0 4px rgba(111, 139, 255, 0.2),
    0 0 16px rgba(111, 139, 255, 0.5);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-label {
  position: absolute;
  top: 51px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.82);
}

.pulse {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 10px var(--neon);
}

.pulse.friend {
  background: #7a94ff;
  box-shadow: 0 0 10px #7a94ff;
}

.pulse::before,
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid currentColor;
  animation: pulse 2s infinite;
}

.pulse::after {
  animation-delay: 1s;
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .panel-bottom {
    left: 10px;
    right: 10px;
    border-radius: 20px;
  }
}
