/* ══════════════════════════════════════════════════════════════
   ROADMAP — WINDING GAME MAP  (complete rewrite v4)
   ══════════════════════════════════════════════════════════════ */

/* ── Sticky header ── */
.map-header-inner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 12, 24, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 14px 18px 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.map-title { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.map-title span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.map-progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.map-prog-track { flex: 1; height: 8px; background: rgba(255,255,255,.07); border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.map-prog-fill  { height: 100%; background: linear-gradient(90deg,#3b82f6,#6366f1,#8b5cf6); border-radius: 10px; transition: width .6s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 12px rgba(99,102,241,.5); }
.map-prog-lbl   { font-size: 12px; color: var(--text2); white-space: nowrap; font-weight: 700; }
.cat-tabs-scroll { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cat-tabs-scroll::-webkit-scrollbar { display: none; }
.rm-cat-tab {
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: all .2s;
}
.rm-cat-tab:hover { background: rgba(255,255,255,.09); color: rgba(255,255,255,.8); }
.rm-cat-tab.active {
  border-color: #3B82F6;
  color: #fff;
  background: rgba(59,130,246,.2);
  box-shadow: 0 0 12px rgba(59,130,246,.3);
}

/* ─────────────────────────────────────────────────────────────
   MAIN SCREEN
   ───────────────────────────────────────────────────────────── */
#screen-roadmap {
  background: #05080f;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

#roadmap-150-content {
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   CATEGORY SECTION
   ───────────────────────────────────────────────────────────── */
.rm-cat-section {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
}

/* Dot texture overlay */
.rm-cat-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Bottom atmospheric glow */
.rm-cat-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 90% 45% at 50% 115%, var(--zone-glow, rgba(99,102,241,.2)), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Zone label header ── */
.rm-cat-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 12px;
  position: relative;
  z-index: 5;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 100%);
}
.rm-cat-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.18);
}
.rm-cat-hdr h3 {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
  letter-spacing: .3px;
}
.rm-cat-hdr p   { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 2px; }
.rm-cat-pct {
  margin-right: auto;
  font-size: 13px;
  font-weight: 900;
  background: rgba(0,0,0,.5);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 4px 11px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.rm-divider { height: 2px; margin: 0 18px; border-radius: 2px; opacity: .45; }

/* ─────────────────────────────────────────────────────────────
   WINDING PATH ZONE
   ───────────────────────────────────────────────────────────── */
.rm-path-zone {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  overflow: visible;
  z-index: 5;
}

.rm-path-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   ABSOLUTE-POSITIONED NODES
   ───────────────────────────────────────────────────────────── */
.rm-node-abs {
  position: absolute;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 10;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   NODE CIRCLES
   ───────────────────────────────────────────────────────────── */
.rm-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rm-node-abs:active .rm-circle {
  transform: translateY(4px) scale(.96);
  box-shadow: 0 2px 0 rgba(0,0,0,.5), 0 4px 10px rgba(0,0,0,.5) !important;
}

/* LOCKED */
.rm-circle.rm-locked {
  background: linear-gradient(145deg, #3a4555, #272f3f);
  border: 3px solid rgba(255,255,255,.10);
  box-shadow:
    0 6px 0 rgba(0,0,0,.55),
    0 8px 22px rgba(0,0,0,.45),
    inset 0 2px 4px rgba(255,255,255,.06);
  color: rgba(255,255,255,.2);
  cursor: not-allowed;
}

/* CURRENT — glowing blue */
.rm-circle.rm-current {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: 3px solid #93c5fd;
  box-shadow:
    0 6px 0 #1d4ed8,
    0 0 30px rgba(99,102,241,.75),
    0 0 0 8px rgba(99,102,241,.15),
    inset 0 2px 4px rgba(255,255,255,.35);
  color: #fff;
  animation: rm-pulse 2s ease-in-out infinite;
}

/* DONE — category color */
.rm-circle.rm-done {
  background: var(--cat-clr, #22c55e);
  border: 3px solid rgba(255,255,255,.5);
  box-shadow:
    0 6px 0 rgba(0,0,0,.4),
    0 8px 24px rgba(0,0,0,.3),
    0 0 20px var(--cat-clr, #22c55e),
    inset 0 2px 4px rgba(255,255,255,.3);
  color: #fff;
}

@keyframes rm-pulse {
  0%, 100% {
    box-shadow:
      0 6px 0 #1d4ed8,
      0 0 30px rgba(99,102,241,.7),
      0 0 0 8px rgba(99,102,241,.15),
      inset 0 2px 4px rgba(255,255,255,.35);
  }
  50% {
    box-shadow:
      0 6px 0 #1d4ed8,
      0 0 44px rgba(99,102,241,.95),
      0 0 0 14px rgba(99,102,241,.1),
      inset 0 2px 4px rgba(255,255,255,.35);
  }
}

/* Current node ripple ring */
.rm-cur-ring {
  position: absolute;
  top: 0; left: 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2.5px solid var(--rc, #6366f1);
  animation: rm-ring 2s ease-out infinite;
  pointer-events: none;
  z-index: 11;
}
@keyframes rm-ring {
  0%   { transform: scale(1);    opacity: 0.9; }
  100% { transform: scale(1.85); opacity: 0;   }
}

/* Lock badge */
.rm-lock-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: #141c2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: 2px solid rgba(255,255,255,.1);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Stars / label / xp */
.rm-node-stars { display: flex; gap: 1px; margin-top: 3px; }
.rm-node-star  { font-size: 11px; opacity: .18; color: #f5c842; filter: grayscale(1); line-height: 1; }
.rm-node-star.on { opacity: 1; filter: none; text-shadow: 0 0 6px rgba(245,200,66,.7); }
.rm-node-label {
  font-size: 9px;
  color: rgba(255,255,255,.78);
  text-align: center;
  max-width: 80px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  font-weight: 700;
}
.rm-node-xp {
  font-size: 8px;
  font-weight: 700;
  background: rgba(99,102,241,.22);
  border: 1px solid rgba(99,102,241,.38);
  border-radius: 8px;
  padding: 1px 7px;
  color: #c7d2fe;
}

/* Current arrow */
.rm-cur-arrow {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  animation: rm-arr 0.85s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.7));
  z-index: 12;
}
@keyframes rm-arr {
  0%, 100% { transform: translateX(-50%) translateY(0px); }
  50%       { transform: translateX(-50%) translateY(-6px); }
}

/* ══════════════════════════════════════════════════════════════
   ZONE BACKGROUNDS — deep atmospheric environments
   ══════════════════════════════════════════════════════════════ */

/* Signs — deep crimson night city */
.rm-zone-signs {
  --zone-clr: #EF4444; --zone-glow: rgba(239,68,68,.32);
  border-top: 3px solid #EF4444;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(239,68,68,.18)  0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 15% 45%,  rgba(239,68,68,.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 85% 75%,  rgba(185,28,28,.09)  0%, transparent 55%),
    linear-gradient(180deg, #100405 0%, #070204 55%, #040308 100%);
}

/* Priority — warm amber */
.rm-zone-priority {
  --zone-clr: #F59E0B; --zone-glow: rgba(245,158,11,.32);
  border-top: 3px solid #F59E0B;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(245,158,11,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 20% 50%,  rgba(217,119,6,.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 80% 75%,  rgba(245,158,11,.09) 0%, transparent 55%),
    linear-gradient(180deg, #0f0800 0%, #080500 55%, #060409 100%);
}

/* Speed — deep blue highway */
.rm-zone-speed {
  --zone-clr: #3B82F6; --zone-glow: rgba(59,130,246,.32);
  border-top: 3px solid #3B82F6;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(59,130,246,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 15% 50%,  rgba(37,99,235,.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 85% 75%,  rgba(59,130,246,.09) 0%, transparent 55%),
    linear-gradient(180deg, #020611 0%, #020409 55%, #020308 100%);
}

/* Danger — electric violet storm */
.rm-zone-danger {
  --zone-clr: #8B5CF6; --zone-glow: rgba(139,92,246,.32);
  border-top: 3px solid #8B5CF6;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(139,92,246,.2)  0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 20% 50%,  rgba(109,40,217,.08) 0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 80% 75%,  rgba(139,92,246,.1)  0%, transparent 55%),
    linear-gradient(180deg, #070312 0%, #04030d 55%, #030309 100%);
}

/* Safety — deep emerald forest */
.rm-zone-safety {
  --zone-clr: #10B981; --zone-glow: rgba(16,185,129,.32);
  border-top: 3px solid #10B981;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(16,185,129,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 15% 50%,  rgba(5,150,105,.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 85% 75%,  rgba(16,185,129,.09) 0%, transparent 55%),
    linear-gradient(180deg, #020e08 0%, #020a07 55%, #020608 100%);
}

/* Cross — warm orange intersection */
.rm-zone-cross {
  --zone-clr: #F97316; --zone-glow: rgba(249,115,22,.32);
  border-top: 3px solid #F97316;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(249,115,22,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 20% 50%,  rgba(234,88,12,.07)  0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 80% 75%,  rgba(249,115,22,.09) 0%, transparent 55%),
    linear-gradient(180deg, #0a0400 0%, #070400 55%, #050308 100%);
}

/* Highway — deep teal open road */
.rm-zone-highway {
  --zone-clr: #06B6D4; --zone-glow: rgba(6,182,212,.32);
  border-top: 3px solid #06B6D4;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(6,182,212,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 15% 50%,  rgba(8,145,178,.07) 0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 85% 75%,  rgba(6,182,212,.09) 0%, transparent 55%),
    linear-gradient(180deg, #000c11 0%, #000b0f 55%, #020609 100%);
}

/* Maneuver — deep magenta mountain */
.rm-zone-maneuver {
  --zone-clr: #EC4899; --zone-glow: rgba(236,72,153,.32);
  border-top: 3px solid #EC4899;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(236,72,153,.2)  0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 20% 50%,  rgba(219,39,119,.08) 0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 80% 75%,  rgba(236,72,153,.1)  0%, transparent 55%),
    linear-gradient(180deg, #0d0209 0%, #0b0207 55%, #070308 100%);
}

/* Lights — neon lime city night */
.rm-zone-lights {
  --zone-clr: #84CC16; --zone-glow: rgba(132,204,22,.32);
  border-top: 3px solid #84CC16;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(132,204,22,.17) 0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 15% 50%,  rgba(101,163,13,.07) 0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 85% 75%,  rgba(132,204,22,.09) 0%, transparent 55%),
    linear-gradient(180deg, #050900 0%, #050700 55%, #040609 100%);
}

/* Expert — indigo cosmos */
.rm-zone-expert {
  --zone-clr: #6366F1; --zone-glow: rgba(99,102,241,.38);
  border-top: 3px solid #6366F1;
  background:
    radial-gradient(ellipse 130% 55% at 50% 0%,   rgba(99,102,241,.25)  0%, transparent 65%),
    radial-gradient(ellipse 70%  60% at 20% 50%,  rgba(79,70,229,.1)    0%, transparent 55%),
    radial-gradient(ellipse 70%  60% at 80% 75%,  rgba(99,102,241,.12)  0%, transparent 55%),
    linear-gradient(180deg, #030312 0%, #03030d 55%, #030309 100%);
}

/* ─────────────────────────────────────────────────────────────
   ZONE TRANSITION
   ───────────────────────────────────────────────────────────── */
.rm-zone-transition {
  position: relative;
  z-index: 10;
  background: #050810;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 24px;
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.rm-zone-transition::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(99,102,241,.06), transparent 70%);
  pointer-events: none;
}

/* Speech bubble */
.rm-bridge-speech {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #e8f0ff;
  max-width: 180px;
  text-align: center;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
  animation: rm-speech-pop 0.5s cubic-bezier(.34,1.56,.64,1) both;
}
.rm-bridge-speech::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: rgba(255,255,255,.16);
}
.rm-speech-emoji { margin-left: 7px; font-size: 18px; }
@keyframes rm-speech-pop {
  from { transform: scale(.6) translateY(8px); opacity: 0; }
  to   { transform: scale(1)  translateY(0);   opacity: 1; }
}

/* Next section pill */
.rm-bridge-next-label {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 6px 16px;
  letter-spacing: .3px;
}

/* Legacy classes — kept to avoid JS breakage */
.rm-char-bridge   { display: none; }
.rm-bridge-side   { display: none; }
.rm-bridge-center { display: none; }
.rm-bridge-char-slot { display: none; }
.rm-bridge-road   { display: none; }
.rm-bridge-dashes { display: none; }
.rm-bridge-char   { display: none; }
.rm-char-bridge-big { min-height: 0; }
.rm-levels-wrap   { display: none; }
.rm-level-row     { display: none; }
.rm-node          { display: none; }

/* ─────────────────────────────────────────────────────────────
   POPUP
   ───────────────────────────────────────────────────────────── */
.rm-popup-top   { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rm-popup-icon  {
  width: 58px; height: 58px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.15);
}
.rm-popup-stats { display: flex; gap: 8px; margin-bottom: 16px; }
.rm-stat {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  transition: background .2s;
}
.rm-stat:hover  { background: rgba(99,102,241,.08); }
.rm-stat-val    { font-size: 20px; font-weight: 900; }
.rm-stat-lbl    { font-size: 10px; color: var(--text2); margin-top: 2px; }
.rm-stars       { text-align: center; font-size: 26px; letter-spacing: 5px; margin-bottom: 16px; opacity: .2; transition: opacity .3s; }
.rm-stars.has-stars { opacity: 1; }
.btn-full { width: 100%; }
