/* ============================================================
   GONDOLATI SPIRÁL – MINDMAP STYLESHEET v2
   Szekciók:
    1. Reset & CSS Variables
    2. Scrollbar
    3. Base / Typography
    4. Particle canvas
    5. PIN képernyő
    6. App shell (header, canvas)
    7. Breadcrumb trail
    8. Journey panel
    9. Minimap
   10. SVG node & él stílusok
   11. Tooltip
   12. Context menü
   13. Szűrő dropdown
   14. Animációk & keyframes
   15. Reszponzivitás
   ============================================================ */


/* ============================================================
   1. RESET & CSS VARIABLES
   ============================================================ */
:root {
  --bg-color:          #080808;
  --terminal-bg:       rgba(13, 13, 13, 0.95);
  --text-primary:      #ffffff;
  --text-secondary:    #888888;
  --text-desc-pc:      #d61d1d;
  --accent-green:      #22c55e;
  --accent-orange:     #ffa500;
  --accent-blue:       #3b82f6;
  --accent-pink:       #ec4899;
  --accent-yellow:     #eab308;
  --window-border:     rgba(255, 255, 255, 0.1);
  --font-mono:         'Space Mono', monospace;
  --font-sans:         'Inter', sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  --header-h:     3.5rem;
  --breadcrumb-h: 2.25rem;
  --minimap-w:    180px;
  --minimap-h:    130px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}


/* ============================================================
   2. SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-left: 1px solid rgba(255,255,255,0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
  border: 2px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) var(--bg-color); }


/* ============================================================
   3. BASE / TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
button:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}


/* ============================================================
   4. PARTICLE CANVAS
   ============================================================ */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;          /* Minden mögött */
  pointer-events: none;
  opacity: 0.55;
}


/* ============================================================
   5. PIN KÉPERNYŐ
   ============================================================ */
#pin-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Háttér nincs – particle canvas látszik alatta */
  transition: opacity 0.6s var(--transition-smooth),
              transform 0.6s var(--transition-smooth);
}

/* Finom rács a PIN mögé */
#pin-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

.pin-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  width: min(420px, 92vw);
  background: var(--terminal-bg);
  border: 1px solid var(--window-border);
  border-radius: 1.5rem;
  backdrop-filter: blur(24px);
  animation: pinContainerIn 0.7s var(--transition-smooth) both;
}

.pin-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(230,57,70,0.22) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(28px);
  animation: glowPulse 4s ease-in-out infinite;
}

.pin-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.pin-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(230,57,70,0.12);
  border: 1px solid rgba(230,57,70,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.pin-lock-icon {
  font-size: 1.6rem;
  color: var(--text-desc-pc);
  display: inline-block;
  animation: hexSpin 12s linear infinite;
}

.pin-title {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.pin-subtitle {
  font-size: clamp(0.75rem, 2vw, 0.85rem);
  color: var(--text-secondary);
  font-weight: 300;
}

/* Dot kijelző */
.pin-display {
  display: flex;
  gap: 1rem;
  margin: 0.25rem 0;
}

.pin-dot {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.18);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pin-dot.filled  { background: var(--text-desc-pc); border-color: var(--text-desc-pc); transform: scale(1.15); box-shadow: 0 0 8px rgba(214,29,29,0.6); }
.pin-dot.success { background: var(--accent-green); border-color: var(--accent-green); box-shadow: 0 0 10px rgba(34,197,94,0.6); }
.pin-dot.error   { background: var(--text-desc-pc); border-color: var(--text-desc-pc); animation: shake 0.4s ease; }

.pin-error {
  font-size: 0.8rem;
  color: var(--text-desc-pc);
  font-family: var(--font-mono);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  min-height: 1.2em;
}
.pin-error.visible { opacity: 1; transform: translateY(0); }

/* Billentyűzet */
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.pin-key {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--window-border);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:hover  { background: rgba(255,255,255,0.1); box-shadow: 0 0 12px rgba(255,255,255,0.06); }
.pin-key:active { transform: scale(0.93); background: rgba(255,255,255,0.15); }
.pin-key--action  { color: var(--text-secondary); font-size: 1rem; }
.pin-key--confirm { background: rgba(230,57,70,0.15); border-color: rgba(230,57,70,0.4); color: var(--text-desc-pc); font-size: 1.2rem; }
.pin-key--confirm:hover { background: rgba(230,57,70,0.28); box-shadow: 0 0 16px rgba(214,29,29,0.3); }

#pin-screen.pin-exit {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}


/* ============================================================
   6. APP SHELL
   ============================================================ */
.app-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--transition-smooth);
}
.app-hidden.app-visible {
  opacity: 1;
  pointer-events: all;
}

/* Header */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(8,8,8,0.88);
  border-bottom: 1px solid var(--window-border);
  backdrop-filter: blur(18px);
  gap: 0.5rem;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.app-header__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-desc-pc);
  animation: dotPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

.app-header__title {
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2vw, 0.9rem);
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-header__controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Ctrl gombok */
.ctrl-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--window-border);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.ctrl-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.1); }

.ctrl-btn--reset {
  color: var(--accent-orange);
  border-color: rgba(255,165,0,0.28);
}
.ctrl-btn--reset:hover { background: rgba(255,165,0,0.1); box-shadow: 0 0 12px rgba(255,165,0,0.18); }

.ctrl-btn--journey {
  color: var(--accent-green);
  border-color: rgba(34,197,94,0.28);
}
.ctrl-btn--journey:hover { background: rgba(34,197,94,0.1); box-shadow: 0 0 12px rgba(34,197,94,0.18); }
.ctrl-btn--journey.active {
  background: rgba(34,197,94,0.15);
  color: var(--accent-green);
  box-shadow: 0 0 14px rgba(34,197,94,0.25);
}

.ctrl-btn--filter {
  color: var(--accent-blue);
  border-color: rgba(59,130,246,0.28);
}
.ctrl-btn--filter:hover { background: rgba(59,130,246,0.1); }
.ctrl-btn--filter.active {
  background: rgba(59,130,246,0.15);
  color: var(--accent-blue);
}

/* Fókusz badge */
.focus-badge {
  display: none;
  padding: 0.22rem 0.6rem;
  border-radius: 2rem;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  white-space: nowrap;
}
.focus-badge.active {
  display: inline-block;
  animation: badgePop 0.3s var(--transition-smooth) both;
}

/* Canvas */
.canvas-wrapper {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  overflow: hidden;
  cursor: grab;
  /* Pont-mátrix háttér a mélység érzékeltetéséhez */
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
.canvas-wrapper.is-dragging { cursor: grabbing; }

#mindmap-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  /* transform JS-ből */
}


/* ============================================================
   7. BREADCRUMB TRAIL
   ============================================================ */
.breadcrumb {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--breadcrumb-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(8,8,8,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  /* Alapból rejtett */
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.35s var(--transition-smooth),
              transform 0.35s var(--transition-smooth);
  pointer-events: none;
}

.breadcrumb[aria-hidden="false"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px; /* scrollbar tér */
}

/* Breadcrumb elemek – JS generálja */
.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}
.breadcrumb__item:hover { color: var(--text-primary); }
.breadcrumb__item.active { color: var(--text-primary); }

/* Elválasztó nyíl */
.breadcrumb__sep {
  color: rgba(255,255,255,0.2);
  font-size: 0.65rem;
  user-select: none;
}

/* Ha breadcrumb látszik, a canvas lejjebb kezdődik */
.canvas-wrapper.breadcrumb-visible {
  top: calc(var(--header-h) + var(--breadcrumb-h));
}


/* ============================================================
   8. JOURNEY PANEL
   ============================================================ */
.journey-panel {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  z-index: 150;
  width: min(420px, 90vw);
  background: rgba(10,10,16,0.96);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,197,94,0.1);
  transition: transform 0.45s var(--transition-smooth),
              opacity 0.45s var(--transition-smooth);
  opacity: 0;
  pointer-events: none;
}

.journey-panel[aria-hidden="false"] {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.journey-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.journey-panel__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-green);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journey-panel__close {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}
.journey-panel__close:hover { color: var(--text-primary); background: rgba(255,255,255,0.12); }

/* Lépés leírása */
.journey-panel__desc {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.55;
  min-height: 2.8rem;
  margin-bottom: 1rem;
  transition: opacity 0.3s ease;
}
.journey-panel__desc.fading { opacity: 0; }

.journey-panel__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.journey-btn {
  padding: 0.4rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: color 0.2s ease, background 0.2s ease;
}
.journey-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.12); }
.journey-btn:disabled { opacity: 0.3; pointer-events: none; }

.journey-btn--next {
  color: var(--accent-green);
  border-color: rgba(34,197,94,0.28);
}
.journey-btn--next:hover { background: rgba(34,197,94,0.12); }

.journey-counter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Lépés dot-ok */
.journey-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}

.journey-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.25s ease, transform 0.25s ease;
}
.journey-dot.active {
  background: var(--accent-green);
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
}


/* ============================================================
   9. MINIMAP
   ============================================================ */
.minimap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  width: var(--minimap-w);
  height: var(--minimap-h);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(10px);
  cursor: pointer;
  /* Belépő animáció */
  animation: minimapIn 0.6s var(--transition-smooth) 1.5s both;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

@keyframes minimapIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Viewport jelző doboz a minimapen */
.minimap-viewport {
  position: absolute;
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 3px;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
  /* Pozíció és méret JS-ből */
  transition: left 0.1s ease, top 0.1s ease, width 0.1s ease, height 0.1s ease;
}


/* ============================================================
   10. SVG NODE & ÉL STÍLUSOK
   ============================================================ */

/* Node csoport */
.node-group {
  cursor: pointer;
}

/* Buborék rect */
.node-bubble {
  transition: filter 0.25s ease, opacity 0.35s ease;
}
.node-group:hover .node-bubble {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,255,255,0.18));
}
.node-group.selected .node-bubble {
  filter: brightness(1.45) drop-shadow(0 0 14px rgba(255,255,255,0.35));
}
.node-group.dimmed .node-bubble,
.node-group.dimmed text {
  opacity: 0.12;
}

/* Összecsukott node vizuális jelzője */
.node-group.collapsed .node-bubble {
  stroke-dasharray: 4 3;
  opacity: 0.7;
}

/* Élek */
.edge-path {
  fill: none;
  stroke-width: 1.5;
  opacity: 0.65;
  transition: opacity 0.35s ease, stroke-width 0.25s ease, filter 0.25s ease;
  /* Animated draw-in: a stroke-dasharray és stroke-dashoffset JS-ből kerül rá */
}
.edge-path.dashed { stroke-dasharray: 5 4; }
.edge-path.dimmed { opacity: 0.04; }
.edge-path.highlighted {
  opacity: 1;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px currentColor);
}
/* Szűrő alapú dimm */
.edge-path.filtered-out {
  opacity: 0.04;
  pointer-events: none;
}

/* Node szöveg */
.node-text {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  fill: var(--text-primary);
  pointer-events: none;
  dominant-baseline: middle;
  text-anchor: middle;
  transition: opacity 0.35s ease;
}


/* ============================================================
   11. TOOLTIP
   ============================================================ */
.tooltip {
  position: fixed;
  z-index: 300;
  padding: 0.4rem 0.85rem;
  max-width: 240px;
  background: rgba(12,12,18,0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  line-height: 1.45;
  color: var(--text-primary);
  pointer-events: none;
  white-space: normal;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tooltip.visible { opacity: 1; transform: translateY(0); }


/* ============================================================
   12. CONTEXT MENÜ
   ============================================================ */
.context-menu {
  position: fixed;
  z-index: 400;
  min-width: 195px;
  padding: 0.4rem 0;
  background: rgba(10,10,16,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  list-style: none;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  opacity: 0;
  transform: scale(0.94) translateY(-6px);
  pointer-events: none;
  transform-origin: top left;
  transition: opacity 0.18s var(--transition-smooth),
              transform 0.18s var(--transition-smooth);
}
.context-menu.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: all;
}
.context-menu__item {
  padding: 0.52rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
  user-select: none;
}
.context-menu__item:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.context-menu__separator { height: 1px; background: rgba(255,255,255,0.06); margin: 0.3rem 0; }


/* ============================================================
   13. SZŰRŐ DROPDOWN
   ============================================================ */
.filter-wrap {
  position: relative;
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: rgba(10,10,16,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 0.4rem 0;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  /* Alapból rejtett */
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transform-origin: top right;
  transition: opacity 0.2s var(--transition-smooth),
              transform 0.2s var(--transition-smooth);
  z-index: 200;
}
.filter-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.filter-opt:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.filter-opt.active { color: var(--text-primary); }

.filter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ============================================================
   14. ANIMÁCIÓK & KEYFRAMES
   ============================================================ */

@keyframes pinContainerIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes glowPulse {
  0%,100% { opacity: 0.55; transform: translateX(-50%) scale(1);    }
  50%     { opacity: 1;    transform: translateX(-50%) scale(1.08); }
}

@keyframes hexSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes shake {
  0%,100% { transform: translateX(0);    }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px);  }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px);  }
}

@keyframes dotPulse {
  0%,100% { opacity: 1;   box-shadow: 0 0 0   rgba(214,29,29,0.5); }
  50%     { opacity: 0.7; box-shadow: 0 0 8px rgba(214,29,29,0.8); }
}

@keyframes badgePop {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1);   }
}

/* Node megjelenési animáció (JS delay-jel triggereli) */
@keyframes nodeReveal {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1);   }
}

/* Journey lépés highlight pulzálás */
@keyframes journeyPulse {
  0%,100% { filter: brightness(1.3) drop-shadow(0 0 10px rgba(34,197,94,0.5)); }
  50%     { filter: brightness(1.6) drop-shadow(0 0 20px rgba(34,197,94,0.9)); }
}

.node-group.journey-active .node-bubble {
  animation: journeyPulse 1.4s ease-in-out infinite;
}


/* ============================================================
   15. RESZPONZIVITÁS
   ============================================================ */

@media (max-width: 540px) {
  .app-header { padding: 0 0.75rem; gap: 0.25rem; }
  .app-header__title { font-size: 0.6rem; }
  .ctrl-btn { padding: 0.25rem 0.5rem; font-size: 0.7rem; }

  /* Journey panel teljes szélességen */
  .journey-panel { width: 92vw; padding: 1rem 1.1rem; }

  /* Minimap kisebb mobilon */
  .minimap {
    --minimap-w: 130px;
    --minimap-h: 94px;
    bottom: 1rem;
    right: 1rem;
  }

  .pin-container { padding: 2rem 1.25rem; gap: 1.1rem; }
}

@media (max-width: 380px) {
  .app-header__title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}