  body {
    height: 100%;
    margin: 0;
    padding: 0;

}
#contentWrapper {
  height: calc(100% - 60px); /* Adjust exactly to your footer height */
  display: flex;
  flex-direction: column;
}

#threeContainer {
  flex: 1;
  width: 100%;
  border: 1px solid #333;
  position: relative;
  overflow: hidden;
}
  .menu-bar {
    position: absolute;
    top: 60px !important;
    left: 10px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none !important;
    padding: 0;
  }

  .menu-bar button {
    background: none;
    border: none;
    padding: 0px;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px !important;
    color: #fff;
    font-size: 14px;
    margin-bottom: 0px;
  }

  .menu-bar button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
  }

  .menu-bar img {
    width: 20px;
    height: 20px;
  }

  .pin-type-btn.active {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid #fff !important;
  }
  .linking-cursor {
    cursor: url("/static/images/link_cursor.png") 16 16, crosshair;
  }
  /* Font Face Definitions */

  @font-face {
    font-family: 'EVE Sans Neue';
    src: url("/static/css/fonts/eve_sans_neue/evesansneue-expanded.otf");
    font-weight: 400;
    font-style: normal;
    font-stretch: expanded;
}


  /* Apply to UI Elements */
  .menu-bar, .menu-bar button, .menu-bar select {
    font-family: 'EVE Sans Neue', sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
  }

  /* Specific weights */
  .menu-bar button {
    font-family: 'EVE Sans Neue', sans-serif;
    font-size: 12px !important;
    font-stretch: expanded;
    letter-spacing: 0.05em;
}

  .menu-bar select {
    font-weight: 400;
  }
  .selected-button {
    border: 1px solid #40656b !important;
    background-color: #40656b !important;
    color: #cfe8e9 !important;
    padding: 10px 16px !important;
    width: 120px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    clip-path: polygon(0 0, 0 77%, 7% 100%, 100% 100%, 100% 68%, 97% 68%, 97% 30%, 100% 29%, 100% 0) !important;
    margin-right: -4px;
    text-shadow : 1px 1px 2px #263b41, 1px 1px 2px #263b41 !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}
.unselected-button {
    border: 1px solid #323932 !important;
    background-color: #323932 !important;
    color: #a6aaa9 !important;
    padding: 10px 16px !important;
    width: 120px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    clip-path:  polygon(100% 0, 100% 77%, 93% 100%, 0 100%, 0 68%, 3% 68%, 3% 30%, 0 29%, 0 0) !important;
    margin-left: -4px;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;

}
/* Hover effects */
.selected-button:hover,
.unselected-button:hover {
  filter: brightness(1.15);
  transition: all 0.3s ease;
}

.unselectedsave-button {
  border: 1px solid #323932 !important;
  background-color: #323932 !important;
  color: #a6aaa9 !important;
  padding: 10px 16px !important;
  width: 120px !important;
  font-size: 11px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  clip-path:  polygon(100% 0, 100% 77%, 93% 100%, 0 100%, 0 68%, 0% 68%, 0% 30%, 0 29%, 0 0) !important;
  margin-left: -4px;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;

}
/* Hover effects */
.selected-button:hover,
.unselectedsave-button:hover {
filter: brightness(1.15);
transition: all 0.3s ease;
}

.horizontal-button-group {
    position: absolute;
    top: 10px; /* Same as original menu-bar position */
    left: 10px;
    display: flex;
    flex-direction: row;
    background: none !important; /* Match menu-bar transparency */
    z-index: 999; /* Same as menu-bar */
    align-items: flex-start !important;
}

.horizontal-button-group button {
    margin: 0 2px;
    width: auto;
    text-align: center;
    position: relative;
}

.save-template-button-group {
  position: absolute;
  top: 260px; /* Same as original menu-bar position */
  left: 10px;
  display: flex;
  flex-direction: row;
  background: none !important; /* Match menu-bar transparency */
  z-index: 999; /* Same as menu-bar */
  align-items: flex-start !important;
}

.save-template-button-group button {
  margin: 0 2px;
  width: auto;
  text-align: center;
  position: relative;
}

.planet-selector-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;            /* make it one layer above the buttons (999) */
  max-width: 60vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 3px;
  background: rgba(28, 38, 40, 0.85) !important;
  border: 1px solid #162022;
  border-bottom: 1px solid #648c8b !important;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

/* if the screen is too narrow, push it below your menu-bar */
@media (max-width: 600px) {
  .planet-selector-bar {
    left: 67%;
    transform: translateX(-7%);
    width: calc(39% - 24px);
  }
}

.planet-selector-bar select {
  margin-left: 8px;
  padding: 4px 6px;
  background: rgba(20, 20, 20, 0.6);
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
}

.planet-label {
  display: flex;
  flex-direction: row;      /* side-by-side */
  align-items: center;      /* vertically center text with dropdown */
  gap: 0.5em;               /* space between label text and select */
}

/* 2) On small screens (e.g. ≤600px), stack & center */
@media (max-width: 600px) {
  .planet-label {
    flex-direction: column; /* text above the dropdown */
    align-items: center;    /* center horizontally */
  }

  /* optional: give a tiny bit of bottom margin under the text only on mobile */
  .planet-label__text {
    margin-bottom: -0.5em;
    text-align: center;
  }
}

.pin-modal {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  background: #1c2628 !important; /* Darker background */
  padding: 3px; /* Reduced from 10 to 8 to tighten spacing */
  border-top: 1px solid #648c8b !important;
  border: 1px solid #162022;
  z-index: 1000;
  width: 350px; /* Slightly narrower */
  max-width: 90%;
  color: #a6aaa9;
  font-family: 'EVE Sans Neue', sans-serif;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  opacity: .85;
}

.pin-modal-header {
  cursor: move; 
  padding: 8px; /* Reduced padding */
  position: relative;
}

.pin-modal-title {
  margin: 0;
  padding-bottom: 8px;
  color: #ced3d6;
  font-size: 17px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.pin-modal-close {
  position: absolute;
  top: -6px;
  right: 0px;
  color: #a6aaa9 !important;
  font-size: 56px;
  cursor: pointer;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
  transition: color 0.3s ease, transform 0.2s ease !important;
  border-radius: 50%;
  line-height: 1;
}

.pin-modal-close:hover {
  color: #cfe8e9 !important;
  transform: scale(1.2);
}

.pin-modal-content {
  position: relative;
  padding: 10px; /* Reduced padding */
}

/* The actions row (icons) now has less padding and margin at the bottom */
.pin-modal-actions {
  display: flex;
  justify-content: space-between;
  background: #283033;
  padding: 8px; /* Reduced padding */
  margin: 12px 0px; /* Slightly less bottom margin */
}

.pin-modal-actions.few-buttons {
  justify-content: center;
  gap: 12px;
}

.pin-modal-btn {
  background: none;
  border: none;
  color: #a6aaa9;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.pin-modal-btn:hover {
  color: #cfe8e9;
}

/* Make the installed item align to the left instead of being centered */
.installed-item {
  margin-bottom: 10px;
  text-align: left;
}

/* Reduced vertical spacing above the resource list */
.resource-list {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #5b6365  #171f21;
  cursor: pointer;
}
.resource-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.resource-list::-webkit-scrollbar-track {
  background: #171f21;
}

.resource-list::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 10px;
  border: 2px solid #171f21;
}

.resource-item {
  display: flex;
  align-items: center;
  padding: 3px; /* Reduced from 10 to 8 to tighten spacing */
  transition: background-color 0.2s ease;
  color: #d3d7da
}

/* Hover effects */
.resource-item:hover {
filter: brightness(1.15);
background-color: #40656b
}

.resource-item img {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}

.resource-item span {
  margin-right: 15px;
}

.resource-item.selected {
  background-color: #335058; 
}

/* Reduced top margin and slightly smaller button size for a tighter layout */
.install-button {
  margin: 8px auto 4px auto; 
  padding: 8px 16px; 
  background-color: #2d4047; 
  color: #c9d8df;
  border: 1px solid #7b9095;
  cursor: pointer;
  font-family: 'EVE Sans Neue', sans-serif;
  font-size: 14px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.install-button:hover {
  background-color: #2a2e2a;
  color: #a6aaa9;
  transform: translateY(-1px);
}

/* Custom cursors remain unchanged */
.decommission-cursor {
  cursor: url("/static/images/decommission_cursor.png") 16 16, not-allowed;
}

.route-cursor {
  cursor: url("/static/images/route_cursor.png") 16 16, pointer;
}

.production-info {
  margin-top: 10px;
  border-top: 1px solid #444; /* visually separate from the installed item */
  padding-top: 8px;
}

.production-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.production-header img {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}

.production-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.production-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.production-input-item {
  display: flex;
  align-items: center;
  gap: 4px; 
  background: #2d2d2d; /* or none, per your design */
  padding: 4px 8px;
  border-radius: 4px;
}

.production-input-item img {
  width: 24px;
  height: 24px;
}

/* Modal container - hidden by default */
.eve-modal {
  display: none;            /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
  backdrop-filter: blur(3px);
}

/* Modal content box */
.eve-modal-content {
  background: #1d1d1d;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 500px;
  margin: 80px auto;
  padding: 20px;
  color: #ccc;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  font-family: Arial, sans-serif;
}

/* Title heading */
.eve-modal-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 300;
  color: #999;
}

/* Text field style */
.eve-modal-content input[type="text"] {
  width: 100%;
  padding: 10px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #ccc;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

/* Actions row (buttons) */
.eve-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Buttons */
.eve-modal-content button {
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid #444;
  background: #333;
  color: #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
}

.eve-modal-content button:hover {
  background: #3f3f3f;
  border-color: #666;
}

#eveAlertModal p {
  margin-top: 10px;
  font-size: 14px;
  color: #ccc;
}
.input-title {
  color: #d6dbde;
}

.producing-title {
  color: #d6dbde;
}

select, input[type="text"] {
  padding: 6px;
  background-color: #1e1e1e;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
}

.mode-btn.active {
  background: rgba(255,255,255,0.2);
  border: 1px solid #fff;
}
