html, body {
  margin: 0;
  
  overflow: hidden;
  font-family: monospace;
}

canvas {
  display: block;
}

h1 {
  color: var(--ui-label, lime);
  margin: 0 0 15px 0;
  font-size: 5em;
}
header {
  position: relative;
  display: center;
}
#controls {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px;
  border: 1px solid var(--ui-border, lime);
  color: var(--ui-label, lime);
  max-height: 90vh;
  overflow: hidden;
}

#controls label,
#controls select,
#controls button {
  margin-bottom: 8px;
  display: block;
}

#controls input,
#controls select,
#controls button {
  background: black;
  border: 1px solid var(--ui-border, lime);
  color: var(--ui-label, lime);
  padding: 4px;
}

/* Themed sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}
input[type="range"]:focus {
  outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: color-mix(in srgb, var(--ui-glow, #00FF99) 25%, transparent);
  border: 1px solid var(--ui-border, lime);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  background: black;
  border: 1px solid var(--ui-border, lime);
  box-shadow: 0 0 6px var(--ui-glow, #00FF99);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: color-mix(in srgb, var(--ui_glow_fallback, #00FF99) 25%, transparent);
  border: 1px solid var(--ui-border, lime);
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: black;
  border: 1px solid var(--ui-border, lime);
  box-shadow: 0 0 6px var(--ui-glow, #00FF99);
}
.flash {
  box-shadow: 0 0 15px 5px rgba(0, 255, 153, 0.7);
  transition: box-shadow 0.5s ease;
}

#afterglowControl {
  width: 100%;
  margin-top: 4px;
}

#afterglowValue {
  display: inline-block;
  min-width: 45px;
  text-align: right;
  margin-left: 8px;
}

.control-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#controls .window-body {
  max-height: 70vh;
  overflow-y: auto;
}

.control-section h3 {
  margin: 0 0 15px 0;
  font-size: 14px;
  font-weight: normal;
}

#knobControls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* Onboarding Styles */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
  display: none;
  animation: fadeIn 0.3s ease;
}

.onboarding-highlight {
  position: fixed;
  border: 3px solid #00FF99;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(0, 255, 153, 0.3),
              0 0 20px rgba(0, 255, 153, 0.5),
              inset 0 0 20px rgba(0, 255, 153, 0.1);
  pointer-events: none;
  z-index: 9999;
  display: none;
  animation: pulse 2s ease-in-out infinite;
  background: rgba(0, 255, 153, 0.05);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(0, 255, 153, 0.3),
                0 0 20px rgba(0, 255, 153, 0.5),
                inset 0 0 20px rgba(0, 255, 153, 0.1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 255, 153, 0.5),
                0 0 30px rgba(0, 255, 153, 0.7),
                inset 0 0 30px rgba(0, 255, 153, 0.2);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.onboarding-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid #00FF99;
  border-radius: 12px;
  padding: 0;
  max-width: 420px;
  z-index: 10000;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 255, 153, 0.3),
              0 0 60px rgba(0, 255, 153, 0.2);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 255, 153, 0.3);
  background: rgba(0, 255, 153, 0.05);
}

.onboarding-header h3 {
  margin: 0;
  color: #00FF99;
  font-size: 18px;
  font-weight: bold;
  font-family: monospace;
}

.onboarding-close {
  background: transparent;
  border: 1px solid #00FF99;
  color: #00FF99;
  font-size: 24px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
}

.onboarding-close:hover {
  background: rgba(0, 255, 153, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.5);
}

.onboarding-content {
  padding: 20px;
  color: #e0e0e0;
  font-family: monospace;
  line-height: 1.6;
}

.onboarding-content p {
  margin: 0;
  font-size: 14px;
}

.onboarding-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 255, 153, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.onboarding-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.onboarding-progress span {
  color: #00FF99;
  font-size: 12px;
  font-family: monospace;
}

.onboarding-dots {
  display: flex;
  gap: 6px;
}

.onboarding-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 255, 153, 0.3);
  border: 1px solid rgba(0, 255, 153, 0.5);
  transition: all 0.3s ease;
}

.onboarding-dots .dot.active {
  background: #00FF99;
  box-shadow: 0 0 8px rgba(0, 255, 153, 0.8);
  transform: scale(1.2);
}

.onboarding-dots .dot.completed {
  background: rgba(0, 255, 153, 0.6);
  border-color: #00FF99;
}

.onboarding-buttons {
  display: flex;
  gap: 10px;
}

.onboarding-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: bold;
}

.onboarding-btn.primary {
  background: #00FF99;
  color: #000;
  border: 2px solid #00FF99;
}

.onboarding-btn.primary:hover {
  background: #00cc7a;
  box-shadow: 0 0 15px rgba(0, 255, 153, 0.6);
  transform: translateY(-1px);
}

.onboarding-btn.secondary {
  background: transparent;
  color: #00FF99;
  border: 2px solid #00FF99;
}

.onboarding-btn.secondary:hover {
  background: rgba(0, 255, 153, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 153, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .onboarding-tooltip {
    max-width: calc(100vw - 40px);
    left: 20px !important;
    right: 20px !important;
    transform: none !important;
  }
  
  .onboarding-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .onboarding-buttons {
    width: 100%;
  }
  
  .onboarding-btn {
    flex: 1;
  }
} 

/* Retro window header and buttons */
    #controls { user-select: none; }
    #controls.window-collapsed .window-body { display: none; }
    .window-header {
      display: flex; align-items: center; gap: 8px;
      background: rgba(0, 0, 0, 0.9);
      cursor: move;
    }
    .window-title { font-weight: bold; }
    .window-spacer { flex: 1; }
    .retro-btn {
      background: black; color: lime; border: 1px solid lime; padding: 2px 8px;
      cursor: pointer;
    }
    .retro-btn a{
      background: rgba(0, 0, 0, 0); color: lime; border: 1px solid lime; padding: 2px 8px;
      cursor: pointer;
    }
    .retro-btn:active { background: #002000; }

    /* Instructions modal */
    .modal-backdrop {
      position: fixed; inset: 0; background: rgba(0,0,0,0.6);
      display: none; align-items: center; justify-content: center; z-index: 9999;
    }
    .modal {
      background: rgba(0,0,0,0.95); color: rgb(255, 255, 255); border: 1px solid rgb(255, 255, 255); width: 520px;
      max-width: calc(100% - 32px);
    }
    .home-text{
      color: rgb(255, 255, 255);  width: 520px;
      max-width: calc(100% - 32px);
      text-align: center;
      font-size: 18px;
    }
    .modal header { border-bottom: 1px solid rgb(255, 255, 255); padding: 8px; font-weight: bold; }
    .modal .content { padding: 12px; line-height: 1.4; }
    .modal footer { padding: 8px; border-top: 1px solid rgb(255, 255, 255); text-align: right; }
    li { color: white;}

    .navbar a{
      color: rgb(255, 255, 255);
      text-align: center;
      margin: 20px 10px 10px 10px;
    }
    .navbar a:hover{
      color: lime;
      text-align: center;
      margin: 20px 10px 10px 10px;
    }

    .navbar{
      display: flex;
      align-items: center;
      justify-content: center;
      align-content: center;
    }