/* map.php Star System UI — shared for HTML5 */
/* CRITICAL: contain overlay inside the window (map.php uses position:fixed full-screen) */
.dd-win-starSystem {
  width: 1120px !important;
  height: 720px !important;
  min-width: 960px !important;
  min-height: 600px !important;
  max-width: min(1120px, 96vw) !important;
  max-height: min(720px, 92vh) !important;
}
.dd-win-starSystem .dd-resize { display: none !important; }
#ddwin_starSystem { padding: 0 !important; overflow: hidden !important; }
#ddwin_starSystem .star-system-html5-host { height: 100%; display: flex; flex-direction: column; min-height: 0; }
#ddwin_starSystem .star-system-overlay,
#ddwin_starSystem .star-system-overlay.star-open {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 1 !important;
  padding: 0 !important;
  pointer-events: auto !important;
}
#ddwin_starSystem .star-system-overlay::before,
#ddwin_starSystem .star-system-overlay::after {
  display: none !important;
}
#ddwin_starSystem .star-nav-vessel { flex: 1; min-height: 0; width: 100%; max-width: none; }
#ddwin_starSystem .star-nav-vessel__body.star-system-modal { width: 100% !important; max-width: none !important; max-height: none !important; height: 100% !important; }
#ddwin_starSystem .star-system-close { display: none !important; }
#ddwin_starSystem .star-system-grid-wrap { flex: 1; min-height: 280px; }
#star-system-launch.star-system-launch-btn { display: none !important; }
/* ========== Star system — premium HUD / hyperdrive console ========== */
@keyframes star-modal-breathe {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.65) inset,
      0 0 0 1px rgba(60, 200, 255, 0.12),
      0 0 100px rgba(0, 100, 200, 0.06),
      0 32px 80px rgba(0, 0, 0, 0.85);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.65) inset,
      0 0 0 1px rgba(120, 220, 255, 0.22),
      0 0 120px rgba(40, 160, 255, 0.12),
      0 32px 80px rgba(0, 0, 0, 0.85);
  }
}
@keyframes star-node-current {
  0%, 100% { box-shadow: 0 0 0 1px rgba(80, 220, 255, 0.35), 0 0 28px rgba(0, 180, 255, 0.18); }
  50% { box-shadow: 0 0 0 1px rgba(120, 240, 255, 0.5), 0 0 42px rgba(0, 200, 255, 0.32); }
}
@keyframes star-jump-shine {
  0% { transform: translateX(-120%) skewX(-12deg); }
  100% { transform: translateX(220%) skewX(-12deg); }
}
#star-system-launch.star-system-launch-btn {
  position: fixed;
  right: 18px;
  bottom: 120px;
  z-index: 2147483000;
  width: var(--map-hud-icon-size);
  height: var(--map-hud-icon-size);
  min-width: var(--map-hud-icon-size);
  min-height: var(--map-hud-icon-size);
  box-sizing: border-box;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s, filter .2s;
  user-select: none;
  -webkit-user-select: none;
}
#star-system-launch.star-system-launch-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.08) drop-shadow(0 0 12px rgba(0, 200, 255, 0.45));
}
#star-system-launch.star-system-launch-btn:active { cursor: grabbing; transform: scale(0.97); }

.star-system-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  background:
    radial-gradient(ellipse 90% 70% at 50% 15%, rgba(0, 80, 160, 0.35), transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 75%, rgba(80, 40, 160, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 10% 80%, rgba(0, 120, 140, 0.12), transparent 45%),
    rgba(2, 4, 14, 0.88);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.star-system-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.85;
}
.star-system-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 40, 80, 0.15), transparent 30%, transparent 70%, rgba(0, 20, 60, 0.2));
  pointer-events: none;
}
.star-system-overlay.star-open { display: flex; }

.star-system-modal-shell {
  position: relative;
  z-index: 1;
  padding: 0;
  filter: drop-shadow(0 0 60px rgba(0, 160, 255, 0.12));
}
.star-system-modal-shell::before,
.star-system-modal-shell::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 3;
  border: 2px solid rgba(100, 220, 255, 0.45);
  opacity: 0.9;
}
.star-system-modal-shell::before {
  top: -6px;
  left: -6px;
  border-right: none;
  border-bottom: none;
}
.star-system-modal-shell::after {
  bottom: -6px;
  right: -6px;
  border-left: none;
  border-top: none;
}

.star-system-modal {
  width: min(980px, 98vw);
  max-height: min(90vh, 780px);
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: 1px solid rgba(80, 160, 220, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 22%),
    linear-gradient(168deg, rgba(12, 28, 52, 0.97) 0%, rgba(4, 10, 26, 0.99) 55%, rgba(1, 3, 10, 1) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 0 80px rgba(0, 100, 200, 0.06);
  animation: star-modal-breathe 5s ease-in-out infinite;
  overflow: hidden;
  font-family: 'Exo 2', 'Rajdhani', 'Segoe UI', sans-serif;
  color: #e8f2ff;
  position: relative;
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.star-system-hud-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 220, 255, 0.85), rgba(140, 100, 255, 0.6), transparent);
  opacity: 0.9;
  pointer-events: none;
  z-index: 4;
}
.star-system-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12px 18px, rgba(255, 255, 255, 0.12), transparent),
    radial-gradient(1px 1px at 60px 44px, rgba(120, 200, 255, 0.08), transparent);
  background-size: 96px 96px;
  opacity: 0.35;
  pointer-events: none;
}
.star-system-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(100, 200, 255, 0.03) 48%, transparent 52%);
  pointer-events: none;
  opacity: 0.85;
}

.star-system-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(60, 140, 200, 0.2);
  background: linear-gradient(180deg, rgba(0, 60, 100, 0.25) 0%, transparent 100%);
  position: relative;
  z-index: 2;
}
.star-system-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(0, 220, 255, 0.85), rgba(100, 80, 255, 0.35));
  opacity: 0.85;
}
.star-system-title-block { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; }
.star-system-badge {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(180, 230, 255, 0.75);
  padding: 4px 10px;
  border: 1px solid rgba(100, 200, 255, 0.35);
  background: linear-gradient(180deg, rgba(0, 120, 180, 0.12), rgba(0, 40, 80, 0.2));
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.star-system-head h2 {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: linear-gradient(92deg, #c8f8ff 0%, #6ec8ff 35%, #a898ff 70%, #e0d4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(0, 200, 255, 0.35));
}
.star-system-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(140, 180, 220, 0.65);
  max-width: 42ch;
  line-height: 1.35;
}

.star-system-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(100, 200, 255, 0.35);
  background:
    radial-gradient(circle at 30% 25%, rgba(60, 120, 180, 0.45), transparent 55%),
    linear-gradient(165deg, rgba(20, 40, 70, 0.95), rgba(5, 12, 28, 0.98));
  color: rgba(200, 230, 255, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, box-shadow .2s, transform .15s, background .2s;
  box-shadow: 0 0 24px rgba(0, 100, 200, 0.06), 0 4px 14px rgba(0, 0, 0, 0.55);
}
.star-system-close:hover {
  border-color: rgba(255, 200, 120, 0.75);
  color: #fff;
  box-shadow: 0 0 28px rgba(255, 180, 80, 0.2), 0 0 0 1px rgba(255, 200, 120, 0.15);
  transform: scale(1.06);
}
.star-system-close-x {
  display: block;
  width: 16px;
  height: 16px;
  position: relative;
}
.star-system-close-x::before,
.star-system-close-x::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(200, 240, 255, 0.4);
}
.star-system-close-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.star-system-close-x::after { transform: translate(-50%, -50%) rotate(-45deg); }

.star-system-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  padding: 18px 26px 20px;
  border-bottom: 1px solid rgba(50, 100, 150, 0.18);
  position: relative;
  z-index: 2;
}
.star-stat {
  position: relative;
  padding: 14px 18px 14px 20px;
  border-radius: 0;
  border: 1px solid rgba(80, 140, 190, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
    linear-gradient(155deg, rgba(8, 40, 72, 0.55) 0%, rgba(4, 14, 32, 0.75) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset, 0 0 40px rgba(0, 80, 160, 0.04);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.star-stat:nth-child(1) { border-color: rgba(100, 200, 255, 0.28); }
.star-stat:nth-child(1)::before {
  background: linear-gradient(180deg, rgba(100, 220, 255, 0.95), rgba(60, 140, 200, 0.2));
}
.star-stat:nth-child(2) { border-color: rgba(100, 220, 180, 0.22); }
.star-stat:nth-child(2)::before {
  background: linear-gradient(180deg, rgba(100, 255, 200, 0.85), rgba(40, 160, 120, 0.2));
}
.star-stat:nth-child(3) { border-color: rgba(255, 200, 120, 0.22); }
.star-stat:nth-child(3)::before {
  background: linear-gradient(180deg, rgba(255, 210, 140, 0.9), rgba(200, 120, 60, 0.25));
}
.star-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(120, 200, 255, 0.9), rgba(60, 100, 160, 0.2));
  pointer-events: none;
}
.star-stat-label {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180, 210, 240, 0.55);
  margin-bottom: 8px;
}
.star-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: #f4fbff;
  line-height: 1.35;
  word-break: break-word;
}
.star-stat-value.star-credits {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffe8a8;
  text-shadow: 0 0 20px rgba(255, 200, 100, 0.35), 0 0 40px rgba(255, 160, 60, 0.08);
}
.star-stat-hint {
  display: block;
  margin-top: 8px;
  font-family: 'Exo 2', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: rgba(180, 200, 255, 0.45);
  line-height: 1.45;
}

.star-system-grid-wrap {
  flex: 1;
  overflow: auto;
  padding: 10px 16px 18px;
  min-height: 480px;
  position: relative;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(80, 180, 255, 0.35) rgba(0, 20, 40, 0.4);
  background: transparent;
}
.star-system-grid-wrap::before { display: none; }
.star-graph-shim {
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
  margin: 0 auto;
  max-width: 100%;
}
.star-system-graph {
  position: relative;
  width: 1320px;
  height: 640px;
  margin: 0;
  transform-origin: top left;
}

.star-system-graph::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 260px at 50% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 28px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.star-system-links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.star-system-links line,
.star-system-links path {
  stroke: rgba(220, 232, 255, 0.33);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: none;
}
.star-system-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.star-system-layer-toggle {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.star-system-layer-toggle button {
  border: 1px solid rgba(210, 230, 255, 0.45);
  background: rgba(4, 14, 30, 0.72);
  color: #d7ebff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}
.star-system-layer-toggle button.active {
  background: rgba(70, 120, 170, 0.55);
  border-color: rgba(230, 245, 255, 0.7);
}
.star-map-node {
  position: absolute;
  width: 110px;
  min-height: 64px;
  height: auto;
  border-radius: 0;
  border: 1px solid rgba(230, 238, 255, 0.52);
  background: rgba(3, 8, 18, 0.95);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  transition: border-color .2s, box-shadow .2s, transform .18s, filter .2s;
  box-sizing: border-box;
  overflow: hidden;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55) inset,
    0 0 18px rgba(0, 0, 0, 0.65);
}
.star-map-node__thumb {
  flex: 1;
  min-height: 62px;
  border: 0;
  background-color: rgba(0, 0, 0, 0.45);
  background-image: var(--star-minimap, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
.star-map-node__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}
.star-map-node[data-faction="2"] {
  border-color: rgba(255, 170, 120, 0.55);
}
.star-map-node[data-faction="3"] {
  border-color: rgba(120, 255, 170, 0.5);
}
.star-map-node[data-faction="0"] {
  border-color: rgba(180, 160, 255, 0.45);
}
.star-map-node[data-is-bl="1"] {
  border-color: rgba(188, 142, 255, 0.65);
}
.star-map-node[data-size="md"] { width: 110px; min-height: 64px; }
.star-map-node[data-size="lg"] { width: 146px; min-height: 84px; }
.star-map-node[data-size="xl"] { width: 200px; min-height: 116px; }
.star-map-node[data-size="lg"] .star-map-code,
.star-map-node[data-size="xl"] .star-map-code {
  font-size: 20px;
  padding: 0;
}
.star-map-node:hover {
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 0 24px rgba(175, 205, 255, 0.24);
  transform: translate(-50%, -50%) scale(1.01);
}
.star-map-node.star-current {
  border-color: rgba(255, 214, 120, 0.98);
  box-shadow:
    0 0 0 1px rgba(90, 70, 30, 0.5) inset,
    0 0 24px rgba(255, 205, 120, 0.36);
}
.star-map-node.star-current .star-map-code {
  color: #ffeec4;
}
.star-map-node.star-selected {
  border-color: rgba(130, 240, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(20, 60, 80, 0.45) inset,
    0 0 26px rgba(120, 235, 255, 0.35);
}
.star-map-node.star-selected .star-map-code {
  color: #dffbff;
}
.star-map-node .star-map-code {
  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(235, 246, 255, 0.98);
  z-index: 2;
  position: absolute;
  left: 6px;
  bottom: 4px;
  flex-shrink: 0;
  padding: 0;
  text-align: left;
  line-height: 1.1;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.7);
  background: transparent;
  border: 0;
}

.star-system-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px 22px;
  border-top: 1px solid rgba(60, 120, 180, 0.22);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.45) 0%, transparent 100%),
    repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(100, 200, 255, 0.04) 8px, rgba(100, 200, 255, 0.04) 9px);
  position: relative;
  z-index: 2;
}
.star-foot-dest-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180, 210, 240, 0.55);
  margin-bottom: 8px;
}
.star-foot-dest-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #b8f0ff;
  text-shadow: 0 0 20px rgba(100, 200, 255, 0.2);
}
.star-foot-right { text-align: right; min-width: 0; }
.star-system-foot .star-msg {
  font-size: 12px;
  min-height: 1.2em;
  color: #ff9e9e;
  margin-bottom: 8px;
}
.star-jump-btn {
  position: relative;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: 0;
  border: 1px solid rgba(120, 240, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(0, 180, 220, 0.35) 0%, rgba(0, 50, 90, 0.92) 100%);
  color: #f0faff;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 0 40px rgba(0, 200, 255, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.55);
  transition: transform .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.star-jump-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  animation: star-jump-shine 3s ease-in-out infinite;
  pointer-events: none;
}
.star-jump-btn:hover:not(:disabled) {
  border-color: rgba(160, 250, 255, 0.85);
  box-shadow:
    0 0 0 1px rgba(0, 200, 255, 0.12) inset,
    0 0 48px rgba(0, 220, 255, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.55);
  transform: translateY(-2px);
}
.star-jump-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}
.star-jump-btn:disabled::after { animation: none; opacity: 0; }
.star-jump-btn.star-jump-counting:disabled {
  opacity: 1;
  cursor: wait;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 16px rgba(0, 220, 255, 0.6);
}
.star-jump-btn.star-jump-counting:disabled::after { animation: none; opacity: 0; }
.star-system-overlay.star-jump-countdown .star-system-grid {
  pointer-events: none;
  opacity: 0.72;
  filter: grayscale(0.15);
}

/* Star system — új konténer (nav vessel) + kitöltő skálázás */
.star-nav-vessel {
  position: relative;
  z-index: 1;
  padding: 18px;
  max-width: 100%;
  box-sizing: border-box;
}
.star-nav-vessel__glow {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 220, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 100%, rgba(140, 80, 255, 0.12), transparent 50%);
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}
.star-nav-vessel__frame {
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  pointer-events: none;
  border: 1px solid rgba(100, 200, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65) inset,
    0 0 60px rgba(0, 160, 255, 0.06);
}
.star-nav-vessel__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(120, 230, 255, 0.55);
  pointer-events: none;
}
.star-nav-vessel__corner--tl { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.star-nav-vessel__corner--tr { top: -1px; right: -1px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.star-nav-vessel__corner--bl { bottom: -1px; left: -1px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.star-nav-vessel__corner--br { bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }
.star-nav-vessel__edge {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 220, 255, 0.35), transparent);
  opacity: 0.85;
}
.star-nav-vessel__edge--top { top: 10px; }
.star-nav-vessel__edge--bottom { bottom: 10px; }

.star-nav-vessel__body.star-system-modal {
  position: relative;
  z-index: 2;
  width: min(1400px, 98vw) !important;
  max-height: min(92vh, 920px) !important;
  min-height: 0;
  min-width: 0;
  border-radius: 14px !important;
  border: 1px solid rgba(140, 200, 255, 0.22) !important;
  clip-path: none !important;
  animation: none !important;
  background:
    linear-gradient(145deg, rgba(32, 42, 68, 0.97) 0%, rgba(8, 12, 28, 0.99) 45%, rgba(4, 6, 14, 1) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65) inset,
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 0 100px rgba(0, 120, 200, 0.08) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.star-system-hud-bar { display: none !important; }

.star-system-head {
  padding: 16px 22px !important;
  border-bottom: 1px solid rgba(100, 180, 255, 0.14) !important;
  background: linear-gradient(180deg, rgba(20, 32, 56, 0.55) 0%, rgba(6, 10, 22, 0.2) 100%) !important;
  align-items: center;
}
.star-system-title-block { gap: 6px !important; padding-left: 0 !important; }
.star-system-head::before { display: none !important; }

.star-system-badge {
  background: rgba(0, 30, 60, 0.55) !important;
  border: 1px solid rgba(100, 220, 255, 0.28) !important;
  clip-path: none !important;
  border-radius: 999px;
  padding: 5px 14px !important;
  color: rgba(200, 235, 255, 0.9) !important;
  letter-spacing: 0.18em !important;
}
.star-system-head h2 {
  font-size: 1.4rem !important;
  letter-spacing: 0.14em !important;
  filter: drop-shadow(0 0 18px rgba(0, 220, 255, 0.35)) !important;
}
.star-system-sub { color: rgba(160, 200, 240, 0.72) !important; font-size: 11px !important; }

.star-system-meta {
  display: flex !important;
  gap: 14px !important;
  padding: 14px 22px !important;
  border-bottom: 1px solid rgba(80, 140, 200, 0.12) !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent) !important;
}
.star-stat {
  flex: 1;
  padding: 12px 14px !important;
  background: rgba(0, 8, 24, 0.45) !important;
  border: 1px solid rgba(120, 200, 255, 0.14) !important;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
}
.star-stat-label {
  color: rgba(180, 205, 240, 0.62) !important;
  margin-bottom: 6px !important;
}
.star-stat-hint { display: none !important; }

.star-system-grid-wrap {
  padding: 8px 10px 8px !important;
  flex: 1 1 0 !important;
  min-height: min(480px, 52vh) !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background:
    radial-gradient(ellipse 120% 80% at 50% 20%, rgba(40, 100, 180, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 4, 12, 0.55)) !important;
}
.star-system-graph {
  width: 1320px !important;
  height: 640px !important;
  margin: 0 !important;
  transform-origin: top left !important;
  flex-shrink: 0;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow:
    0 0 0 1px rgba(0, 220, 255, 0.1) inset,
    0 0 48px rgba(0, 0, 0, 0.45) !important;
}

.star-system-grid { z-index: 2 !important; }
.star-system-links line,
.star-system-links path {
  stroke: rgba(200, 220, 255, 0.42) !important;
  stroke-width: 1.35 !important;
}

.star-system-foot {
  padding: 14px 22px 18px !important;
  border-top: 1px solid rgba(80, 160, 220, 0.16) !important;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 8, 20, 0.25)) !important;
}
.star-foot-dest-label { margin-bottom: 6px !important; }
.star-foot-dest-value { font-size: 17px !important; }
.star-system-foot .star-msg { min-height: 1.2em; margin-bottom: 6px; font-size: 12px; }

.star-jump-btn {
  border-radius: 12px !important;
  clip-path: none !important;
  padding: 16px 28px !important;
  font-size: 11px !important;
  border: 1px solid rgba(80, 240, 255, 0.55) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 0 40px rgba(0, 220, 255, 0.18) !important;
}
.star-jump-btn::after { display: none !important; }
.star-jump-btn:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset, 0 0 56px rgba(0, 240, 255, 0.28) !important;
}

@media (prefers-reduced-motion: reduce) {
  .star-system-modal { animation: none; }
  .star-map-node.star-current { animation: none; }
  .star-jump-btn::after { animation: none; }
}


@media (max-width: 520px) {
  #star-system-launch.star-system-launch-btn { right: 10px; bottom: 90px; }
  .star-nav-vessel { padding: 8px !important; }
  .star-nav-vessel__frame { inset: 4px; }
  .star-nav-vessel__body.star-system-modal { width: 100% !important; max-height: 94vh !important; border-radius: 12px !important; }
  .star-system-grid-wrap { min-height: 300px !important; padding: 8px 8px 6px !important; }
  .star-system-graph { width: 1320px !important; height: 640px !important; }
  .star-map-node { width: 58px; min-height: 46px; }
  .star-map-node[data-size="md"] { width: 58px; min-height: 46px; }
  .star-map-node[data-size="lg"] { width: 72px; min-height: 58px; }
  .star-map-node[data-size="xl"] { width: 90px; min-height: 72px; }
  .star-system-meta { flex-direction: column !important; }
}

/* ---------- Star system UI polish (override) ---------- */
.star-map-node {
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(5, 12, 26, 0.98), rgba(0, 0, 0, 0.86)) !important;
}
.star-map-node__thumb {
  border-radius: 12px 12px 0 0 !important;
}
.star-map-node .star-map-code {
  left: 10px !important;
  bottom: 8px !important;
  padding: 2px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(110, 220, 255, 0.26) !important;
  background: rgba(0, 0, 0, 0.45) !important;
  text-shadow: none !important;
  color: rgba(235, 246, 255, 0.98) !important;
}
.star-map-node[data-size="lg"] .star-map-code,
.star-map-node[data-size="xl"] .star-map-code {
  font-size: 18px !important;
  padding: 2px 12px !important;
}
.star-map-node:hover .star-map-code {
  border-color: rgba(160, 250, 255, 0.55) !important;
  background: rgba(0, 0, 0, 0.35) !important;
}

.star-system-layer-toggle button {
  border-radius: 10px !important;
}
.star-system-layer-toggle button:focus-visible,
.star-map-node:focus-visible,
.star-system-close:focus-visible,
.star-jump-btn:focus-visible {
  outline: 2px solid rgba(140, 240, 255, 0.9) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 220, 255, 0.18) !important;
}

.star-map-node:active {
  transform: translate(-50%, -50%) scale(0.99) !important;
}
.star-jump-btn {
  min-width: 160px;
}

/* HTML5 window size + neutralize old style.css star-map-node rules */
.dd-win-starSystem {
  width: 1120px !important;
  height: 720px !important;
  min-width: 960px !important;
  min-height: 600px !important;
  max-width: min(1120px, 96vw) !important;
  max-height: min(720px, 92vh) !important;
}
.dd-win-starSystem .dd-resize { display: none !important; }
#ddwin_starSystem .star-system-html5-host .star-map-node {
  transform: translate(-50%, -50%) !important;
  filter: none !important;
  border: 1px solid rgba(80, 200, 255, 0.22) !important;
  background: linear-gradient(180deg, rgba(5, 12, 26, 0.98), rgba(0, 0, 0, 0.86)) !important;
  padding: 0 !important;
}
#ddwin_starSystem .star-system-html5-host .star-map-node span.star-map-code {
  position: absolute !important;
  left: 10px !important;
  top: auto !important;
  bottom: 8px !important;
  transform: none !important;
}

/* —— Classic DarkOrbit Star system (wiki / Map Guide look) —— */
.star-system--classic {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #020814;
}
.star-system--classic .star-system-overlay,
.star-system--classic .star-system-overlay.star-open {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.star-system--classic .star-system-overlay::before,
.star-system--classic .star-system-overlay::after {
  display: none !important;
}
.star-system--classic .star-classic-win {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: none;
  box-shadow: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 35%, rgba(18, 48, 110, 0.45), transparent 65%),
    linear-gradient(180deg, #0a1a38 0%, #051024 45%, #030a16 100%);
  overflow: hidden;
}
.star-system--classic .star-classic-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px 8px 14px;
  border-bottom: 1px solid rgba(80, 150, 220, 0.35);
  background: linear-gradient(180deg, rgba(20, 48, 96, 0.95), rgba(8, 20, 44, 0.92));
}
.star-system--classic .star-classic-head h2 {
  margin: 0;
  font: 700 1.05rem "Orbitron", "Trebuchet MS", sans-serif;
  letter-spacing: 0.04em;
  color: #f0e6a8;
  text-shadow: 0 0 12px rgba(255, 220, 120, 0.25);
  white-space: nowrap;
}
.star-system--classic .star-classic-head-meta {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font: 600 0.72rem "Rajdhani", sans-serif;
  color: rgba(200, 220, 245, 0.88);
  letter-spacing: 0.04em;
}
.star-system--classic .star-classic-sep { opacity: 0.35; }
.star-system--classic .star-classic-credits b {
  color: #ffe28a;
  font-weight: 800;
}
.star-system--classic .star-system-close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(140, 180, 220, 0.45);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  color: #d8e8ff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.star-system--classic .star-system-close:hover {
  border-color: #fff;
  color: #fff;
}
.star-system--classic .star-system-grid-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 14px 16px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(30, 70, 140, 0.22), transparent 70%),
    #020a18 !important;
  border: 1px solid rgba(70, 140, 210, 0.22);
  border-left: none;
  border-right: none;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.45);
}
.star-system--classic .star-graph-shim {
  margin: 0 auto !important;
  max-width: 100% !important;
  flex-shrink: 0 !important;
}
.star-system--classic .star-system-graph {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.star-system--classic .star-system-graph::before {
  opacity: 0.18;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 70% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.35), transparent),
    radial-gradient(600px 240px at 50% 40%, rgba(40, 90, 180, 0.12), transparent 65%) !important;
}
.star-system--classic .star-system-links path {
  stroke: rgba(220, 235, 255, 0.55) !important;
  stroke-width: 1.15 !important;
}
.star-system--classic .star-system-layer-toggle {
  top: 10px;
  left: 12px;
  gap: 10px;
}
.star-system--classic .star-system-layer-toggle button {
  border: none;
  background: transparent;
  color: #9ec8ef;
  font: 700 12px "Trebuchet MS", sans-serif;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 2px 0;
  cursor: pointer;
  opacity: 0.75;
}
.star-system--classic .star-system-layer-toggle button.active,
.star-system--classic .star-system-layer-toggle button:hover {
  color: #e8f4ff;
  opacity: 1;
}
.star-system--classic .star-map-node {
  width: 138px !important;
  height: 82px !important;
  min-width: 138px !important;
  min-height: 82px !important;
  border: 1px solid rgba(210, 225, 245, 0.7) !important;
  border-radius: 0 !important;
  background: #000 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8) !important;
  padding: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  display: block !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2;
}
.star-system--classic .star-map-node[data-size="md"] {
  width: 138px !important;
  height: 82px !important;
  min-width: 138px !important;
  min-height: 82px !important;
}
.star-system--classic .star-map-node[data-size="lg"] {
  width: 172px !important;
  height: 100px !important;
  min-width: 172px !important;
  min-height: 100px !important;
}
.star-system--classic .star-map-node[data-size="xl"] {
  width: 220px !important;
  height: 128px !important;
  min-width: 220px !important;
  min-height: 128px !important;
}
.star-system--classic .star-map-node__thumb {
  position: absolute !important;
  inset: 0 !important;
  min-height: 0 !important;
  flex: none !important;
  display: block !important;
  background-color: #061018 !important;
  background-image: var(--star-minimap, none) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border-radius: 0 !important;
}
.star-system--classic .star-map-node__img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none !important;
  border: 0 !important;
}
.star-system--classic .star-map-node__thumb::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%);
}
.star-system--classic .star-map-node .star-map-code {
  left: 7px !important;
  top: 5px !important;
  bottom: auto !important;
  right: auto !important;
  font: 800 15px/1.1 "Trebuchet MS", sans-serif !important;
  letter-spacing: 0.02em !important;
  color: #fff !important;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0,0,0,0.9) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  z-index: 3 !important;
}
.star-system--classic .star-system-layer-toggle button {
  font: 700 13px "Trebuchet MS", sans-serif !important;
}
.star-system--classic .star-map-node.star-current {
  border-color: #ffd56a;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.85), 0 0 14px rgba(255, 200, 80, 0.45);
}
.star-system--classic .star-map-node.star-selected {
  border-color: #7cf0ff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.85), 0 0 16px rgba(100, 230, 255, 0.5);
}
.star-system--classic .star-classic-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid rgba(80, 150, 220, 0.35);
  background: linear-gradient(180deg, rgba(8, 20, 44, 0.95), rgba(4, 12, 28, 0.98));
}
.star-system--classic .star-classic-foot .star-foot-left {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.star-system--classic .star-foot-dest-label {
  font: 600 0.7rem "Rajdhani", sans-serif;
  color: rgba(160, 190, 230, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.star-system--classic .star-foot-dest-value {
  font: 700 0.95rem "Orbitron", sans-serif;
  color: #e8f4ff;
}
.star-system--classic .star-msg {
  font: 600 0.75rem "Rajdhani", sans-serif;
  color: #9ef3ff;
}
.star-system--classic .star-jump-btn {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 10px 18px !important;
  border-radius: 2px !important;
  clip-path: none !important;
  font: 800 0.78rem "Orbitron", sans-serif !important;
  letter-spacing: 0.08em;
  border: 1px solid rgba(120, 200, 255, 0.55) !important;
  background: linear-gradient(180deg, #1a4a7a, #0c2848) !important;
  color: #e8f6ff !important;
  box-shadow: none !important;
}
.star-system--classic .star-jump-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.star-system--classic .star-jump-btn:hover:not(:disabled) {
  border-color: #b8ecff !important;
  background: linear-gradient(180deg, #2468a8, #123a68) !important;
}
