/*
 * Boomi World Explorer — Game Mode Styles
 * All classes are prefixed gm- to avoid clashing with Bootstrap / app styles.
 * The game layer is position:fixed so it never affects the Explorer layout.
 */

/* ── CSS Variables (game palette) ────────────────────────────────────────── */
:root {
  --gm-coral:   #FF7C69;
  --gm-purple:  #A93FA5;
  --gm-navy:    #273E59;
  --gm-blue:    #009EE2;
  --gm-green:   #04C788;
  --gm-amber:   #F59E0B;
  --gm-red:     #EF4444;
  --gm-peri:    #4E47E7;
  --gm-font:    "Poppins", system-ui, sans-serif;
  --gm-mono:    "JetBrains Mono", monospace;
  --gm-display: "Cinzel", serif;
  --gm-display2:"Cinzel Decorative", serif;
}

/* ── Game layer — full-screen overlay ────────────────────────────────────── */
.gm-layer {
  position: fixed;
  inset: 0;
  z-index: 1040;               /* above Bootstrap sticky-top (1030) */
  background: #060b17;
  display: flex;
  flex-direction: column;
  font-family: var(--gm-font);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}
.gm-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  filter: blur(3px);
}
.gm-visible {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
  filter: blur(0);
}

/* ── Cinematic transition overlay ────────────────────────────────────────── */
#gm-trans-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  background: #020509;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#gm-trans-overlay.gm-trans-show {
  opacity: 1;
  pointer-events: all;
}
.gm-trans-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 40px rgba(255,124,105,0.6), 0 0 80px rgba(169,63,165,0.3);
  animation: gmOrbPulse 1s ease-in-out infinite;
}
@keyframes gmOrbPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}
.gm-trans-title {
  font-family: var(--gm-display2);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  opacity: 0;
}
.gm-trans-title.gm-trans-in { animation: gmTextIn 0.5s ease 0.2s forwards; }
.gm-trans-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  letter-spacing: 0.05em;
}
.gm-trans-sub.gm-trans-in { animation: gmTextIn 0.5s ease 0.4s forwards; }
@keyframes gmTextIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gm-trans-progress {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.gm-trans-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--gm-coral), var(--gm-purple));
  transition: width 1.1s ease;
}

/* ── 🎮 Game Mode button (in Explorer topbar) ────────────────────────────── */
.gm-topbar-btn {
  font-family: var(--gm-font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff !important;
  border: none !important;
  border-radius: 9999px !important;
  padding: 0.38rem 1rem !important;
  background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple)) !important;
  box-shadow: 0 2px 12px rgba(255,124,105,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.gm-topbar-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.gm-topbar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,124,105,0.55) !important;
}
.gm-topbar-btn:hover::before { opacity: 1; }
.gm-topbar-btn:active { transform: translateY(0); }
.gm-btn-icon {
  font-size: 0.9rem;
  animation: gmControllerWiggle 4s ease-in-out infinite;
  display: inline-block;
}
@keyframes gmControllerWiggle {
  0%, 88%, 100% { transform: rotate(0deg); }
  91%            { transform: rotate(-8deg); }
  94%            { transform: rotate(8deg); }
  97%            { transform: rotate(-4deg); }
}

/* ── XP toast ────────────────────────────────────────────────────────────── */
#gm-xp-toast {
  position: fixed;
  bottom: 60px;
  right: 24px;
  z-index: 1055;
  background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple));
  color: #fff;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-family: var(--gm-font);
  font-size: 0.65rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255,124,105,0.5);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
#gm-xp-toast.gm-toast-show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Star canvas ─────────────────────────────────────────────────────────── */
#gm-star-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ── Game topbar ─────────────────────────────────────────────────────────── */
.gm-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  height: 52px;
  background: rgba(2,5,9,0.95);
  border-bottom: 1px solid rgba(255,124,105,0.15);
  flex-shrink: 0;
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2;
}
.gm-logo-gem {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 0 12px rgba(255,124,105,0.5);
  flex-shrink: 0;
}
.gm-logo-title {
  font-family: var(--gm-display2);
  font-size: 0.82rem;
  background: linear-gradient(90deg, var(--gm-coral), var(--gm-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gm-logo-sub {
  font-size: 0.48rem;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.gm-hud-pills {
  display: flex;
  gap: 0.4rem;
}
.gm-hud-pill {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--gm-font);
  font-size: 0.58rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  padding: 0.18rem 0.6rem;
}
.gm-hud-val { font-weight: 700; color: #fff; }
.gm-hud-lbl { color: rgba(255,255,255,0.4); }

/* 🔙 Back to Explorer button */
.gm-back-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9999px;
  padding: 0.35rem 1rem;
  font-family: var(--gm-font);
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.gm-back-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── Game body ───────────────────────────────────────────────────────────── */
.gm-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Nexus hero text */
.gm-nexus-hero {
  text-align: center;
  position: relative;
  z-index: 2;
  animation: gmHeroIn 0.8s ease forwards;
  margin-bottom: 2.5rem;
}
@keyframes gmHeroIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gm-nexus-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--gm-font);
}
.gm-nexus-eyebrow::before,
.gm-nexus-eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,124,105,0.4));
}
.gm-nexus-eyebrow::after {
  background: linear-gradient(270deg, transparent, rgba(255,124,105,0.4));
}
.gm-nexus-heading {
  font-family: var(--gm-display2);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, rgba(255,124,105,0.9) 50%, rgba(169,63,165,0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.gm-nexus-sub {
  font-family: var(--gm-font);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
}

/* Portal row */
.gm-portal-row {
  display: flex;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  justify-content: center;
  animation: gmRowIn 0.8s ease 0.3s forwards;
  opacity: 0;
}
@keyframes gmRowIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Individual portal */
.gm-portal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.3s;
}
.gm-portal:hover { transform: translateY(-6px); }
.gm-portal:hover .gm-portal-door {
  box-shadow: 0 0 30px var(--gm-pc), 0 0 60px color-mix(in srgb, var(--gm-pc) 30%, transparent);
}

.gm-portal-door {
  width: 90px;
  height: 130px;
  border-radius: 45px 45px 8px 8px;
  border: 2px solid var(--gm-pc);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gm-pc) 15%, transparent), rgba(2,5,9,0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.gm-portal-door::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--gm-pc) 20%, transparent), transparent 60%);
}
.gm-portal-icon {
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}
.gm-portal-name {
  font-family: var(--gm-font);
  font-size: 0.52rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 0.3rem;
  line-height: 1.2;
}
.gm-portal-status {
  font-family: var(--gm-font);
  font-size: 0.45rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  border: 1px solid var(--gm-pc);
  color: var(--gm-pc);
  position: relative;
  z-index: 1;
  background: rgba(2,5,9,0.7);
}
.gm-portal-ground {
  width: 110px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--gm-pc), transparent 70%);
  opacity: 0.3;
  animation: gmGroundPulse 3s ease-in-out infinite;
}
@keyframes gmGroundPulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.4; }
}
.gm-portal-label {
  font-family: var(--gm-font);
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* Alert pip on portal */
.gm-portal-alert {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gm-red);
  border: 2px solid #060b17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #fff;
  animation: gmAlertPip 1s ease-in-out infinite;
  z-index: 5;
}
@keyframes gmAlertPip {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.25); }
}

/* Hint */
.gm-nexus-hint {
  margin-top: 2rem;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 2;
  animation: gmRowIn 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* ── Game bottom bar ─────────────────────────────────────────────────────── */
.gm-bottombar {
  height: 40px;
  background: rgba(2,5,9,0.95);
  border-top: 1px solid rgba(255,124,105,0.12);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  flex-shrink: 0;
  backdrop-filter: blur(16px);
  position: relative;
  z-index: 2;
}
.gm-bottom-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--gm-font);
  font-size: 0.58rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9999px;
  padding: 0.18rem 0.6rem;
}
.gm-bottom-val { font-weight: 700; color: #fff; }
.gm-bottom-lbl { color: rgba(255,255,255,0.4); }
.gm-bottom-version {
  margin-left: auto;
  font-size: 0.48rem;
  color: rgba(255,255,255,0.18);
  font-family: var(--gm-mono);
}

/* ── "Coming Soon" panel shown for unbuilt screens ───────────────────────── */
.gm-coming-soon {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 2rem;
  color: rgba(255,255,255,0.3);
  font-family: var(--gm-font);
  font-size: 0.75rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   PHASE 3 — WORLD MAP
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Hide Explorer chrome while game mode is active ─────────────────────── */
body.gm-active .sticky-top,
body.gm-active #boomi-sidebar {
  display: none !important;
}

/* ── Screen switching ────────────────────────────────────────────────────── */
.gm-screen-hidden { display: none !important; }

/* ── World map screen container ─────────────────────────────────────────── */
.gm-world-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* World sub-header (account name + live stats + back button) */
.gm-world-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.25rem;
  background: rgba(2,5,9,0.85);
  border-bottom: 1px solid rgba(255,124,105,0.12);
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 3;
}
.gm-back-world-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9999px;
  padding: 0.28rem 0.85rem;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.gm-back-world-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.gm-world-title {
  font-family: var(--gm-display);
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--gm-coral), var(--gm-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.gm-world-subtitle {
  font-size: 0.48rem;
  color: rgba(255,255,255,0.25);
  font-family: var(--gm-mono);
  letter-spacing: 0.04em;
}
.gm-world-live-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--gm-font);
  font-size: 0.57rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9999px;
  padding: 0.16rem 0.55rem;
  flex-shrink: 0;
}
.gm-world-stat-val { font-weight: 700; color: #fff; }
.gm-world-stat-lbl { color: rgba(255,255,255,0.38); }

/* ── World map body ──────────────────────────────────────────────────────── */
.gm-world-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.gm-world {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 25% 35%, rgba(255,124,105,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 65%, rgba(169,63,165,0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(78,71,231,0.03) 0%, transparent 65%),
    #060c17;
}
/* Hex grid overlay */
.gm-world::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16z' fill='none' stroke='%23FF7C69' stroke-width='0.4' opacity='0.3'/%3E%3Cpath d='M28 66l28 16v32L28 130 0 114V82z' fill='none' stroke='%23FF7C69' stroke-width='0.4' opacity='0.3'/%3E%3Cpath d='M56 32l28 16v32L56 96 28 80V48z' fill='none' stroke='%23FF7C69' stroke-width='0.4' opacity='0.3'/%3E%3C/svg%3E");
  pointer-events: none;
}
/* SVG connection layer */
#gm-conn-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
/* Node container */
#gm-world-nodes {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* ── World map nodes ─────────────────────────────────────────────────────── */
.gm-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 5;
  transform: translate(-50%, -50%);
  transition: filter 0.2s;
}
.gm-node:hover { filter: brightness(1.25); }
.gm-node:hover .gm-node-body { transform: scale(1.08); }

.gm-node-body {
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.gm-node-glow {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  pointer-events: none;
  animation: gm-glowBreath 3s ease-in-out infinite;
}
@keyframes gm-glowBreath {
  0%, 100% { opacity: 0.2; transform: scale(0.9); }
  50%       { opacity: 0.5; transform: scale(1.1); }
}
.gm-node-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  position: relative;
  z-index: 2;
  border: 2px solid;
  transition: all 0.3s;
}
.gm-node-ring-outer {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  opacity: 0;
  animation: gm-ringPulse 2.5s ease-out infinite;
}
.gm-node-ring-inner {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  opacity: 0;
  animation: gm-ringPulse 2.5s ease-out infinite 0.8s;
}
@keyframes gm-ringPulse {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(1.6); }
}
.gm-node-label {
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 0.45rem;
  text-align: center;
  max-width: 90px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  font-family: var(--gm-font);
  color: #fff;
}
.gm-node-sublabel {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  max-width: 90px;
  margin-top: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  font-family: var(--gm-font);
}
.gm-node-status {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-top: 0.2rem;
  font-family: var(--gm-font);
}

/* ATOM — healthy (ONLINE) */
.gm-atom-healthy .gm-node-icon {
  background: radial-gradient(circle at 35% 35%, #0e2a3d, #071520);
  border-color: var(--gm-green);
  color: var(--gm-green);
  box-shadow: 0 0 20px rgba(4,199,136,0.35), inset 0 0 10px rgba(4,199,136,0.1);
}
.gm-atom-healthy .gm-node-glow   { background: var(--gm-green); width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-healthy .gm-node-ring-outer { border-color: var(--gm-green); width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-healthy .gm-node-ring-inner { border-color: var(--gm-green); width: 64px; height: 64px; top:  -2px; left:  -2px; }
.gm-atom-healthy .gm-node-status { background: rgba(4,199,136,0.15); color: var(--gm-green); }

/* ATOM — warning */
.gm-atom-warning .gm-node-icon {
  background: radial-gradient(circle at 35% 35%, #2a1e0a, #150f05);
  border-color: var(--gm-amber);
  color: var(--gm-amber);
  box-shadow: 0 0 20px rgba(245,158,11,0.35), inset 0 0 10px rgba(245,158,11,0.1);
  animation: gm-warningFlicker 3s ease-in-out infinite;
}
@keyframes gm-warningFlicker {
  0%, 90%, 100% { opacity: 1; }
  95%            { opacity: 0.7; }
}
.gm-atom-warning .gm-node-glow   { background: var(--gm-amber); width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-warning .gm-node-ring-outer { border-color: var(--gm-amber); width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-warning .gm-node-ring-inner { border-color: var(--gm-amber); width: 64px; height: 64px; top:  -2px; left:  -2px; }
.gm-atom-warning .gm-node-status { background: rgba(245,158,11,0.15); color: var(--gm-amber); }

/* ATOM — critical (OFFLINE) */
.gm-atom-critical .gm-node-icon {
  background: radial-gradient(circle at 35% 35%, #2a0a0a, #150505);
  border-color: var(--gm-coral);
  color: var(--gm-coral);
  animation: gm-criticalStrobe 1.2s ease-in-out infinite;
}
@keyframes gm-criticalStrobe {
  0%, 100% { box-shadow: 0 0 20px rgba(255,124,105,0.6); }
  50%       { box-shadow: 0 0 40px rgba(255,124,105,1), inset 0 0 15px rgba(255,124,105,0.3); }
}
.gm-atom-critical .gm-node-glow   { background: var(--gm-coral); width: 90px; height: 90px; top: -15px; left: -15px; animation: gm-glowBreath 1.2s ease-in-out infinite; }
.gm-atom-critical .gm-node-ring-outer { border-color: var(--gm-coral); width: 90px; height: 90px; top: -15px; left: -15px; animation: gm-ringPulse 1.2s ease-out infinite; }
.gm-atom-critical .gm-node-ring-inner { border-color: var(--gm-coral); width: 72px; height: 72px; top:  -6px; left:  -6px; animation: gm-ringPulse 1.2s ease-out infinite 0.4s; }
.gm-atom-critical .gm-node-status { background: rgba(255,124,105,0.2); color: var(--gm-coral); }

/* ATOM — unknown / unreachable */
.gm-atom-unknown .gm-node-icon {
  background: radial-gradient(circle at 35% 35%, #141414, #0a0a0a);
  border-color: #4B5563;
  color: #4B5563;
  filter: grayscale(1);
}
.gm-atom-unknown .gm-node-glow   { background: #4B5563; width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-unknown .gm-node-ring-outer { border-color: #4B5563; width: 80px; height: 80px; top: -10px; left: -10px; }
.gm-atom-unknown .gm-node-ring-inner { border-color: #4B5563; width: 64px; height: 64px; top:  -2px; left:  -2px; }
.gm-atom-unknown .gm-node-status { background: rgba(75,85,99,0.15); color: #6B7280; }

/* ── Player character ────────────────────────────────────────────────────── */
.gm-player-char {
  position: absolute;
  z-index: 10;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: gm-playerFloat 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gm-playerFloat {
  0%, 100% { transform: translate(-50%, -54%); }
  50%       { transform: translate(-50%, -46%); }
}
.gm-player-sprite {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(255,124,105,0.7), 0 0 40px rgba(169,63,165,0.3);
  border: 2px solid rgba(255,255,255,0.3);
}
.gm-player-shadow {
  width: 28px; height: 5px;
  border-radius: 50%;
  background: rgba(255,124,105,0.25);
  margin-top: 3px;
  animation: gm-shadowAnim 3.5s ease-in-out infinite;
}
@keyframes gm-shadowAnim {
  0%, 100% { transform: scaleX(0.8); opacity: 0.25; }
  50%       { transform: scaleX(1.1); opacity: 0.40; }
}
.gm-player-name-tag {
  background: rgba(6,11,23,0.8);
  border: 1px solid rgba(255,124,105,0.4);
  border-radius: 9999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.52rem;
  font-weight: 700;
  font-family: var(--gm-font);
  color: var(--gm-coral);
  margin-top: 0.2rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* ── Distress beacon (critical atom alert) ───────────────────────────────── */
.gm-beacon {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -120%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: gm-beaconBob 1s ease-in-out infinite;
  cursor: pointer;
}
@keyframes gm-beaconBob {
  0%, 100% { transform: translate(-50%, -120%); }
  50%       { transform: translate(-50%, -132%); }
}
.gm-beacon-flag {
  background: rgba(255,124,105,0.15);
  border: 1px solid var(--gm-coral);
  border-radius: 0.5rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.58rem;
  font-weight: 700;
  font-family: var(--gm-font);
  color: var(--gm-coral);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  animation: gm-beaconGlow 1s ease-in-out infinite;
}
@keyframes gm-beaconGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,124,105,0.3); }
  50%       { box-shadow: 0 0 20px rgba(255,124,105,0.7); }
}
.gm-beacon-stem { width: 1px; height: 16px; background: var(--gm-coral); opacity: 0.5; }
.gm-beacon-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--gm-coral); box-shadow: 0 0 6px var(--gm-coral); }

/* ── Inspect panel ───────────────────────────────────────────────────────── */
.gm-inspect-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
.gm-inspect-panel {
  position: absolute;
  background: rgba(8,14,28,0.97);
  border: 1px solid rgba(255,124,105,0.35);
  border-radius: 1rem;
  padding: 1.1rem;
  width: 215px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 20px rgba(255,124,105,0.1);
  backdrop-filter: blur(20px);
  animation: gm-panelIn 0.28s cubic-bezier(0.34,1.56,0.64,1) forwards;
  pointer-events: all;
  z-index: 25;
}
@keyframes gm-panelIn {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);    }
}
.gm-ip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.gm-ip-icon     { font-size: 1.3rem; }
.gm-ip-title    { font-size: 0.78rem; font-weight: 700; color: #fff; font-family: var(--gm-font); }
.gm-ip-subtitle { font-size: 0.55rem; color: rgba(255,255,255,0.4); font-family: var(--gm-font); }
.gm-ip-row      { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.28rem; }
.gm-ip-key      { font-size: 0.6rem; color: rgba(255,255,255,0.45); font-family: var(--gm-font); }
.gm-ip-val      { font-size: 0.62rem; font-weight: 600; font-family: var(--gm-font); color: rgba(255,255,255,0.8); }
.gm-ip-val.green  { color: var(--gm-green); }
.gm-ip-val.amber  { color: var(--gm-amber); }
.gm-ip-val.red    { color: var(--gm-red); }
.gm-ip-val.blue   { color: var(--gm-blue); }
.gm-ip-divider  { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 0.5rem 0; }
.gm-ip-mini-bar { height: 3px; background: rgba(255,255,255,0.08); border-radius: 9999px; overflow: hidden; margin-top: 3px; }
.gm-ip-mini-fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, var(--gm-coral), var(--gm-purple)); }
.gm-ip-actions  { display: flex; gap: 0.4rem; margin-top: 0.7rem; }
.gm-ip-btn {
  flex: 1;
  padding: 0.35rem;
  border-radius: 9999px;
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--gm-font);
  border: none;
  transition: all 0.2s;
}
.gm-ip-btn-primary   { background: linear-gradient(135deg, var(--gm-coral), var(--gm-purple)); color: #fff; }
.gm-ip-btn-primary:hover   { opacity: 0.85; }
.gm-ip-btn-secondary { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.1); }
.gm-ip-btn-secondary:hover { background: rgba(255,255,255,0.1); }
.gm-ip-close {
  position: absolute;
  top: 0.6rem; right: 0.75rem;
  font-size: 1rem;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}
.gm-ip-close:hover { color: var(--gm-coral); }

/* ── Mini-map ─────────────────────────────────────────────────────────────── */
.gm-minimap {
  position: absolute;
  bottom: 0.75rem; right: 0.75rem;
  width: 130px; height: 90px;
  background: rgba(6,11,23,0.9);
  border: 1px solid rgba(255,124,105,0.2);
  border-radius: 0.5rem;
  overflow: hidden;
  z-index: 15;
  backdrop-filter: blur(8px);
}
.gm-minimap-title {
  font-size: 0.44rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 0.3rem 0.5rem 0;
  font-family: var(--gm-font);
}
.gm-minimap-canvas {
  position: relative;
  width: 100%;
  height: calc(100% - 16px);
}
.gm-mm-dot    { position: absolute; border-radius: 50%; transform: translate(-50%,-50%); }
.gm-mm-player { position: absolute; transform: translate(-50%,-50%); z-index: 2; }

/* ════════════════════════════════════════════════════════════════════════════
   PHASE 4 — ACTIVITY FEED + ACHIEVEMENTS
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Activity feed panel (right side of world map) ───────────────────────── */
.gm-activity-panel {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: rgba(2,5,9,0.92);
  border-left: 1px solid rgba(255,124,105,0.12);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: width 0.28s cubic-bezier(0.4,0,0.2,1);
  z-index: 10;
  position: relative;
}
.gm-activity-panel.gm-act-collapsed {
  width: 30px;
}

.gm-act-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.6rem 0.45rem;
  border-bottom: 1px solid rgba(255,124,105,0.1);
  flex-shrink: 0;
}
.gm-act-title {
  font-family: var(--gm-font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
}
.gm-act-toggle {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
  font-size: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}
.gm-act-toggle:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* Collapsed state: show only the toggle */
.gm-act-collapsed .gm-act-title,
.gm-act-collapsed .gm-act-feed,
.gm-act-collapsed .gm-act-footer { display: none; }
.gm-act-collapsed .gm-act-header {
  justify-content: center;
  padding: 0.55rem 0;
  border-bottom-color: transparent;
}

/* Feed scroll area */
.gm-act-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem;
}
.gm-act-feed::-webkit-scrollbar { width: 2px; }
.gm-act-feed::-webkit-scrollbar-thumb { background: rgba(255,124,105,0.25); border-radius: 9999px; }

/* Individual feed item */
.gm-act-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.45rem 0.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  animation: gm-feedSlide 0.35s ease;
}
@keyframes gm-feedSlide {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.gm-act-ico {
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  width: 16px;
  text-align: center;
}
.gm-act-body { flex: 1; min-width: 0; }
.gm-act-name {
  font-family: var(--gm-font);
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.gm-act-meta {
  font-family: var(--gm-mono);
  font-size: 0.5rem;
  color: rgba(255,255,255,0.28);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-act-name.complete { color: rgba(4,199,136,0.85); }
.gm-act-name.error    { color: rgba(239,68,68,0.85); }
.gm-act-name.aborted  { color: rgba(245,158,11,0.85); }
.gm-act-name.inprocess { color: rgba(0,158,226,0.85); }

/* Loading / empty states */
.gm-act-loading, .gm-act-empty, .gm-act-error {
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  padding: 1.5rem 0.5rem;
  line-height: 1.6;
}
.gm-act-error { color: rgba(239,68,68,0.5); }

/* Footer: stats + refresh */
.gm-act-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  border-top: 1px solid rgba(255,124,105,0.08);
  flex-shrink: 0;
}
.gm-act-stats {
  font-family: var(--gm-mono);
  font-size: 0.48rem;
  color: rgba(255,255,255,0.25);
}
.gm-act-refresh {
  font-size: 0.65rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: color 0.2s, transform 0.3s;
  padding: 0.15rem;
  line-height: 1;
}
.gm-act-refresh:hover  { color: var(--gm-coral); }
.gm-act-refresh.spinning { animation: gm-spin 0.7s linear infinite; }
@keyframes gm-spin { to { transform: rotate(360deg); } }

/* ── Achievement badges (Nexus hub strip) ────────────────────────────────── */
.gm-ach-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  margin-top: 1.5rem;
  animation: gmRowIn 0.8s ease 0.9s forwards;
  opacity: 0;
}
.gm-ach-label {
  font-family: var(--gm-font);
  font-size: 0.52rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gm-ach-row {
  display: flex;
  gap: 0.6rem;
}
.gm-ach-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: default;
  position: relative;
  border: 2px solid;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gm-ach-badge.locked {
  opacity: 0.25;
  filter: grayscale(1);
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
.gm-ach-badge.unlocked {
  border-color: rgba(255,124,105,0.5);
  background: radial-gradient(circle, rgba(255,124,105,0.12), rgba(169,63,165,0.08));
  box-shadow: 0 0 10px rgba(255,124,105,0.2);
  animation: gm-achGlow 3s ease-in-out infinite;
}
.gm-ach-badge.unlocked:hover { transform: translateY(-3px); box-shadow: 0 0 20px rgba(255,124,105,0.45); }
@keyframes gm-achGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,124,105,0.15); }
  50%       { box-shadow: 0 0 18px rgba(255,124,105,0.4); }
}
.gm-ach-badge.just-unlocked {
  animation: gm-achPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards,
             gm-achGlow 3s ease-in-out 0.5s infinite;
}
@keyframes gm-achPop {
  0%   { transform: scale(0.7); opacity: 0.5; }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}
/* Hover tooltip */
.gm-ach-tip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8,14,28,0.97);
  border: 1px solid rgba(255,124,105,0.3);
  border-radius: 0.45rem;
  padding: 0.3rem 0.55rem;
  font-family: var(--gm-font);
  font-size: 0.52rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 50;
  text-align: center;
}
.gm-ach-tip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(255,124,105,0.3);
}
.gm-ach-badge:hover .gm-ach-tip { opacity: 1; }
.gm-ach-tip-sub {
  display: block;
  font-size: 0.46rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}

/* ── Phase 5: Quest Log ───────────────────────────────────────────────────── */
.gm-quest-log {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  background: rgba(6,11,23,0.82);
  border: 1px solid rgba(255,124,105,0.18);
  border-radius: 7px;
  padding: 7px 10px 8px;
  min-width: 170px;
  max-width: 210px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.gm-quest-header {
  font-family: var(--gm-font);
  font-size: 0.57rem;
  font-weight: 700;
  color: rgba(255,124,105,0.75);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,124,105,0.12);
}
.gm-quest-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 3px 0;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.35;
}
.gm-quest-item.gm-q-critical { color: rgba(239,68,68,0.9); }
.gm-quest-item.gm-q-patrol   { color: rgba(4,199,136,0.9); }
.gm-quest-item.gm-q-debug    { color: rgba(245,158,11,0.9); }
.gm-quest-item.gm-q-scout    { color: rgba(0,158,226,0.8); }
.gm-quest-ico { flex-shrink: 0; font-size: 0.65rem; }
.gm-quest-text { flex: 1; }
.gm-quest-empty {
  font-family: var(--gm-font);
  font-size: 0.57rem;
  color: rgba(255,255,255,0.22);
  font-style: italic;
  padding: 2px 0;
}

/* ── Phase 5: World Atmosphere Tints ─────────────────────────────────────── */
.gm-world.atm-critical::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(239,68,68,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  animation: atmPulse 3s ease-in-out infinite;
}
.gm-world.atm-warning::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(245,158,11,0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}
.gm-world.atm-healthy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(4,199,136,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}
@keyframes atmPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1.0; }
}

/* ── Phase 5: Execution Ticker ───────────────────────────────────────────── */
.gm-ticker {
  display: flex;
  align-items: center;
  height: 24px;
  min-height: 24px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.45);
  border-top: 1px solid rgba(255,124,105,0.14);
  overflow: hidden;
  padding: 0 8px;
  gap: 8px;
}
.gm-ticker-label {
  font-family: var(--gm-font);
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--gm-coral);
  letter-spacing: 0.1em;
  white-space: nowrap;
  border: 1px solid rgba(255,124,105,0.4);
  border-radius: 2px;
  padding: 0 3px;
  flex-shrink: 0;
}
.gm-ticker-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.gm-ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.45);
  position: relative;
}
.gm-ticker-inner {
  display: inline-block;
  padding-left: 100%;
  animation: gmTicker 28s linear infinite;
}
@keyframes gmTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ── Phase 6: HUD Progress Bar + Rank ────────────────────────────────────── */
.gm-hud-rank {
  font-size: 0.5rem;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
  line-height: 1;
}
.gm-hud-xp-bar {
  width: 56px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}
.gm-hud-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gm-coral), var(--gm-amber));
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Phase 6: World Health Score Badge ───────────────────────────────────── */
.gm-world-health-score {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--gm-font);
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  white-space: nowrap;
  flex-shrink: 0;
}
.gm-world-health-score small { font-size: 0.5rem; font-weight: 400; opacity: 0.6; }
.gm-world-health-score.score-high   { border-color: rgba(4,199,136,0.4);  color: var(--gm-green); }
.gm-world-health-score.score-mid    { border-color: rgba(245,158,11,0.4); color: var(--gm-amber); }
.gm-world-health-score.score-low    { border-color: rgba(239,68,68,0.4);  color: var(--gm-red);   }
.gm-world-health-score.score-none   { color: rgba(255,255,255,0.25); }

/* ── Phase 6: Level-Up Overlay ───────────────────────────────────────────── */
#gm-levelup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  pointer-events: none;
  transition: background 0.35s ease;
}
#gm-levelup-overlay.gm-lu-show {
  background: rgba(0,0,0,0.72);
  pointer-events: all;
}
.gm-lu-rays {
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg, rgba(255,215,0,0.025) 12deg,
    transparent 24deg, rgba(255,124,105,0.025) 36deg,
    transparent 48deg
  );
  animation: gmRaysSpin 12s linear infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
#gm-levelup-overlay.gm-lu-show .gm-lu-rays { opacity: 1; }
.gm-lu-content {
  position: relative;
  text-align: center;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#gm-levelup-overlay.gm-lu-show .gm-lu-content {
  opacity: 1;
  transform: scale(1);
}
.gm-lu-eyebrow {
  font-family: var(--gm-font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--gm-amber);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.gm-lu-number {
  font-family: var(--gm-display), serif;
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 900;
  line-height: 0.9;
  background: linear-gradient(135deg, #FFD700 0%, #FF7C69 50%, #A93FA5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(255,215,0,0.35));
  animation: gmLuGlow 1.2s ease-in-out infinite alternate;
}
.gm-lu-rank-line {
  font-family: var(--gm-font);
  font-size: 1.3rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
  margin-top: 0.6rem;
}
.gm-lu-xp-line {
  font-family: var(--gm-font);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  margin-top: 0.45rem;
}
.gm-lu-dismiss {
  margin-top: 1.6rem;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.22);
  cursor: pointer;
  letter-spacing: 0.06em;
}
.gm-lu-dismiss:hover { color: rgba(255,255,255,0.5); }
@keyframes gmLuGlow {
  from { filter: drop-shadow(0 0 18px rgba(255,215,0,0.3)); }
  to   { filter: drop-shadow(0 0 42px rgba(255,215,0,0.7)); }
}
@keyframes gmRaysSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Phase 7: Environment Zones ──────────────────────────────────────────── */
#gm-world-zones {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.gm-zone {
  position: absolute;
  border-radius: 14px;
  border: 1px solid;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.gm-zone-prod {
  background: rgba(239,68,68,0.04);
  border-color: rgba(239,68,68,0.22);
}
.gm-zone-test {
  background: rgba(0,158,226,0.04);
  border-color: rgba(0,158,226,0.22);
}
.gm-zone-dev {
  background: rgba(245,158,11,0.04);
  border-color: rgba(245,158,11,0.22);
}
.gm-zone-other {
  background: rgba(107,114,128,0.04);
  border-color: rgba(107,114,128,0.18);
}
.gm-zone-label {
  position: absolute;
  top: 9px;
  left: 12px;
  font-family: var(--gm-font);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.75;
  pointer-events: none;
  white-space: nowrap;
}
.gm-zone-prod  .gm-zone-label { color: var(--gm-red);   }
.gm-zone-test  .gm-zone-label { color: var(--gm-blue);  }
.gm-zone-dev   .gm-zone-label { color: var(--gm-amber); }
.gm-zone-other .gm-zone-label { color: rgba(255,255,255,0.4); }
.gm-zone-count {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: var(--gm-font);
  font-size: 0.48rem;
  font-weight: 600;
  opacity: 0.35;
  pointer-events: none;
}

/* ── Phase 7: Nexus Leaderboard ──────────────────────────────────────────── */
.gm-leaderboard {
  width: 100%;
  max-width: 520px;
  margin: 0.5rem auto 0;
  padding: 0 1.5rem;
}
.gm-lb-title {
  font-family: var(--gm-font);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.5rem;
  text-align: center;
}
.gm-lb-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.gm-lb-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-family: var(--gm-font);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.gm-lb-row:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,124,105,0.25); }
.gm-lb-rank {
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 1.6rem;
  text-align: center;
  color: rgba(255,255,255,0.25);
}
.gm-lb-rank.gold   { color: #FFD700; }
.gm-lb-rank.silver { color: #C0C0C0; }
.gm-lb-rank.bronze { color: #CD7F32; }
.gm-lb-name {
  flex: 1;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gm-lb-bar-wrap {
  width: 80px;
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.gm-lb-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.gm-lb-score {
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 2.6rem;
  text-align: right;
  flex-shrink: 0;
}
.gm-lb-state-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Phase 8: View Toggle ─────────────────────────────────────────────────── */
.gm-view-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.3);
  border-radius: 9999px;
  padding: 2px;
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.gm-view-btn {
  border: none;
  background: transparent;
  border-radius: 9999px;
  padding: 3px 9px;
  font-family: var(--gm-font);
  font-size: 0.53rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.gm-view-btn.active {
  background: rgba(255,124,105,0.18);
  color: var(--gm-coral);
}
.gm-view-btn:hover:not(.active) { color: rgba(255,255,255,0.65); }

/* ── Phase 8: Process View Nodes ─────────────────────────────────────────── */
.gm-proc-node {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
}
.gm-proc-card {
  background: rgba(6,11,23,0.88);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 5px 8px;
  min-width: 88px;
  max-width: 118px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  backdrop-filter: blur(6px);
}
.gm-proc-card:hover {
  border-color: rgba(255,124,105,0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,124,105,0.12);
}
.gm-proc-name {
  font-family: var(--gm-font);
  font-size: 0.53rem;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  line-height: 1.35;
  margin-bottom: 3px;
}
.gm-proc-version {
  display: inline-block;
  font-family: var(--gm-font);
  font-size: 0.44rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255,124,105,0.12);
  color: var(--gm-coral);
  letter-spacing: 0.03em;
}
.gm-proc-date {
  font-family: var(--gm-font);
  font-size: 0.42rem;
  color: rgba(255,255,255,0.24);
  margin-top: 2px;
}
.gm-proc-loading, .gm-proc-empty, .gm-proc-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--gm-font);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  z-index: 5;
}

/* ── Phase 8: Storm Overlay ──────────────────────────────────────────────── */
#gm-storm-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.9s ease;
}
#gm-storm-overlay.active { opacity: 1; }
.gm-rain-drop {
  position: absolute;
  width: 1px;
  background: linear-gradient(transparent, rgba(239,68,68,0.3));
  animation: gmRainFall linear infinite;
}
@keyframes gmRainFall {
  0%   { transform: translateY(-20px); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.4; }
  100% { transform: translateY(105%); opacity: 0; }
}

/* ── Phase 8: Connection Pulse Flash ─────────────────────────────────────── */
.gm-pulse-flash {
  position: absolute;
  left: 50%; top: 47%;
  width: 10px; height: 10px;
  margin-left: -5px; margin-top: -5px;
  border-radius: 50%;
  border: 2px solid;
  pointer-events: none;
  z-index: 4;
  animation: gmPulseFlash 0.75s ease-out forwards;
}
.gm-pulse-flash.ok  { border-color: var(--gm-green); }
.gm-pulse-flash.err { border-color: var(--gm-red); }
@keyframes gmPulseFlash {
  0%   { width: 10px; height: 10px; margin-left:-5px; margin-top:-5px; opacity: 0.9; }
  100% { width: 200px; height: 200px; margin-left:-100px; margin-top:-100px; opacity: 0; }
}

/* ── Phase 8: Deep Dive Slide Panel ──────────────────────────────────────── */
.gm-dive-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0;
  overflow: hidden;
  background: rgba(3,6,14,0.97);
  border-top: 1px solid rgba(255,124,105,0.22);
  z-index: 28;
  display: flex;
  flex-direction: column;
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.gm-dive-panel.open { height: 195px; }
.gm-dive-header {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 0.5rem;
}
.gm-dive-icon { font-size: 0.85rem; flex-shrink: 0; }
.gm-dive-title {
  font-family: var(--gm-font);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  flex: 1;
}
.gm-dive-atom {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
}
.gm-dive-close {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.6rem;
  padding: 2px 6px;
  transition: color 0.15s, border-color 0.15s;
}
.gm-dive-close:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }
.gm-dive-packages {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,124,105,0.3) transparent;
}
.gm-dive-pkg {
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px;
  padding: 0.4rem 0.6rem;
  min-width: 130px;
  max-width: 155px;
  font-family: var(--gm-font);
  transition: border-color 0.15s;
}
.gm-dive-pkg:hover { border-color: rgba(255,124,105,0.25); }
.gm-dive-pkg-name {
  font-size: 0.55rem;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  line-height: 1.35;
  margin-bottom: 4px;
}
.gm-dive-pkg-version {
  display: inline-block;
  font-size: 0.46rem;
  font-weight: 700;
  color: var(--gm-coral);
  background: rgba(255,124,105,0.1);
  padding: 1px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
}
.gm-dive-pkg-date {
  font-size: 0.43rem;
  color: rgba(255,255,255,0.22);
  display: block;
}
.gm-dive-loading, .gm-dive-empty {
  padding: 1rem;
  font-family: var(--gm-font);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.22);
  text-align: center;
  width: 100%;
  align-self: center;
}

/* ── Phase 8: Activity Radar ─────────────────────────────────────────────── */
#gm-activity-radar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.gm-radar-wrap {
  position: relative;
  width: 260px;
  height: 260px;
}
.gm-radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid;
  animation: gmRadarPing ease-out infinite;
}
@keyframes gmRadarPing {
  0%   { transform: scale(0.15); opacity: 0.8; }
  100% { transform: scale(1.3);  opacity: 0; }
}
.gm-radar-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--gm-font);
  text-align: center;
  padding: 0 1.5rem;
}
.gm-radar-eyebrow {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.15rem;
}
.gm-radar-number {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.gm-radar-number small { font-size: 1.4rem; font-weight: 600; opacity: 0.7; }
.gm-radar-sub {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
}

/* ── Phase 8: Process view container ─────────────────────────────────────── */
#gm-proc-view {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
}
