body {
  margin: 0;
  overflow: hidden;
}
canvas {
  display: block;
}
#about-button {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 1001;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.9);
  color: #111;
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  font-size: 13px;
  cursor: pointer;
}
#about-button:hover {
  background: #fff;
}
#about-modal[hidden] {
  display: none;
}
#about-modal .about-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1200;
}
#about-modal .about-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 40px));
  max-height: calc(100% - 120px);
  overflow: auto;
  background: #fff;
  color: #111;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: 20px 20px 24px;
  z-index: 1201;
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
}
#about-modal .about-content h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}
#about-modal .about-content p {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}
#about-modal .about-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #fff;
  cursor: pointer;
}
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* don't block interactions with scene */
  z-index: 1000;
  padding: 12px 0;
  background: transparent;
}
#site-header h1 {
  margin: 0;
  color: black;
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  background: white;
}
#info-box {
  position: fixed;
  left: 20px;
  bottom: 20px;
  min-width: 220px;
  min-height: 60px;
  background: hsla(0, 0%, 10%, 0.8); /* Tweakpane base background
  /* background: transparent; */
  color: hsla(0, 0%, 100%, 0.8); /* Tweakpane foreground */
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
  font-size: 13px;
  border-radius: 6px;
  padding: 10px 14px;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.20);
  /*border: 1px solid hsla(0, 0%, 100%, 0.08); Optional border */
  transition: opacity 0.2s;
  opacity: 0.97;
  letter-spacing: 0.01em;
}
#info-box b {
  color: hsla(0, 0%, 100%, 0.5);
  font-weight: 500;
  font-family: inherit;
}

/* Query Panel Styles */
#query-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 300px;
  z-index: 1000;
  font-family: 'Inter', 'Segoe UI', 'Arial', sans-serif;
}

#query-toggle {
  background: hsla(0, 0%, 100%, 0.8);
  color: hsla(0, 100%, 50%, 0.8);
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

#query-toggle:hover {
  background: hsla(0, 0%, 20%, 0.9);
}

#query-content {
  background: hsla(0, 0%, 10%, 0.9);
  color: hsla(0, 0%, 100%, 0.8);
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  border-radius: 6px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.3);
  max-height: 400px;
  overflow-y: auto;
}

.query-section {
  margin-bottom: 16px;
}

.query-section label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  color: hsla(0, 0%, 100%, 0.7);
}

#predefined-queries {
  width: 100%;
  padding: 6px 8px;
  background: hsla(0, 0%, 20%, 0.8);
  color: hsla(0, 0%, 100%, 0.9);
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 8px;
}

#custom-sparql {
  width: 100%;
  height: 80px;
  padding: 8px;
  background: hsla(0, 0%, 20%, 0.8);
  color: hsla(0, 0%, 100%, 0.9);
  border: 1px solid hsla(0, 0%, 100%, 0.2);
  border-radius: 4px;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  resize: vertical;
  margin-bottom: 8px;
}

button {
  background: hsla(0, 0%, 30%, 0.8);
  color: hsla(0, 0%, 100%, 0.9);
  border: 1px solid hsla(0, 0%, 100%, 0.3);
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: 6px;
  margin-bottom: 6px;
}

button:hover {
  background: hsla(0, 0%, 40%, 0.9);
}

button:active {
  background: hsla(0, 0%, 50%, 0.9);
}

.query-controls {
  border-top: 1px solid hsla(0, 0%, 100%, 0.2);
  padding-top: 12px;
  margin-top: 12px;
}

#query-results {
  border-top: 1px solid hsla(0, 0%, 100%, 0.2);
  padding-top: 12px;
  margin-top: 12px;
}

#query-results h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: hsla(0, 0%, 100%, 0.9);
}

#results-content {
  max-height: 150px;
  overflow-y: auto;
  font-size: 11px;
  line-height: 1.4;
}

.result-item {
  background: hsla(0, 0%, 20%, 0.5);
  border: 1px solid hsla(0, 0%, 100%, 0.1);
  border-radius: 3px;
  padding: 6px 8px;
  margin-bottom: 4px;
}

.result-item .letter-id {
  font-weight: 500;
  color: hsla(200, 100%, 70%, 1);
}

.result-item .letter-title {
  color: hsla(0, 0%, 100%, 0.8);
  margin: 2px 0;
}

.result-item .letter-meta {
  color: hsla(0, 0%, 100%, 0.6);
  font-size: 10px;
}