/* ═══════════════════════════════════════════════════════════════
   VOLTLINGO v4 — MAP.CSS
   Map screen · Hero · XP bar · Node path
   Section banners · Chest nodes · Daily review
═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   1. MAP HERO
────────────────────────────────────────────────────────────── */
.map-hero {
  padding: 16px 16px 8px;
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.map-hero-text { flex: 1; min-width: 0; }
.map-hero-text h1 {
  font-size: 20px; font-weight: 800; letter-spacing: -.6px; line-height: 1.25;
}
.map-hero-text h1 em {
  font-style: normal;
  background: linear-gradient(125deg, var(--y), #FF9500);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.map-hero-text p {
  font-family: var(--mono); font-size: 8px; color: var(--t2);
  margin-top: 5px; text-transform: uppercase; letter-spacing: .5px;
}
.streak-row {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--ok);
}

/* ──────────────────────────────────────────────────────────────
   2. XP BAR
────────────────────────────────────────────────────────────── */
.xp-bar-wrap { padding: 4px 16px 10px; flex-shrink: 0; }
.xp-bar-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.xp-bar-top span:first-child { font-family: var(--mono); font-size: 9px; color: var(--t2); }
#xp-count { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--y); }
.xp-rail {
  height: 8px; background: var(--bg3); border-radius: 4px;
  overflow: hidden; border: 1px solid var(--line); position: relative;
}
.xp-rail::before {
  content: '';  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0px, transparent 19px,
    rgba(255,255,255,.02) 19px, rgba(255,255,255,.02) 20px);
  pointer-events: none;
}
.xp-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--y3), var(--y));
  box-shadow: 0 0 10px rgba(255,214,10,.45);
  transition: width 1.1s cubic-bezier(.34,1.2,.64,1);
  position: relative;
}
.xp-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.25) 50%, transparent 100%);
  background-size: 200%;
  animation: xpShimmer 2.5s ease-in-out infinite;
}
@keyframes xpShimmer { 0%{background-position:-200%} 100%{background-position:200%} }

/* ──────────────────────────────────────────────────────────────
   3. PATH MAP CONTAINER
────────────────────────────────────────────────────────────── */
.path-map {
  padding: 6px 16px 28px;
  display: flex; flex-direction: column; gap: 0;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────
   4. SECTION BANNER
────────────────────────────────────────────────────────────── */
.sec-banner {
  border-radius: var(--r3); padding: 12px 15px; margin-bottom: 3px;
  display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden;
  cursor: pointer; transition: box-shadow .2s;
  flex-shrink: 0;
}
.sec-banner:hover { box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.sec-banner::before {
  content: ''; position: absolute; top: -50%; right: -25%; width: 55%; height: 200%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.016) 50%, transparent 100%);
  transform: skewX(-12deg); pointer-events: none;
}
.sec-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.sec-banner:hover .sec-ico { transform: scale(1.08) rotate(-4deg); }
.sec-ico svg { width: 22px; height: 22px; }
.sec-info { flex: 1; min-width: 0; }
.sec-info h3 { font-size: 14px; font-weight: 800; letter-spacing: -.3px; }
.sec-info p  { font-family: var(--mono); font-size: 8.5px; margin-top: 2px; opacity: .6; text-transform: uppercase; letter-spacing: .3px; }
.sec-badge {
  font-family: var(--mono); font-size: 7.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 9px;
  text-transform: uppercase; letter-spacing: .5px; flex-shrink: 0;
}

/* Section progress bar */
.sec-prog-bar { height: 2px; background: var(--line); border-radius: 1px; margin: 0 4px 6px; }
.sec-prog-fill { height: 100%; border-radius: 1px; transition: width .8s ease; }

/* ──────────────────────────────────────────────────────────────
   5. NODE PATH
────────────────────────────────────────────────────────────── */
.node-path {
  display: flex; flex-direction: column; align-items: center;
  padding: 2px 0 10px; position: relative;
}

.node-row {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 92px; position: relative;
}
.node-row.pos-left   { justify-content: flex-start; padding-left:  15%; }
.node-row.pos-center { justify-content: center; }
.node-row.pos-right  { justify-content: flex-end;  padding-right: 15%; }

/* Connector line between nodes */
.node-row::before {
  content: ''; position: absolute; left: 50%; top: -20px;
  width: 2px; height: 24px; transform: translateX(-50%);
  background: var(--ln2); border-radius: 1px; z-index: 0;
}
.node-row:first-child::before { display: none; }
.node-row.pos-left::before, .node-row.pos-right::before { display: none; }

/* Node button */
.node-btn {
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; z-index: 1; border: 3px solid;
  user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.node-btn:active { transform: scale(.91) !important; }
.node-btn svg    { width: 26px; height: 26px; pointer-events: none; }

/* Label below node */
.node-label {
  position: absolute; width: 120px; text-align: center;
  top: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  font-family: var(--syne); font-size: 9px; font-weight: 700;
  line-height: 1.3; color: var(--t2); pointer-events: none;
}

/* ── Done ── */
.node-done {
  background: rgba(34,197,94,.1); border-color: var(--ok); color: var(--ok);
  box-shadow: 0 0 0 3px rgba(34,197,94,.1), 0 4px 16px rgba(34,197,94,.08);
}
.node-done:hover {
  transform: scale(1.06);
  box-shadow: 0 0 0 5px rgba(34,197,94,.15), 0 6px 20px rgba(34,197,94,.12);
}

/* ── Current (animated pulse) ── */
.node-current {
  background: var(--yg); border-color: var(--y); color: var(--y);
  animation: nodePulse 2.2s ease-in-out infinite;
}
.node-current:hover { transform: scale(1.08); }
.node-current .node-label { color: var(--y); }

@keyframes nodePulse {
  0%,100% {
    box-shadow: 0 0 0 3px rgba(255,214,10,.18),
                0 0 22px rgba(255,214,10,.28),
                0 6px 20px rgba(255,214,10,.12);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255,214,10,.10),
                0 0 38px rgba(255,214,10,.48),
                0 6px 28px rgba(255,214,10,.22);
  }
}

/* ── Locked ── */
.node-locked {
  background: var(--bg2); border-color: var(--ln2); color: var(--t3);
  cursor: not-allowed; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.node-locked:active { transform: scale(1) !important; }

/* ── Premium ── */
.node-pro {
  background: rgba(167,139,250,.06); border-color: rgba(167,139,250,.28);
  color: var(--pur);
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.node-pro:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(167,139,250,.15), 0 4px 14px rgba(0,0,0,.2);
}

/* ──────────────────────────────────────────────────────────────
   6. CHEST (section reward)
────────────────────────────────────────────────────────────── */
.chest-row {
  display: flex; flex-direction: column; align-items: center;
  height: 74px; position: relative;
}
.chest-row::before {
  content: ''; position: absolute; left: 50%; top: -18px;
  width: 2px; height: 22px; transform: translateX(-50%);
  background: var(--ln2); border-radius: 1px;
}
.chest-btn {
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(245,158,11,.05));
  border: 2px solid rgba(245,158,11,.35); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
  animation: chestGlow 2.8s ease-in-out infinite;
}
.chest-btn:hover    { transform: scale(1.1); border-color: var(--gold); }
.chest-btn:active   { transform: scale(.94); }
.chest-btn.opened   { opacity: .3; cursor: default; animation: none; }
.chest-btn.opened:hover { transform: none; }
.chest-btn svg      { width: 28px; height: 28px; }
.chest-label {
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  color: var(--gold); margin-top: 4px;
}
@keyframes chestGlow {
  0%,100% { box-shadow: 0 0 16px rgba(245,158,11,.15), 0 3px 10px rgba(0,0,0,.3); }
  50%      { box-shadow: 0 0 32px rgba(245,158,11,.38), 0 3px 14px rgba(0,0,0,.3); }
}

/* ──────────────────────────────────────────────────────────────
   7. DAILY REVIEW BUTTON
────────────────────────────────────────────────────────────── */
.daily-review {
  margin: 4px 0 10px; padding: 15px 16px; border-radius: var(--r3);
  background: rgba(255,214,10,.05); border: 1.5px solid rgba(255,214,10,.18);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.daily-review:hover {
  background: rgba(255,214,10,.09); border-color: rgba(255,214,10,.35);
  box-shadow: 0 4px 20px rgba(255,214,10,.1);
}
.daily-review:active { transform: scale(.98); }
.daily-review::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(to left, rgba(255,214,10,.04), transparent);
  pointer-events: none;
}
.dr-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.2);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.daily-review:hover .dr-ico { transform: rotate(-8deg) scale(1.06); }
.dr-ico svg { width: 23px; height: 23px; color: var(--y); }
.dr-text strong { display: block; font-size: 14px; font-weight: 800; color: var(--y); letter-spacing: -.3px; }
.dr-text small  { font-family: var(--mono); font-size: 9px; color: var(--t2); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; display: block; }
.dr-arrow {
  margin-left: auto; color: var(--y); opacity: .5; flex-shrink: 0;
  transition: all .2s;
}
.daily-review:hover .dr-arrow { opacity: 1; transform: translateX(4px); }

/* ──────────────────────────────────────────────────────────────
   8. RESPONSIVE
────────────────────────────────────────────────────────────── */
@media (max-width: 360px) {
  .node-btn   { width: 66px; height: 66px; }
  .node-label { font-size: 8.5px; width: 108px; }
  .map-hero-text h1 { font-size: 17px; }
}
@media (min-width: 480px) {
  .path-map    { max-width: 420px; margin: 0 auto; }
  .map-hero    { padding: 20px 24px 10px; }
  .xp-bar-wrap { padding: 4px 24px 12px; }
}

/* ──────────────────────────────────────────────────────────────
   DAILY CHALLENGE CARD
────────────────────────────────────────────────────────────── */
.daily-challenge {
  margin: 4px 0 6px; padding: 15px 16px; border-radius: var(--r3);
  background: linear-gradient(135deg, rgba(255,214,10,.07), rgba(255,214,10,.03));
  border: 1.5px solid rgba(255,214,10,.3);
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; transition: all .2s; position: relative; overflow: hidden;
}
.daily-challenge::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,214,10,.04), transparent);
  animation: dcShimmer 3s ease-in-out infinite;
}
@keyframes dcShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.daily-challenge:hover {
  background: linear-gradient(135deg, rgba(255,214,10,.12), rgba(255,214,10,.06));
  border-color: rgba(255,214,10,.55);
  box-shadow: 0 4px 20px rgba(255,214,10,.12);
  transform: translateY(-1px);
}
.daily-challenge:active { transform: scale(.98); }

.daily-challenge.dc-done {
  background: rgba(34,197,94,.06);
  border-color: rgba(34,197,94,.25);
  cursor: default;
  animation: none;
}
.daily-challenge.dc-done::before { display: none; }
.daily-challenge.dc-done:hover {
  transform: none; box-shadow: none;
  background: rgba(34,197,94,.06);
  border-color: rgba(34,197,94,.3);
}

.dc-ico {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,214,10,.08); border: 1px solid rgba(255,214,10,.2);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.daily-challenge.dc-done .dc-ico {
  background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.2);
}
.daily-challenge:not(.dc-done):hover .dc-ico {
  transform: rotate(-8deg) scale(1.08);
}

.dc-text strong {
  display: block; font-size: 14px; font-weight: 800;
  color: var(--y); letter-spacing: -.3px;
}
.daily-challenge.dc-done .dc-text strong { color: var(--ok); }
.dc-text small {
  font-family: var(--mono); font-size: 9px; color: var(--t2);
  text-transform: uppercase; letter-spacing: .5px;
  margin-top: 3px; display: block;
}

.dc-badge {
  margin-left: auto; padding: 5px 11px; border-radius: 9px;
  background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--ok); letter-spacing: .8px; flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────────
   TEST OUT BUTTON
────────────────────────────────────────────────────────────── */
.testout-btn {
  position: absolute; top: 9px; right: 9px;
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase;
  background: rgba(255,214,10,.1); border: 1px solid rgba(255,214,10,.3);
  color: var(--y); cursor: pointer;
  transition: all .18s; flex-shrink: 0;
}
.testout-btn:hover {
  background: rgba(255,214,10,.2);
  border-color: rgba(255,214,10,.6);
  box-shadow: 0 0 10px rgba(255,214,10,.2);
  transform: scale(1.04);
}
.testout-btn:active { transform: scale(.97); }
.testout-btn.testout-failed {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
  color: var(--t3); cursor: default;
}
.testout-btn.testout-failed:hover {
  transform: none; box-shadow: none;
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
}
/* Make banner relative so button can be absolute */
.sec-banner { position: relative; }