@import url('https://fonts.googleapis.com/css2?family=Orbitron&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/firacode/6.2.0/fira_code.css');

body {
  background: #0a0a0a;
  background-position: center;
  color: #6cff6c;
  font-family: 'Fira Code', monospace, sans-serif;
  margin: 0;
  padding: 20px;
  user-select: none;
}
h1 {
  text-align: center;
  color: #6cfd6c;
  margin-bottom: 28px;
  text-shadow: 0 0 4px #2f9e1b;
}
.container {
  max-width: 960px;
  margin: auto;
  display: flex;
  gap: 24px;
  flex-wrap: nowrap;
  height: 80vh; 
}
.preview {
  background: #111;
  border: 3px solid #2f9e1b;
  border-radius: 12px;
  padding: 16px;
  width: 280px;
  box-shadow: 0 0 20px #2f9e1baa inset;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: sticky;
  top: 20px;
  height: fit-content;
}


#reticleCanvas {
  image-rendering: pixelated;
  width: 280px;
  height: 280px;
  border: 2px solid #3cba54;
  background: #0a0a0a;
  box-shadow: 0 0 12px #3cba54 inset;
  border-radius: 8px;
  display: block;
}
.controls {
  flex: 1 1 auto;
  background: #111;
  border: 0.2px solid #3cba54;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 15px #2f9e1bbb inset;
  overflow-y: auto;
  max-height: 80vh;
}
.section {
  margin-bottom: 28px;
  border: 1.8px solid #2f9e1b;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: inset 0 0 8px #2f9e1b99;
}
.section h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #d68a00;
  text-shadow: 0 0 0px #d68a00;
  font-weight: 700;
  font-size: 1.25rem;
}
label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
  font-weight: 600;
  font-size: 0.93rem;
  color: #ffd07b;
}
input[type="range"] {
  flex-grow: 1;
  margin-left: 16px;
  cursor: pointer;
  accent-color: #3cba54;
}
input[type="color"] {
  cursor: pointer;
  border: none;
  background: transparent;
  width: 36px;
  height: 28px;
}
input[type="checkbox"] {
  transform: scale(1.2);
  cursor: pointer;
  margin-left: 12px;
  filter: drop-shadow(0 0 1px #2f9e1b);
}
.btn-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 12px;
}
button {
  background: #6cfd6c;
  border: 2px solid #3cba54;
  border-radius: 10px;
  color: #111;
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 26px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-shadow: 0 0 1px #16430b;
}
button:hover {
  background: #00ff00;
}


/* Tooltips */
label[title] {
  position: relative;
  cursor: help;
}
label[title]::after {
  content: ' ⓘ';
  font-size: 0.8rem;
  color: #d88e00;
  margin-left: 6px;
  user-select: none;
}
label[title]:hover::before {
  content: attr(title);
  position: absolute;
  bottom: 120%;
  left: 0;
  background: #2f9e1bdd;
  color: #111;
  font-size: 0.8rem;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 6px #2f9e1bcc;
  z-index: 999;
}


/* Custom Scrollbar for WebKit browsers */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a; /* Matches your site background */
  border: 1px solid #2f9e1b;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background-color: #6cfd6c;
  border-radius: 10px;
  box-shadow: 0 0 6px #2f9e1b;
  border: 2px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #6cff6c;
  box-shadow: 0 0 8px #6cff6c;
}

/* Container for each slider row */
.slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Label text */
.slider-row label {
  color: #ffcc66;
  font-family: "Trebuchet MS", sans-serif;
  font-size: 14px;
  text-shadow: 1px 1px 2px #000;
  white-space: nowrap;
}

/* Minus/plus buttons */
.slider-btn {
  width: 18px;
  height: 18px;
  background: #0a0;
  border-radius: 50%;
  border: 1px solid #0f0;
  box-shadow: 0 0 4px #0f0;
  color: #000;
  font-weight: bold;
  text-align: center;
  line-height: 16px;
  cursor: pointer;
}

/* Range track */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  background: #165603;
  border-radius: 1px;
  border-color: #84d468;
  border: 2px solid #84d468;
  box-shadow: inset 0 0 4px #0f0;
}

/* Thumb styling for Chrome/Edge/Safari */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 20px;
  background: #000001;
  border: 0.5px solid #ccc;
  box-shadow: 0 0 2px #000;
  cursor: pointer;
  margin-top: 0px; /* center thumb */
}

/* Thumb styling for Firefox */
input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 14px;
  background: #ccc;
  border: 1px solid #fff;
  box-shadow: 0 0 4px #000;
  cursor: pointer;
}

/* Advanced Options Toggle Button */
#advancedToggle {
  cursor: pointer;
  background-color: #2f9e1b;
  border: none;
  color: #d88e00;
  font-family: 'Orbitron', monospace, sans-serif;
  font-weight: 700;
  padding: 8px 16px;
  margin: 15px 0 5px 0;
  border-radius: 8px;
  box-shadow: 0 0 10px #2f9e1b;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
}

#advancedToggle:hover {
  background-color: #248315;
  box-shadow: 0 0 14px #32c632;
}

/* Advanced Section Container */
#advancedSection {
  border: 1.8px solid #2f9e1b;
  padding: 14px 18px;
  border-radius: 10px;
  margin-top: 5px;
  box-shadow: inset 0 0 8px #2f9e1b99;
  display: none; /* hidden by default, toggled by JS */
}

/* Label styling inside advanced section */
#advancedSection label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  font-weight: 600;
  font-size: 0.93rem;
  color: #ffd07b;
  cursor: help; /* keep tooltip hint */
}

/* Keep inputs consistent with your other controls */
#advancedSection input[type="range"],
#advancedSection input[type="color"],
#advancedSection input[type="number"],
#advancedSection select {
  margin-left: 16px;
  cursor: pointer;
  accent-color: #3cba54;
  font-family: 'Fira Code', monospace, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 80px;
}



input[type="checkbox"] {
  /* Remove transform scale */
  transform: none; 
  /* Explicit size */
  width: 20px;
  height: 20px;
  /* Vertical centering tweaks */
  margin-left: 12px;
  margin-top: 2px; /* slight nudge for visual baseline alignment */
  cursor: pointer;
  filter: drop-shadow(0 0 1px #2f9e1b);
  flex-shrink: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

input[type="color"] {
  width: 355px;
  height: 28px;
  margin-left: 12px;
  margin-top: 2px; /* match checkbox vertical nudge */
  cursor: pointer;
  border: none;
  background: transparent;
  flex-shrink: 0;
  box-sizing: border-box;
  vertical-align: middle;
}



