:root {
    /* Background & Grid */
    --bg-color: #1d1d1d;
    --grid-color: rgba(196, 196, 196, 0.1);

    /* Node general appearance */
    --node-width: 200px;
    --node-height: 150px;
    --node-radius: 20px;
    --node-border-width: 2px;

    /* Node colors */
    --node-bg-color: rgba(50, 50, 50, 0.9);
    --node-unlocked-color: #ee9e00;
    --node-border-color: rgb(70, 70, 70);
    --node-text-color: rgb(150, 150, 150);
    --node-text-unlocked-color: rgb(20, 20, 20);

    --node-next-color: rgb(100, 100, 100); /* color for nodes that are available next */
    --node-text-next-color: rgb(200, 200, 200); /* text color for next unlockable nodes */


    /* Node font */
    --node-title-font-family: 'Anton', sans-serif;
    --node-title-font-size: 18px;
    --node-title-font-weight: normal;
    --node-title-line-height: 1.2;

    --node-desc-font-family: 'Manrope', sans-serif;
    --node-desc-font-size: 12px;
    --node-desc-font-weight: 400;
    --node-desc-line-height: 1.3;

    /* Hover effects */
    --hover-scale: 1.1;
    --hover-bg-color: rgb(60, 60, 60);
    --hover-border-color: rgb(70, 70, 70);
    --hover-text-color: #ffffff;

    /* Node outline for hover/focus */
    --node-outline-color: rgba(235, 158, 0, 0);
    --node-outline-width: 4px;
    --node-outline-offset: 2px;

    /* Lines */
    --lockedLine-color: rgba(100, 100, 100, 0.5);
    --unlockedLine-color: rgba(237, 157, 0, 0.75);
    --nextLine-color: rgba(237, 157, 0, 0.25);
    --line-width: 3px;
}

body {
    margin: 0;
    font-family: Manrope, sans-serif;
    background-color: var(--bg-color);
    overflow: hidden;
}

html, body {
  touch-action: none;
  overflow: hidden;
  height: 100%;
  margin: 0;
}


#techTreeCanvas {
    display: block;
    background-color: var(--bg-color);
    cursor: grab;
    width: 100vw;
    height: 100vh;
    touch-action: none;
    transform-origin: center center;

}

/* Node Menu Styles */
#nodeMenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 29, 29, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#nodeMenuContent {
    background: rgba(29, 29, 29, 1);
    border: 2px solid #353535;
    border-radius: 20px;
    padding: 40px;
    width: 1000px;
    height: 10000px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    color: #fff;
}

#menuTitle {
    font-family: 'Climate Crisis', sans-serif;
    font-size: 3.05rem; /* h1 equivalent */
    line-height: 1.04em;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 0.3em;
}

#menuDescription {
    font-family: 'Manrope', sans-serif;
    font-size: 1.13rem;
    line-height: 1.6em;
    color: rgba(200,200,200,0.8);
    margin-bottom: 1rem;
}

/* Container styling */
#unlockToggleContainer {
  margin: 20px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  color: #efeee9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Hide default checkbox */
#unlockCheckbox {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--node-border-color);
  background-color: var(--node-bg-color);
  cursor: pointer;
  position: relative;
  transition: background 0.3s, border 0.3s;
}

/* Hover effect */
#unlockCheckbox:hover:not(:disabled) {
  border-color: var(--node-unlocked-color);
}

/* Checked state */
#unlockCheckbox:checked {
  background-color: var(--node-unlocked-color);
  border-color: var(--node-unlocked-color);
}

/* Disabled state */
#unlockCheckbox:disabled {
  background-color: #555;
  border-color: #333;
  cursor: not-allowed;
}

/* Dynamic centered checkmark */
#unlockCheckbox:checked::after {
  content: '';
  position: absolute;
  width: 25%;   /* relative to checkbox width */
  height: 50%;  /* relative to checkbox height */
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-50%, -50%);
  top: 50%;
  left: 25%;
}

#nodeMenu button {
  padding: 1em 1.5em;
  margin: 2em 3em;
  grid-column-gap: .5em;
  grid-row-gap: .5em;
  border: 0px solid transparent;
  border-radius: .5rem;
  background-color: #ef9e00;
  box-shadow: none;
  font-family: Manrope, sans-serif;
  color: #000;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  background-image: none;
  justify-content: center;
  align-items: center;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s cubic-bezier(.165, .84, .44, 1), box-shadow .2s;
  display: inline-flex;
}

#nodeMenu button:hover {
  border-color: transparent;
  background-color: #ffb82d;
  box-shadow: none;
  color: #000;
}

#nodeMenu button:active {
  background-color: #ef9e00;
  box-shadow: none;
}

#nodeMenu button:focus {
  outline-color: #ef9e00;
  outline-offset: 2px;
  outline-width: 2px;
  outline-style: solid;
}


.link_share {
    position:fixed;
    bottom:10px;
    right:10px;
    padding:25px;
    z-index:1;
    font-family: Manrope, sans-serif;
    font-size:12px;
    background: rgba(29, 29, 29, 1);
    border: 2px solid #353535;
    border-radius: 20px;
    text-align: center;
    color: #fff;
}

.copy_button {
  border: 0px solid transparent;
  border-radius: .5rem;
  background-color: #ef9e00;
  box-shadow: none;
  font-family: Manrope, sans-serif;
  color: #000;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  background-image: none;
  justify-content: center;
  align-items: center;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s cubic-bezier(.165, .84, .44, 1), box-shadow .2s;
  display: inline-flex;
}

.copy_button:hover {
  border-color: transparent;
  background-color: #ffb82d;
  box-shadow: none;
  color: #000;
}

.copy_button:active {
  background-color: #ef9e00;
  box-shadow: none;
}

.copy_button:focus {
  outline-color: #ef9e00;
  outline-offset: 2px;
  outline-width: 2px;
  outline-style: solid;
}

.rudimentPreview {
  border-radius: 20px;
}

/* Smaller nodes for mobile */
@media (max-width: 768px) {
  :root {
    --node-width: 150px;
    --node-height: 100px;
    --node-radius: 10px;
    --node-title-font-size: 15px;
    --node-desc-font-size: 10px;
  }

  #menuTitle {
    font-size: 2.05rem;
  }

  .rudimentPreview {
  border-radius: 10px;
  }

  .link_share {
      display: none;
  }
}

