html, body {
  margin: 0;
  padding: 0;
}
canvas {
  display: block;
}

/* Tweakpane styling */
.tp-dfwv,
.tp-rotv {
  position: fixed !important;
  top: 10px !important;
  right: 10px !important;
  z-index: 9999 !important;
  max-height: calc(100vh - 20px) !important;
  overflow-y: auto !important;
  width: 320px !important;
}

/* Make Tweakpane scrollable if content is too tall */
.tp-dfwv::-webkit-scrollbar,
.tp-rotv::-webkit-scrollbar {
  width: 8px;
}

.tp-dfwv::-webkit-scrollbar-track,
.tp-rotv::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.tp-dfwv::-webkit-scrollbar-thumb,
.tp-rotv::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.tp-dfwv::-webkit-scrollbar-thumb:hover,
.tp-rotv::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Help Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #1a1a1a;
  color: #e0e0e0;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #444;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.close-modal {
  color: #999;
  float: right;
  font-size: 32px;
  font-weight: bold;
  line-height: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
  color: #fff;
}

.modal-content h2 {
  margin-top: 0;
  color: #fff;
  border-bottom: 2px solid #444;
  padding-bottom: 10px;
}

.modal-content h3 {
  color: #ddd;
  margin-top: 25px;
  margin-bottom: 10px;
  font-size: 18px;
}

.help-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

.help-content p {
  margin: 10px 0;
}

.help-content ul {
  margin: 10px 0;
  padding-left: 25px;
}

.help-content li {
  margin: 8px 0;
}

.help-content code {
  background-color: #2a2a2a;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  color: #4fc3f7;
}

.help-section {
  margin-bottom: 25px;
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 5px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #777;
}