/* ── Achievements Galaxy — Luxury Edition ── */

.gx-cosmos {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #020610 0%, #040b18 30%, #060d1a 60%, #030810 100%);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}
.gx-cosmos.dragging { cursor: grabbing; }

.gx-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Ambient particle overlay */
.gx-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Rich multi-layer nebula */
.gx-nebula {
  position: absolute;
  width: 300%;
  height: 300%;
  left: -100%;
  top: -100%;
  z-index: 1;
  background:
    /* primary cyan core */
    radial-gradient(ellipse 28% 36% at 35% 38%, rgba(100,210,255,0.07), transparent 65%),
    /* deep violet */
    radial-gradient(ellipse 32% 42% at 68% 28%, rgba(139,92,246,0.065), transparent 68%),
    /* warm rose accent */
    radial-gradient(ellipse 22% 28% at 22% 62%, rgba(244,114,182,0.04), transparent 60%),
    /* gold filament */
    radial-gradient(ellipse 16% 22% at 72% 68%, rgba(251,191,36,0.03), transparent 55%),
    /* teal wash */
    radial-gradient(ellipse 40% 35% at 52% 52%, rgba(45,212,191,0.035), transparent 70%),
    /* deep indigo haze */
    radial-gradient(ellipse 55% 50% at 45% 42%, rgba(67,56,202,0.03), transparent 75%),
    /* sapphire highlight */
    radial-gradient(ellipse 20% 24% at 82% 42%, rgba(96,165,250,0.05), transparent 60%),
    /* ambient purple field */
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(88,28,135,0.02), transparent 80%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Atmospheric vignette */
.gx-depth-fog {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 75% at 50% 50%, transparent 25%, rgba(3,6,16,0.2) 65%, rgba(2,4,12,0.55) 100%),
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(6,13,26,0.15) 0%, transparent 50%);
}

/* ── Pannable world ── */
.gx-world {
  position: absolute;
  width: 5000px;
  height: 4000px;
  transform-origin: 0 0;
  z-index: 3;
  pointer-events: none;
}

/* Constellation lines — gradient glow */
.gx-lines {
  position: absolute;
  width: 5000px;
  height: 4000px;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.gx-lines line {
  stroke: rgba(123,220,255,0.06);
  stroke-width: 0.5;
  transition: opacity 0.5s;
}

/* Orbs container */
.gx-orbs {
  position: absolute;
  width: 5000px;
  height: 4000px;
  z-index: 3;
}

/* ── Achievement Orb ── */
.gx-orb {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  pointer-events: auto;
  transition: opacity 0.5s;
  animation: gx-float 8s ease-in-out infinite;
  animation-delay: calc(var(--fd, 0) * 1s);
  --depth-scale: 1;
  --depth-opacity: 1;
}
.gx-orb.dimmed { opacity: 0.03 !important; pointer-events: none; }

@keyframes gx-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 6px)); }
}

/* Rarity palette */
.gx-orb[data-rarity="common"]    { --orb-r: 156; --orb-g: 163; --orb-b: 175; --orb-size: 50px; }
.gx-orb[data-rarity="uncommon"]  { --orb-r: 74;  --orb-g: 222; --orb-b: 128; --orb-size: 58px; }
.gx-orb[data-rarity="rare"]      { --orb-r: 96;  --orb-g: 165; --orb-b: 250; --orb-size: 64px; }
.gx-orb[data-rarity="epic"]      { --orb-r: 192; --orb-g: 132; --orb-b: 252; --orb-size: 72px; }
.gx-orb[data-rarity="legendary"] { --orb-r: 251; --orb-g: 191; --orb-b: 36;  --orb-size: 84px; }

/* Glass orb ring — frosted crystal with inner refraction */
.gx-orb-ring {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  width: calc(var(--orb-size, 50px) * var(--depth-scale, 1));
  height: calc(var(--orb-size, 50px) * var(--depth-scale, 1));
  transition: transform 0.4s cubic-bezier(.2,.8,.3,1.2), box-shadow 0.5s, border-color 0.4s, background 0.4s;
  background:
    radial-gradient(circle at 35% 30%,
      rgba(255,255,255,0.08) 0%,
      transparent 50%),
    radial-gradient(circle,
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.14) 0%,
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.04) 50%,
      transparent 70%);
  border: 1px solid rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.2);
  box-shadow:
    0 0 20px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.25),
    0 0 60px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.08),
    0 0 120px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.03),
    inset 0 0 14px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.06),
    inset 0 -4px 12px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.04);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Specular highlight — glass light catch */
.gx-orb-ring::before {
  content: "";
  position: absolute;
  top: 12%;
  left: 20%;
  width: 35%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 3;
}

/* Pulse ring for earned */
.gx-orb-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0);
  opacity: 0;
  pointer-events: none;
}
.gx-orb[data-earned="true"] .gx-orb-ring::after {
  animation: gx-ring-pulse 4.5s ease-in-out infinite;
}
@keyframes gx-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0; border-color: rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0); }
  50% { transform: scale(1.8); opacity: 0.35; border-color: rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.2); }
}

/* Twinkle core — prismatic glow */
.gx-orb-core {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgb(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175)) 60%);
  box-shadow:
    0 0 8px 2px rgba(255,255,255,0.3),
    0 0 16px 4px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.5);
  animation: gx-twinkle 3.5s ease-in-out infinite;
  animation-delay: calc(var(--fd, 0) * 0.7s);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
@keyframes gx-twinkle {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
}

/* Legendary shimmer — rotating gradient ring */
.gx-orb[data-rarity="legendary"] .gx-orb-ring {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle,
      rgba(251,191,36, 0.18) 0%,
      rgba(245,158,11, 0.06) 50%,
      transparent 70%);
  border-color: rgba(251,191,36,0.3);
}
.gx-orb[data-rarity="epic"] .gx-orb-ring {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle,
      rgba(192,132,252, 0.16) 0%,
      rgba(139,92,246, 0.05) 50%,
      transparent 70%);
  border-color: rgba(192,132,252,0.28);
}

/* Depth states */
.gx-orb[data-earned="false"] {
  opacity: calc(0.5 * var(--depth-opacity, 1));
}
.gx-orb[data-earned="false"] .gx-orb-ring {
  filter: saturate(0.3) brightness(0.85);
}
.gx-orb[data-earned="true"] {
  opacity: var(--depth-opacity, 1);
}

/* Icon */
.gx-orb-icon {
  display: grid;
  place-items: center;
  color: rgb(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175));
  transition: opacity 0.4s, transform 0.4s;
  z-index: 2;
  filter: drop-shadow(0 0 4px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.4));
}
.gx-orb-icon svg { width: 20px; height: 20px; }
.gx-orb[data-rarity="epic"] .gx-orb-icon svg,
.gx-orb[data-rarity="legendary"] .gx-orb-icon svg { width: 26px; height: 26px; }

/* Label — glass pill */
.gx-orb-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  transform: translate(-50%, 8px);
  white-space: nowrap;
  font-family: "Sora", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
  background: rgba(6,12,28,0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(123,220,255,0.08);
  padding: 5px 14px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Hover — bloom effect */
.gx-orb:hover { opacity: 1 !important; z-index: 10; }
.gx-orb:hover .gx-orb-ring {
  transform: scale(1.3);
  box-shadow:
    0 0 30px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.5),
    0 0 70px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.2),
    0 0 140px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.08),
    inset 0 0 20px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.1);
  border-color: rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.45);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.14) 0%, transparent 50%),
    radial-gradient(circle,
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.22) 0%,
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.06) 50%,
      transparent 70%);
}
.gx-orb:hover .gx-orb-label { opacity: 1; transform: translate(-50%, 0); }
.gx-orb:hover .gx-orb-core {
  box-shadow:
    0 0 10px 3px rgba(255,255,255,0.5),
    0 0 24px 6px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.6);
}

/* Selected */
.gx-orb.selected .gx-orb-ring {
  transform: scale(1.25);
  box-shadow:
    0 0 40px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.55),
    0 0 100px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.2),
    0 0 160px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.06);
  border-color: rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.6);
}

/* ═══ Zoom tiers ═══ */

/* FAR — luminous star points */
.gx-cosmos.zoom-far .gx-orb-ring {
  width: 32px !important;
  height: 32px !important;
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: radial-gradient(circle,
    rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 1) 0%,
    rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.45) 25%,
    rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.12) 50%,
    transparent 70%);
  box-shadow:
    0 0 18px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.6),
    0 0 45px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.18);
}
.gx-cosmos.zoom-far .gx-orb-ring::before { display: none; }
.gx-cosmos.zoom-far .gx-orb-icon { opacity: 0; transform: scale(0.3); }
.gx-cosmos.zoom-far .gx-orb-label { display: none; }
.gx-cosmos.zoom-far .gx-orb-core { width: 8px; height: 8px; }
.gx-cosmos.zoom-far .gx-lines line { stroke-width: 0.5; stroke: rgba(123,220,255,0.035); }

/* MID — icons emerge */
.gx-cosmos.zoom-mid .gx-orb-icon { opacity: 0.85; }
.gx-cosmos.zoom-mid .gx-orb-label { opacity: 0; }
.gx-cosmos.zoom-mid .gx-orb-core { width: 5px; height: 5px; }

/* CLOSE — full reveal */
.gx-cosmos.zoom-close .gx-orb-icon { opacity: 1; }
.gx-cosmos.zoom-close .gx-orb-label {
  opacity: 0.9;
  transform: translate(-50%, 0);
  animation: gx-label-in 0.6s cubic-bezier(.22,.68,.31,1.04) both;
}
@keyframes gx-label-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 0.9; transform: translate(-50%, 0); }
}
.gx-cosmos.zoom-close .gx-orb-core { width: 3px; height: 3px; opacity: 0.35; }

/* ── Detail panel — premium glass ── */
.gx-detail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 380px;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.22,.68,.31,1.04);
  pointer-events: none;
}
.gx-detail.open { transform: translateX(0); pointer-events: auto; }

.gx-detail-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 49;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
.gx-detail-backdrop.open { opacity: 1; pointer-events: auto; }

.gx-detail-panel {
  height: 100%;
  padding: 80px 28px 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(4,8,20,0.97) 0%, rgba(6,12,28,0.98) 100%);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  backdrop-filter: blur(40px) saturate(1.4);
  border-left: 1px solid rgba(123,220,255,0.06);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}
.gx-detail-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  color: rgba(255,255,255,0.45);
  font-size: 18px; cursor: pointer;
  transition: color 0.2s, background 0.2s;
  z-index: 1;
}
.gx-detail-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

.gx-d-icon {
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border-radius: 50%;
  margin: 0 auto 22px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle,
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.18),
      rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.04));
  border: 1.5px solid rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.3);
  box-shadow:
    0 0 30px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.25),
    0 0 80px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.08);
  color: rgb(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175));
}
.gx-d-icon svg { width: 36px; height: 36px; filter: drop-shadow(0 0 6px rgba(var(--orb-r,156),var(--orb-g,163),var(--orb-b,175), 0.4)); }

.gx-d-name {
  text-align: center; font-family: "Sora", sans-serif;
  font-size: 18px; font-weight: 700; color: #f0f4ff; margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.gx-d-rarity {
  text-align: center; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 22px;
}
.gx-d-rarity.common    { color: #9ca3af; }
.gx-d-rarity.uncommon  { color: #4ade80; }
.gx-d-rarity.rare      { color: #60a5fa; }
.gx-d-rarity.epic      { color: #c084fc; }
.gx-d-rarity.legendary { color: #fbbf24; }

.gx-d-desc {
  font-size: 13px; color: rgba(255,255,255,0.45);
  line-height: 1.7; text-align: center; margin-bottom: 24px;
}
.gx-d-meta {
  display: flex; justify-content: center; gap: 24px;
  padding: 16px 0; margin-bottom: 22px;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.gx-d-meta-item { text-align: center; }
.gx-d-meta-val { font-family: "Sora", sans-serif; font-size: 16px; font-weight: 700; }
.gx-d-meta-val.pts { color: #fbbf24; }
.gx-d-meta-val.cat { color: #7bdcff; font-size: 12px; text-transform: capitalize; }
.gx-d-meta-lbl {
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.2); margin-top: 4px;
}

.gx-d-progress { margin-bottom: 22px; }
.gx-d-progress-bar {
  height: 5px; border-radius: 5px; overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.gx-d-progress-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #7bdcff, #a78bfa, #c084fc);
  box-shadow: 0 0 12px rgba(123,220,255,0.3);
  transition: width 0.4s;
}
.gx-d-progress-text {
  font-size: 11px; color: rgba(255,255,255,0.3);
  margin-top: 6px; text-align: center;
}

.gx-d-earned {
  text-align: center; font-size: 12px; color: rgba(255,255,255,0.25);
  margin-bottom: 16px;
}
.gx-d-claim {
  display: block; width: 100%; padding: 13px;
  border: 1px solid rgba(123,220,255,0.25);
  background: linear-gradient(135deg, rgba(123,220,255,0.08), rgba(139,92,246,0.06));
  color: #7bdcff; font-size: 13px; font-weight: 700;
  font-family: "Manrope", sans-serif;
  border-radius: 12px; cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.02em;
}
.gx-d-claim:hover {
  background: linear-gradient(135deg, rgba(123,220,255,0.16), rgba(139,92,246,0.1));
  box-shadow: 0 0 24px rgba(123,220,255,0.12), 0 0 60px rgba(123,220,255,0.04);
  border-color: rgba(123,220,255,0.4);
}
.gx-d-claimed {
  text-align: center; color: #4ade80; font-size: 12px; font-weight: 600;
}


/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: rgba(4,8,20,0.94);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(123,220,255,0.12);
  padding: 14px 20px; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 18px rgba(123,220,255,0.04);
  z-index: 9999;
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(.22,.68,.31,1.04);
  max-width: 320px;
}
.toast.show { transform: translateY(0); }
.toast-title { font-weight: 700; font-size: 13px; color: #7bdcff; margin-bottom: 3px; }
.toast-message { font-size: 12px; color: rgba(255,255,255,0.45); }

/* Loading */
.gx-loading {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center; z-index: 6;
  color: rgba(123,220,255,0.3);
  font-size: 11px; font-weight: 600;
  font-family: "Sora", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .gx-detail { width: 100%; }
}
@media (max-width: 640px) {
  .gx-detail-panel { padding: 60px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .gx-nebula, .gx-orb-ring::after, .gx-orb, .gx-orb-core { animation: none !important; }
  .gx-orb-ring, .gx-orb, .gx-detail { transition: none !important; }
}

/* ══════════════ HUD OVERLAY ══════════════ */
.gx-orb.gx-dim { opacity: 0.12 !important; filter: grayscale(0.7); transition: opacity 0.3s, filter 0.3s; }

.gx-hud {
  position: fixed; top: 84px; left: 20px; z-index: 40;
  width: 340px; max-width: calc(100vw - 40px);
  display: flex; align-items: flex-start; gap: 8px;
  animation: gxHudIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes gxHudIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

.gx-hud-panel {
  flex: 1 1 auto; min-width: 0;
  background: linear-gradient(160deg, rgba(14,22,38,0.82), rgba(9,15,28,0.72));
  border: 1px solid var(--glass-border, rgba(160,190,230,0.22));
  border-radius: 18px; padding: 16px 16px 14px;
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 22px 60px rgba(2,8,20,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  display: grid; gap: 14px; overflow: hidden;
  transition: opacity 0.3s, transform 0.3s;
}
.gx-hud.collapsed .gx-hud-panel { display: none; }
.gx-hud.collapsed .gx-hud-toggle svg { transform: rotate(180deg); }

.gx-hud-toggle {
  order: 2; flex: 0 0 auto; width: 44px; height: 44px; margin-top: 4px;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(14,22,38,0.7); border: 1px solid var(--glass-border, rgba(160,190,230,0.22));
  border-radius: 10px; color: var(--text-soft, #c8d5f2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.gx-hud-toggle:hover { background: rgba(20,30,50,0.9); color: var(--accent, #7bdcff);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.gx-hud-toggle svg { width: 16px; height: 16px; transition: transform 0.3s; }

/* Header: ring + info */
.gx-hud-head { display: flex; align-items: center; gap: 14px; }
.gx-ring { position: relative; width: 72px; height: 72px; flex: 0 0 auto; }
.gx-ring svg { width: 72px; height: 72px; transform: rotate(-90deg); }
.gx-ring-bg { fill: none; stroke: rgba(160,190,230,0.14); stroke-width: 6; }
.gx-ring-fg {
  fill: none; stroke: url(#gxRingGrad); stroke: var(--accent, #7bdcff); stroke-width: 6;
  stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(0.22,1,0.36,1);
  filter: drop-shadow(0 0 6px rgba(123,220,255,0.5));
}
.gx-ring-pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: "Sora", sans-serif; font-size: 17px; font-weight: 700; color: var(--text, #eef3ff);
}
.gx-hud-headinfo { min-width: 0; }
.gx-hud-title {
  font-family: "Sora", sans-serif; font-size: 15px; font-weight: 700; color: var(--text, #eef3ff);
  letter-spacing: 0.01em;
}
.gx-hud-count { font-size: 12px; color: var(--text-muted, #a8b9d4); margin-top: 2px; }
.gx-hud-count b { color: var(--text, #eef3ff); font-weight: 700; }
.gx-hud-points {
  display: flex; align-items: center; gap: 5px; margin-top: 5px;
  font-size: 11.5px; color: var(--text-muted, #a8b9d4);
}
.gx-hud-points svg { width: 13px; height: 13px; color: var(--accent-3, #d9b77a); }
.gx-hud-points b { color: var(--accent-3, #d9b77a); font-weight: 700; }

/* Legend */
.gx-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-leg {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-soft, #c8d5f2);
  padding: 4px 8px; border-radius: 20px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(160,190,230,0.12);
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
.gx-leg i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.gx-leg b { color: var(--text-muted, #a8b9d4); font-weight: 700; }
.gx-leg:hover { background: rgba(255,255,255,0.06); }
.gx-leg.off { opacity: 0.35; }

/* Tools */
.gx-hud-tools { display: grid; gap: 9px; }
.gx-search { position: relative; display: flex; align-items: center; }
.gx-search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--text-muted, #7d8ba5); pointer-events: none; }
.gx-search input {
  width: 100%; padding: 9px 12px 9px 34px; font-size: 12.5px; font-family: "Manrope", sans-serif;
  color: var(--text, #eef3ff); background: rgba(0,0,0,0.28);
  border: 1px solid rgba(160,190,230,0.16); border-radius: 10px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.gx-search input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}
.gx-search input::placeholder { color: var(--text-muted, #6b7896); }
.gx-chips { display: flex; gap: 6px; }
.gx-chip {
  flex: 1; padding: 7px 0; font-size: 11px; font-weight: 700; cursor: pointer;
  color: var(--text-muted, #a8b9d4); background: rgba(255,255,255,0.03);
  border: 1px solid rgba(160,190,230,0.14); border-radius: 9px;
  transition: all 0.2s;
}
.gx-chip:hover { color: var(--text, #eef3ff); background: rgba(255,255,255,0.06); }
.gx-chip.is-active {
  color: var(--accent, #7bdcff);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

/* List */
.gx-list { display: grid; gap: 5px; max-height: min(46vh, 420px); overflow-y: auto; padding-right: 4px; margin: -2px -4px -2px 0; }
.gx-list-empty { text-align: center; color: var(--text-muted, #a8b9d4); font-size: 12px; padding: 22px 0; }
.gx-row {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 11px; cursor: pointer; text-align: left; width: 100%;
  background: rgba(255,255,255,0.02); border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.gx-row:hover { background: rgba(255,255,255,0.06); border-color: color-mix(in srgb, var(--rc, #7bdcff) 35%, transparent); transform: translateX(2px); }
.gx-row-icon {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; flex: 0 0 auto;
  color: var(--rc, #9ca3af);
  background: color-mix(in srgb, var(--rc, #9ca3af) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc, #9ca3af) 26%, transparent);
}
.gx-row:not(.earned) .gx-row-icon { color: var(--text-muted, #6b7896); background: rgba(255,255,255,0.03); border-color: rgba(160,190,230,0.12); opacity: 0.7; }
.gx-row-icon svg { width: 18px; height: 18px; }
.gx-row-main { min-width: 0; display: grid; gap: 1px; }
.gx-row-name { font-size: 12.5px; font-weight: 600; color: var(--text, #eef3ff); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-row:not(.earned) .gx-row-name { color: var(--text-soft, #c8d5f2); }
.gx-row-rar { font-size: 10px; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-row-check {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 auto;
  color: #7bffcf; background: rgba(123,255,207,0.12); border: 1px solid rgba(123,255,207,0.3);
}
.gx-row-check svg { width: 13px; height: 13px; }
.gx-row-prog { font-size: 10px; font-weight: 700; color: var(--text-muted, #7d8ba5); white-space: nowrap; }

/* View controls */
.gx-controls {
  position: fixed; right: 20px; bottom: 22px; z-index: 40;
  display: flex; flex-direction: column; gap: 8px;
  animation: gxHudIn 0.55s cubic-bezier(0.22,1,0.36,1) 0.1s both;
}
.gx-ctl-btn {
  width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
  color: var(--text-soft, #c8d5f2);
  background: linear-gradient(160deg, rgba(14,22,38,0.85), rgba(9,15,28,0.75));
  border: 1px solid var(--glass-border, rgba(160,190,230,0.22)); border-radius: 12px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 26px rgba(2,8,20,0.5);
  transition: transform 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.gx-ctl-btn:hover {
  color: var(--accent, #7bdcff); transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 14px 30px rgba(2,8,20,0.6), 0 0 22px rgba(123,220,255,0.12);
}
.gx-ctl-btn:active { transform: translateY(0); }
.gx-ctl-btn svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .gx-hud { top: 74px; left: 12px; width: calc(100vw - 24px); }
  .gx-list { max-height: 34vh; }
  .gx-controls { right: 12px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .gx-hud, .gx-controls { animation: none; }
  .gx-ring-fg { transition: none; }
  .gx-orb.gx-dim { transition: none; }
}
