/* ─── Debug FAB ──────────────────────────────── */
.debug-fab {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #666;
  background: #222;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 9999;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.debug-fab:hover { opacity: 1; }
.debug-fab--active {
  border-color: #ff6b35;
  opacity: 0.8;
  box-shadow: 0 0 8px rgba(255, 107, 53, 0.5);
}

/* ─── Debug Panel ────────────────────────────── */
.debug-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 90vw;
  height: 100vh;
  background: #1a1a2e;
  color: #e0e0e0;
  z-index: 10000;
  box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.2s ease-out;
  font-size: 13px;
}
.debug-panel--open { transform: translateX(0); }
.debug-panel--closing { transform: translateX(-100%); }

.debug-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #16213e;
  font-weight: bold;
  font-size: 14px;
  border-bottom: 1px solid #333;
}
.debug-panel__close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.debug-panel__close:hover { color: #fff; }

.debug-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 24px;
}

/* ─── Section ────────────────────────────────── */
.debug-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ff6b35;
  margin: 16px 0 6px;
  padding-top: 8px;
  border-top: 1px solid #333;
}
.debug-section-title:first-child { border-top: none; margin-top: 8px; }

/* ─── Row ────────────────────────────────────── */
.debug-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  gap: 8px;
}

.debug-hint {
  font-size: 11px;
  color: #888;
  padding: 2px 0;
}

/* ─── Toggle ─────────────────────────────────── */
.debug-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #444;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.debug-toggle--on { background: #ff6b35; }
.debug-toggle__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
}
.debug-toggle--on .debug-toggle__knob { left: 20px; }

/* ─── Segment ────────────────────────────────── */
.debug-segment {
  display: flex;
  gap: 2px;
  background: #333;
  border-radius: 6px;
  padding: 2px;
}
.debug-seg-btn {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: #aaa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.15s, color 0.15s;
}
.debug-seg-btn:hover { background: #444; color: #fff; }
.debug-seg-btn--active { background: #ff6b35; color: #fff; }

/* ─── Inputs ─────────────────────────────────── */
.debug-input {
  background: #333;
  border: 1px solid #555;
  color: #e0e0e0;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
}
.debug-input--num {
  width: 80px;
  text-align: right;
}
.debug-input:focus {
  outline: none;
  border-color: #ff6b35;
}

/* ─── Buttons ────────────────────────────────── */
.debug-btn {
  padding: 6px 12px;
  border: 1px solid #555;
  background: #333;
  color: #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s;
}
.debug-btn:hover { background: #444; }
.debug-btn--sm { padding: 2px 6px; font-size: 11px; }
.debug-btn--danger { border-color: #c0392b; color: #e74c3c; }
.debug-btn--danger:hover { background: #c0392b; color: #fff; }

/* ─── localStorage list ──────────────────────── */
.debug-ls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  gap: 8px;
}
.debug-ls-key {
  font-size: 11px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* ─── Auto Mode indicator (floating badge in quiz) */
.debug-auto-badge {
  position: fixed;
  top: 8px;
  left: 8px;
  background: #ff6b35;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  z-index: 9998;
  animation: debug-pulse 1.5s infinite;
}
@keyframes debug-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
