/* Blender-style Technical Debug UI */
.fps-widget {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 4px;
  background: rgba(34, 34, 34, 0.88);
  border: 1px solid #1b1b1b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 11px;
  line-height: 1;
  color: #d8d8d8;
  pointer-events: none;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.fps-widget[hidden] {
  display: none;
}

.fps-value {
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #8ad879;
}

.fps-unit {
  color: #9b9b9b;
  font-size: 10px;
}

.fps-sep {
  color: #555555;
}

.fps-ms {
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #b8b8b8;
}

.debug-panel {
  position: fixed;
  top: 44px;
  right: 12px;
  z-index: 30;
  width: 286px;
  max-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  background: #2b2b2b;
  border: 1px solid #181818;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 11.5px;
  color: #dcdcdc;
  user-select: none;
}

.debug-panel[hidden] {
  display: none;
}

.debug-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #222222;
  border-bottom: 1px solid #1a1a1a;
  border-radius: 5px 5px 0 0;
}

.debug-title {
  font-weight: 600;
  font-size: 12px;
  color: #e6e6e6;
}

.debug-hotkey {
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 3px;
  background: #333333;
  border: 1px solid #1e1e1e;
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 10px;
  color: #9e9e9e;
}

.debug-close {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #a8a8a8;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.debug-close:hover {
  background: #3d3d3d;
  color: #ffffff;
}

.debug-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
}

.debug-section {
  background: #353535;
  border: 1px solid #242424;
  border-radius: 4px;
  padding: 7px 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debug-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #b4b4b4;
  padding-bottom: 4px;
  border-bottom: 1px solid #2a2a2a;
}

.debug-check {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: #dcdcdc;
  font-size: 11.5px;
}

.debug-check input[type="checkbox"] {
  accent-color: #4772b3;
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.debug-row {
  display: grid;
  grid-template-columns: 78px 1fr 40px;
  align-items: center;
  gap: 7px;
}

.debug-label {
  color: #c8c8c8;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debug-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 3px;
  background: #474747;
  border: 1px solid #262626;
  outline: none;
  cursor: ew-resize;
}

.debug-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  background: #4772b3;
  border: 1px solid #223859;
  cursor: ew-resize;
}

.debug-row input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 14px;
  border-radius: 2px;
  background: #4772b3;
  border: 1px solid #223859;
  cursor: ew-resize;
}

.debug-row input[type="range"]:hover {
  background: #525252;
}

.debug-val {
  text-align: right;
  font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #e6e6e6;
  font-variant-numeric: tabular-nums;
}

.debug-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.debug-btn {
  width: 100%;
  padding: 6px 10px;
  border-radius: 4px;
  background: #474747;
  border: 1px solid #232323;
  color: #e4e4e4;
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.debug-btn:hover {
  background: #545454;
}

.debug-btn:active {
  background: #4772b3;
  color: #ffffff;
}
