﻿.future-city-map {
  display: block;
  margin-top: 20px;
}

#cityHub {
  overflow: hidden;
  border: 1px solid rgba(105, 224, 203, 0.38);
  background: linear-gradient(180deg, rgba(9, 18, 25, 0.96), rgba(6, 12, 17, 0.98));
  box-shadow: inset 0 0 0 1px rgba(105, 224, 203, 0.08), 0 18px 36px rgba(0, 0, 0, 0.25);
}

#cityHub .panel-heading {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(105, 224, 203, 0.24);
  background: rgba(7, 17, 23, 0.92);
}

#cityHub .panel-heading .eyebrow {
  color: #7ae7d7;
  letter-spacing: 1.5px;
}

#cityHub .panel-heading h3 {
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.future-map-shell {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(105, 224, 203, 0.35);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(52, 103, 118, 0.38), rgba(9, 21, 25, 0.8) 42%, rgba(2, 8, 12, 0.96) 100%),
    #061118;
  box-shadow: inset 0 0 90px rgba(105, 224, 203, 0.08), 0 18px 40px rgba(0, 0, 0, 0.26);
}

.future-map-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(105, 224, 203, 0.04), transparent 24%),
    repeating-linear-gradient(0deg, rgba(105, 224, 203, 0.04) 0, rgba(105, 224, 203, 0.04) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(105, 224, 203, 0.04) 0, rgba(105, 224, 203, 0.04) 1px, transparent 1px, transparent 24px);
  opacity: 0.9;
  pointer-events: none;
}

.future-map-shell::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(105, 224, 203, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.future-map-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 520px;
}

.future-orbit {
  fill: none;
  stroke: rgba(105, 224, 203, 0.78);
  stroke-width: 1.2;
  stroke-dasharray: 2 12;
  opacity: 0.8;
}

.future-signal {
  fill: none;
  stroke: rgba(105, 224, 203, 0.34);
  stroke-width: 1;
  stroke-dasharray: 3 10;
  opacity: 0.75;
}

.future-core-glow {
  pointer-events: none;
}

.future-core {
  transform-box: fill-box;
  transform-origin: center;
}

.future-core circle {
  fill: rgba(9, 32, 38, 0.94);
  stroke: rgba(105, 224, 203, 0.9);
  stroke-width: 1.7;
}

.future-core circle:first-child {
  stroke-dasharray: 4 8;
  opacity: 1;
}

.future-core circle:nth-child(2) {
  fill: rgba(17, 51, 58, 0.92);
  stroke: rgba(183, 236, 99, 0.92);
  opacity: 1;
}

.future-core path {
  stroke: rgba(105, 224, 203, 0.9);
  stroke-width: 1.2;
}

.future-core text {
  fill: #f4fbf4;
  text-anchor: middle;
  font: 700 17px var(--display);
  letter-spacing: 2px;
}

.future-core small {
  fill: #9db5a5;
  text-anchor: middle;
  font: 700 9px var(--mono);
  letter-spacing: 1px;
}

.future-node {
  cursor: pointer;
  outline: none;
}

.future-node-halo {
  fill: rgba(10, 17, 22, 0.24);
  stroke: rgba(122, 160, 156, 0.8);
  stroke-width: 1.1;
  stroke-dasharray: 2 8;
  transition: r 0.2s ease, stroke 0.2s ease, fill 0.2s ease;
}

.future-node .city-glyph {
  fill: none;
  stroke: #dcefe8;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px hsl(var(--node-hue), 70%, 65%));
}

.future-node-label {
  fill: #a0b9b4;
  text-anchor: middle;
  font: 700 11px var(--mono);
  letter-spacing: 0.8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.future-node:hover .future-node-label,
.future-node:focus .future-node-label,
.future-node.active .future-node-label {
  opacity: 1;
}

.future-node:hover .future-node-halo,
.future-node:focus .future-node-halo,
.future-node.active .future-node-halo {
  r: 24;
  fill: rgba(18, 65, 72, 0.42);
  stroke: rgba(105, 224, 203, 0.95);
  stroke-width: 2;
}

.future-node.active .city-glyph {
  stroke: #69e0cb;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 10px rgba(105, 224, 203, 0.9));
}

.future-discovery {
  cursor: pointer;
  opacity: 0.7;
}

.future-discovery.ready {
  opacity: 1;
}

.future-discovery circle {
  fill: rgba(19, 14, 23, 0.9);
  stroke: rgba(255, 186, 92, 0.95);
  stroke-width: 1.5;
  stroke-dasharray: 4 7;
}

.future-discovery path {
  fill: none;
  stroke: rgba(255, 186, 92, 0.95);
  stroke-width: 2;
}

.future-discovery text {
  fill: rgba(255, 186, 92, 0.96);
  text-anchor: middle;
  font: 700 10px var(--mono);
  letter-spacing: 1px;
}

.future-discovery.ready circle {
  fill: rgba(39, 28, 18, 0.9);
  filter: drop-shadow(0 0 12px rgba(255, 186, 92, 0.45));
}

.future-discovery.ready path,
.future-discovery.ready text {
  stroke: rgba(255, 186, 92, 1);
  fill: rgba(255, 186, 92, 1);
}

.future-city-card {
  display: none;
}

@keyframes futurePulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.future-node.active .future-node-halo,
.future-city-button.active {
  animation: futurePulse 2.4s ease-in-out infinite;
}

@media (max-width: 850px) {
  .future-map-shell {
    min-height: 440px;
  }

  .future-map-svg {
    height: 440px;
  }

  .future-node-label {
    font-size: 9px;
  }

  .future-node .city-glyph {
    stroke-width: 1.4;
  }
}

/* Single-surface city navigation redesign. */
.redesigned-city-map {
  margin-top: 14px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.redesigned-city-map + .city-services,
#cityHub .city-services {
  display: none !important;
}

.redesigned-city-frame {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(105, 224, 203, 0.4);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(32, 91, 91, 0.32), rgba(6, 17, 24, 0.96) 58%), #071117;
  box-shadow: inset 0 0 70px rgba(105, 224, 203, 0.08);
}

.redesigned-city-frame[data-city="rust"] { --city-accent: #ffba5c; --city-secondary: #ff617a; }
.redesigned-city-frame[data-city="void"] { --city-accent: #ff4f96; --city-secondary: #b478ff; }
.redesigned-city-frame[data-city="flood"] { --city-accent: #4ab8ff; --city-secondary: #3de5d0; }
.redesigned-city-frame[data-city="orbital"] { --city-accent: #ffba5c; --city-secondary: #f4fbff; }
.redesigned-city-frame[data-city="wilds"] { --city-accent: #b7ec63; --city-secondary: #ffba5c; }
.redesigned-city-frame[data-city="garden"] { --city-accent: #71e58b; --city-secondary: #b7ec63; }
.redesigned-city-frame[data-city="glass"] { --city-accent: #69e0cb; --city-secondary: #b7ec63; }

.redesigned-city-frame::before {
  content: "";
  position: absolute;
  inset: 42px 18px 46px;
  border: 1px solid rgba(105, 224, 203, 0.12);
  background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(105, 224, 203, 0.035) 28px), repeating-linear-gradient(90deg, transparent 0 27px, rgba(105, 224, 203, 0.035) 28px);
  pointer-events: none;
}

.redesigned-city-header,
.redesigned-city-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 9px var(--mono);
  letter-spacing: 1px;
}

.redesigned-city-header {
  top: 15px;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(105, 224, 203, 0.2);
  color: #79cfc2;
}

.redesigned-city-header b {
  color: #718983;
  font-weight: 400;
}

.redesigned-city-footer {
  bottom: 14px;
  z-index: 6;
  color: #718983;
  flex-wrap: wrap;
  row-gap: 5px;
  pointer-events: auto;
}

.redesigned-city-footer b {
  color: #69e0cb;
}

.redesigned-city-footer em {
  margin-left: auto;
  color: #9db5a5;
  font-style: normal;
}

.city-change-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 10, .82);
}

.city-change-modal[hidden] { display: none; }

.city-change-box {
  width: min(460px, 100%);
  position: relative;
  padding: 28px;
  border-color: rgba(255, 186, 92, .55);
  box-shadow: 0 20px 80px rgba(0, 0, 0, .7), 0 0 35px rgba(255, 186, 92, .08);
}

.city-change-box > .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 186, 92, .45);
  background: rgba(13, 20, 30, .9);
  color: var(--amber);
  font: 20px/1 var(--mono);
  cursor: pointer;
}

.city-change-box > .close-btn:hover,
.city-change-box > .close-btn:focus-visible {
  border-color: var(--amber);
  background: rgba(255, 186, 92, .12);
  color: var(--text);
  outline: none;
  box-shadow: 0 0 14px rgba(255, 186, 92, .2);
}

.city-change-box h2 {
  margin: 9px 0 8px;
  color: var(--amber);
  font: 700 30px var(--display);
}

.city-change-box > p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.city-change-loss {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 12px;
  border-left: 2px solid var(--amber);
  background: rgba(255, 186, 92, .07);
}

.city-change-loss span { color: var(--amber); font-size: 8px; letter-spacing: 1px; }
.city-change-loss b { color: var(--text); font-size: 12px; }
.city-change-loss small { color: var(--muted); font-size: 9px; }

.city-change-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.city-change-actions .primary-btn,
.city-change-actions .ghost-btn { margin: 0; }

.redesigned-discover-city {
  position: relative;
  z-index: 7;
  flex: 0 0 auto;
  max-width: 100%;
  margin-left: 8px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 186, 92, 0.45);
  background: rgba(255, 186, 92, 0.08);
  color: #a98b68;
  font: 8px var(--mono);
  letter-spacing: .5px;
  cursor: pointer;
}

.redesigned-discover-city.ready {
  border-color: var(--city-accent, #b7ec63);
  background: color-mix(in srgb, var(--city-accent, #b7ec63) 12%, transparent);
  color: var(--city-accent, #b7ec63);
  box-shadow: 0 0 12px color-mix(in srgb, var(--city-accent, #b7ec63) 18%, transparent);
}

.redesigned-discover-city.locked {
  cursor: not-allowed;
  opacity: .72;
}

.discovery-condition-note {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  color: #a98b68;
  font: 8px/1.4 var(--mono);
  letter-spacing: .3px;
}

.discovery-condition-note.is-active {
  color: var(--amber);
}

.district-control-meter {
  display: grid;
  gap: 5px;
  margin: 9px 0 10px;
  padding: 8px 9px;
  border: 1px solid rgba(105, 224, 203, .22);
  background: rgba(5, 17, 23, .68);
}

.district-control-meter > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.district-control-meter b { color: var(--cyan); font-size: 9px; letter-spacing: 1px; }
.district-control-meter strong { color: var(--text); font-size: 12px; }
.district-control-meter small { margin-left: auto; color: var(--muted); font-size: 8px; }
.district-control-meter > span { display: block; height: 5px; background: #172b31; }
.district-control-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); transition: width .25s ease; }

.redesigned-discover-city.claimed + .discovery-condition-note {
  color: var(--lime);
}

.redesigned-city-lines {
  position: absolute;
  inset: 44px 30px 42px;
  width: calc(100% - 60px);
  height: calc(100% - 86px);
  overflow: visible;
}

.redesigned-city-lines circle {
  display: none;
}

.redesigned-city-lines path {
  fill: none;
  stroke: rgba(105, 224, 203, 0.42);
  stroke-width: 0.45;
  stroke-dasharray: 1.3 2;
}

.redesigned-city-lines .route-main {
  stroke: rgba(105, 224, 203, 0.7);
  stroke-width: 0.7;
  stroke-dasharray: none;
}

.redesigned-city-lines .route-cross {
  stroke: rgba(255, 79, 150, 0.38);
  stroke-width: 0.3;
  stroke-dasharray: 1 2.5;
}

.redesigned-city-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 108px;
  height: 68px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--city-accent, #b7ec63);
  border-radius: 3px;
  background: #0b2428;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--city-accent, #69e0cb) 10%, transparent), 0 0 30px color-mix(in srgb, var(--city-accent, #69e0cb) 24%, transparent);
}

.redesigned-city-core-shape {
  position: absolute;
  inset: -58px;
  width: 220px;
  height: 220px;
  overflow: visible;
  pointer-events: none;
  opacity: .42;
}

.redesigned-city-core-shape path {
  fill: color-mix(in srgb, var(--city-accent, #69e0cb) 9%, transparent);
  stroke: var(--city-accent, #69e0cb);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.redesigned-city-art {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--city-secondary, #b7ec63);
  animation: cityEmblemPulse 2.8s ease-in-out infinite;
}

.redesigned-city-art svg,
.redesigned-city-art path,
.redesigned-city-art circle,
.redesigned-city-art ellipse {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes cityEmblemPulse {
  50% { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 0 7px currentColor); }
}

.redesigned-city-core span {
  color: #f4fbf4;
  font: 700 14px var(--display);
  letter-spacing: 2px;
}

.redesigned-city-zones {
  position: absolute;
  inset: 56px 42px 54px;
  z-index: 2;
  color: rgba(157, 181, 165, 0.55);
  font: 8px var(--mono);
  letter-spacing: 1px;
  pointer-events: none;
}

.redesigned-city-zones span {
  position: absolute;
  padding: 4px 6px;
  border-left: 2px solid rgba(105, 224, 203, 0.35);
  background: rgba(7, 17, 23, 0.55);
}

.zone-north { top: 2%; left: 42%; }
.zone-west { top: 43%; left: 1%; }
.zone-east { top: 39%; right: 1%; }
.zone-south { bottom: 2%; left: 42%; }

.redesigned-city-core small {
  color: var(--city-accent, #9db5a5);
  font: 8px var(--mono);
  letter-spacing: 1px;
}

.redesigned-city-nodes {
  position: absolute;
  inset: 44px 30px 42px;
  z-index: 5;
}

.redesigned-city-node {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 96px;
  height: 86px;
  min-height: 86px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  color: #9db5a5;
  cursor: pointer;
  font-family: var(--mono);
}

.redesigned-city-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(157, 181, 165, 0.55);
  border-radius: 50%;
  background: #0b1b21;
  color: hsl(var(--node-hue), 70%, 72%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.redesigned-city-icon svg,
.redesigned-city-icon path,
.redesigned-city-icon circle,
.redesigned-city-icon ellipse {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.redesigned-city-node b {
  max-width: 96px;
  overflow: hidden;
  color: #b5c9c0;
  font: 10px var(--mono);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redesigned-city-node small {
  color: #657f7c;
  font: 7px var(--mono);
  letter-spacing: .7px;
}

.redesigned-city-node:hover .redesigned-city-icon,
.redesigned-city-node:focus-visible .redesigned-city-icon,
.redesigned-city-node.active .redesigned-city-icon {
  transform: scale(1.08);
  border-color: #69e0cb;
  color: #69e0cb;
  box-shadow: 0 0 18px rgba(105, 224, 203, 0.3);
}

.redesigned-city-node.active b {
  color: #69e0cb;
}

@media (max-width: 700px) {
  .redesigned-city-frame {
    min-height: 430px;
  }

  .redesigned-city-node {
    width: 76px;
    height: 72px;
    min-height: 72px;
  }

  .redesigned-city-icon {
    width: 36px;
    height: 36px;
  }

  .redesigned-city-node b {
    max-width: 76px;
    font-size: 8px;
  }
}
