@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');
 
:root {
  --bg: #02040a;
  --panel: rgba(255, 255, 255, 0.05);
  --accent: #00d4ff;
  --visited: #ff007a;
  --current: #39ff14;
  --backtrack: #2a2a40;
  --start-node: #ffea00;
}
 
body {
  background: var(--bg);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  margin: 0;
  padding: 20px;
}
 
.app-container { max-width: 1250px; margin: 0 auto; text-align: center; }
h1 { letter-spacing: 5px; color: var(--accent); text-shadow: 0 0 15px var(--accent); }
 
.controls {
  background: var(--panel);
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 25px;
  border: 1px solid rgba(255,255,255,0.1);
}
 
.input-row { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
 
select, button {
  background: #111;
  color: #fff;
  border: 1px solid #333;
  padding: 10px 15px;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
}
 
button { border: 1px solid var(--accent); transition: 0.3s; font-weight: bold; }
button:hover { background: var(--accent); color: #000; box-shadow: 0 0 20px var(--accent); }
button.secondary { border-color: #555; color: #888; }
 
.legend { display: flex; justify-content: center; gap: 25px; font-size: 0.8rem; }
.item { display: flex; align-items: center; }
.dot { height: 12px; width: 12px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot.start { background: var(--start-node); box-shadow: 0 0 8px var(--start-node); }
.dot.goal { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot.visited { background: var(--visited); box-shadow: 0 0 8px var(--visited); }
.dot.backtrack { background: var(--backtrack); }
.dot.path { background: var(--accent); border: 1px solid #fff; }
 
/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  background: var(--panel);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 14px 30px;
  margin-bottom: 20px;
}
 
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
 
.stat-label {
  font-size: 0.65rem;
  color: #555;
  letter-spacing: 1px;
  text-transform: uppercase;
}
 
.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
  min-width: 2ch;
  text-align: center;
  transition: all 0.3s ease;
}
 
.main { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
#map { background: #080c14; border-radius: 20px; border: 1px solid #1a2233; width: 100%; min-height: 600px; }
.sidebar { background: var(--panel); border-radius: 20px; padding: 20px; border: 1px solid rgba(255,255,255,0.05); }
 
#visited-log {
  list-style: none;
  padding: 0;
  font-size: 0.82rem;
  color: #8b949e;
  max-height: 550px;
  overflow-y: auto;
  text-align: left;
}
 
#visited-log li { padding: 3px 0; }
 
/* Depth badge next to city name */
.depth-badge {
  display: inline-block;
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}
 
.backtrack-msg { color: #444 !important; font-style: italic; }
.found-msg { color: var(--current) !important; font-weight: bold; margin-top: 6px; }
.not-found-msg { color: var(--visited) !important; font-weight: bold; margin-top: 6px; }
 
.node { fill: #161b22; stroke: #30363d; stroke-width: 3; transition: all 0.4s ease; cursor: pointer; }
.node.selected-start { fill: var(--start-node) !important; stroke: #fff; filter: drop-shadow(0 0 10px var(--start-node)); }
.node.selected-goal { fill: var(--accent) !important; stroke: #fff; filter: drop-shadow(0 0 10px var(--accent)); }
.node.visited { fill: var(--visited) !important; stroke: #fff; filter: drop-shadow(0 0 12px var(--visited)) !important; }
.node.current { fill: var(--current); stroke: #fff; filter: drop-shadow(0 0 20px var(--current)); animation: pulse 1s infinite; }
.node.backtrack { fill: var(--backtrack) !important; stroke: #111; opacity: 0.4; }
.node.path { fill: var(--accent) !important; stroke: #fff; filter: drop-shadow(0 0 15px var(--accent)) drop-shadow(0 0 5px var(--visited)) !important; r: 18; }
 
.edge { stroke: #1f2937; stroke-width: 2; transition: stroke 0.5s; }
.path-edge { stroke: var(--accent); stroke-width: 6; filter: drop-shadow(0 0 10px var(--accent)); stroke-linecap: round; }
.city-label { fill: #8b949e; font-size: 11px; pointer-events: none; }
 
@keyframes pulse { 0% { r: 14; } 50% { r: 20; } 100% { r: 14; } }