/* شبکه مرتب ماژول‌ها — خطوط واضح، همه داخل صفحه */

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  background: #050510;
  overflow: hidden;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

#dashboardBg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* خطوط زیر لوگو؛ لوگو/کادر هسته روی خطوط دیده شود */
.hea-power-dashboard-overlay {
  z-index: 8;
  pointer-events: none !important;
}

/* کادر واضح دور لوگوی وسط صفحه */
.hea-power-stack {
  padding: 26px 40px 22px;
  border-radius: 24px;
  border: 2px solid rgba(240, 215, 140, 0.9);
  background: linear-gradient(165deg, rgba(12, 22, 32, 0.72), rgba(6, 12, 20, 0.58));
  box-shadow:
    0 0 0 1px rgba(212, 160, 23, 0.22) inset,
    0 14px 44px rgba(0, 0, 0, 0.5),
    0 0 36px rgba(212, 160, 23, 0.28);
}

.hx-network {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: visible;
  pointer-events: none;
}

.hx-edges {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hx-edge {
  stroke: rgba(212, 160, 23, 0.06);
  stroke-width: 0.9;
  stroke-linecap: round;
  fill: none;
}

.hx-edge--hub {
  stroke: rgba(212, 160, 23, 0.08);
  stroke-width: 1;
}

.hx-electron {
  fill: #fff8d6;
  filter: drop-shadow(0 0 5px rgba(255, 236, 160, 0.7));
  opacity: 0.55;
}

.hx-electron-glow {
  fill: rgba(240, 215, 140, 0.22);
  filter: blur(1.8px);
}

.hx-electron--scenario {
  filter: drop-shadow(0 0 8px currentColor);
}

.hx-nodes {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.hx-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  width: 128px;
  min-height: 64px;
  padding: 8px 10px 9px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(240, 215, 140, 0.55);
  background: linear-gradient(160deg, rgba(18, 36, 46, 0.94), rgba(8, 16, 24, 0.92));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(212, 160, 23, 0.12) inset,
    0 0 16px rgba(212, 160, 23, 0.12);
  color: #fff;
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.hx-label.is-hot,
.hx-label:hover {
  z-index: 20;
  outline: none;
  border-color: rgba(240, 215, 140, 0.95);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 160, 23, 0.25) inset,
    0 0 22px rgba(212, 160, 23, 0.35);
}

.hx-label__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #d4a017;
  background: rgba(212, 160, 23, 0.14);
  border: 1px solid rgba(212, 160, 23, 0.45);
  box-shadow: 0 0 10px rgba(212, 160, 23, 0.15);
}

.hx-label__svg {
  width: 15px;
  height: 15px;
  display: block;
  color: #d4a017;
}

.hx-label__title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.hx-label__code {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(240, 215, 140, 0.85);
  line-height: 1.2;
}

/* یک باکس توضیح شناور — پیش‌فرض مخفی */
.hx-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  display: none;
  width: min(300px, calc(100vw - 20px));
  padding: 12px 14px 13px;
  border-radius: 12px;
  border: 1px solid rgba(240, 215, 140, 0.55);
  background: linear-gradient(165deg, rgba(16, 28, 38, 0.98), rgba(8, 14, 22, 0.97));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(212, 160, 23, 0.2);
  color: #f3f0e6;
  text-align: right;
  direction: rtl;
  pointer-events: none;
}

.hx-tip.is-on {
  display: block;
}

.hx-tip__title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #f0d78c;
  line-height: 1.35;
}

.hx-tip__body {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-line;
  color: rgba(245, 240, 230, 0.92);
}

@media (max-width: 1100px) {
  .hx-label {
    width: 118px;
    min-height: 60px;
  }

  .hx-label__title {
    font-size: 10.5px;
  }
}

@media (max-width: 800px) {
  .hx-label {
    width: 104px;
    min-height: 56px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .hx-label__icon {
    width: 24px;
    height: 24px;
  }

  .hx-label__svg {
    width: 13px;
    height: 13px;
  }

  .hx-label__title {
    font-size: 10px;
  }

}

@media (max-width: 560px) {
  .hx-label {
    width: 92px;
    min-height: 52px;
  }

  .hx-label__title {
    font-size: 9.5px;
  }

  .hx-label__code {
    font-size: 8.5px;
  }
}
