
    html, body {
    margin: 0;
    padding: 0;
    overflow: hidden; /* prevents scrollbars entirely */
    height: 100%;
    width: 100%;
  }
  canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

    #drawCanvas {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 999; /* make sure it is above other elements */
      pointer-events: auto;
    }

    
    body {
      font-family: Arial, sans-serif;
      text-align: center;
      background-color: black;
      color: var(--text-color);
	  overflow-x: auto;
	  max-width: 100vw;
    }
    .chart-grid {
      display: grid;
      grid-template-columns: repeat(4, 100px);
      grid-template-rows: repeat(4, 100px);
      gap: 0px;
      width: max-content;
      margin: 10px auto;
    }

    .box {
      border: 1px solid #888;
      position: relative;
      align-items: center;
      justify-content: center;
     flex-wrap: nowrap;
    }

    .box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #aaa;
    height: 100px; /* adjust as needed */
    width: 100px;  /* adjust as needed */
    position: relative;
    font-family: sans-serif;
    font-size: 0.9em;
    }


    .box .planet-in-box {
    cursor: grab;
    background: none;
    padding: 0;
    margin: 2px 0;
    color: white;
    font-size: 1em;
    border: none;
    border-radius: 0;
    cursor: default;
    display: block;
    text-align: center;
    }

    .planet-in-box#Asc {
    color: red !important;
    font-weight: bold;
  }


    .hide {
      display: none;
    }



    canvas {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 10;
    }

    .toolbar {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(255, 255, 255, 0.95);
      box-shadow: 0 0 10px #aaa;
      padding: 10px 15px;
      border-radius: 12px;
      z-index: 999;
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .tool-btn {
      background: #f0f0f0;
      border: none;
      border-radius: 6px;
      padding: 8px;
      font-size: 18px;
      cursor: pointer;
    }

    .tool-btn.active {
      background: #ffd966;
    }

    #pen-color, #pen-size {
      height: 30px;
      cursor: pointer;
    }

  .chart-grid .box:nth-child(6),
    .chart-grid .box:nth-child(7),
    .chart-grid .box:nth-child(11),
    .chart-grid .box:nth-child(10) {
      visibility: hidden;
      pointer-events: none;
    }
    


#planet-tray .planet-in-box input[type="checkbox"] {
  transform: scale(0.8);
  vertical-align: middle;
}


#planet-tray .planet-in-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #444;
  padding: 6px 10px;
  margin: 4px;
  color: white;
  border-radius: 6px;
  cursor: grab;
  font-size: 13px;
}


.main-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 0rem;
}

#planet-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 00px;
  padding: 10px;
  background: #222;
  border-top: 1px solid #444;
  width: 100%;
  position: fixed;
  bottom: 76px; /* above drawing toolbar */
  left: 0;
  z-index: 998;
}



.modern-toolbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid #444;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 8px 14px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
}

.draw-tool {
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 16px;
  color: #eee;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.draw-tool:hover {
  background: #555;
  transform: scale(1.05);
}

.draw-tool.active {
  background: #ffbe00;
  color: #000;
  font-weight: bold;
}

.color-picker-wrap {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid #aaa;
  display: inline-block;
  cursor: pointer;
}

.color-picker-wrap input[type="color"] {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.color-preview {
  display: none; /* Not needed visually */
}


.size-slider {
  width: 20px !important;   /* Or 60px, adjust as needed */
  min-width: 20px;
  max-width: 50px;
  margin: 0 8px;
  height: 4px;
  accent-color: #ffbe00;
  cursor: pointer;
}


.tray input[type="number"] {
  background: #111;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  text-align: center;
}


.chart-grid {
  background: #000 !important;
}
.box, .planet-in-box {
  color: #fff !important;
}

.chart-grid, .box {
  box-sizing: border-box;
}

@media (max-width: 400px) {
  .chart-grid {
    transform: scale(0.9);             /* scale down just enough to fit */
    transform-origin: top center;
  }
}

@media (max-width: 400px) {
  .chart-grid {
    grid-template-columns: repeat(4, 22vw);
    grid-template-rows: repeat(4, 22vw);
  }

  .box {
    width: 22vw;
    height: 22vw;
  }
}
