#tweaks-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 999;
  font-family: 'Inter', system-ui, sans-serif;
}

.tweaks-panel {
  background: rgba(6, 15, 31, 0.97);
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 8px;
  width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.tweaks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: rgba(201, 169, 97, 0.07);
  border-bottom: 1px solid rgba(201, 169, 97, 0.12);
  cursor: pointer;
  user-select: none;
}

.tweaks-header-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.tweaks-toggle-icon {
  font-size: 0.7rem;
  color: rgba(245, 239, 225, 0.4);
  transition: transform 0.2s ease;
}

.tweaks-toggle-icon.open {
  transform: rotate(180deg);
}

.tweaks-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.tweaks-body.open {
  max-height: 520px;
  overflow-y: auto;
}

.tweaks-body::-webkit-scrollbar {
  width: 3px;
}

.tweaks-body::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.2);
  border-radius: 2px;
}

.tweak-section {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(201, 169, 97, 0.07);
}

.tweak-section:last-child {
  border-bottom: none;
}

.tweak-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 239, 225, 0.3);
  margin-bottom: 0.6rem;
}

.tweak-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.tweak-row:last-child {
  margin-bottom: 0;
}

.tweak-field-label {
  font-size: 0.7rem;
  color: rgba(245, 239, 225, 0.55);
  font-weight: 500;
}

.tweak-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.15);
  border-radius: 4px;
  color: var(--cream);
  font-family: var(--font);
  font-size: 0.75rem;
  padding: 0.35rem 0.5rem;
  outline: none;
  cursor: pointer;
}

.tweak-select:focus {
  border-color: rgba(201, 169, 97, 0.4);
}

.tweak-radios {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tweak-radio-btn {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.12);
  color: rgba(245, 239, 225, 0.45);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tweak-radio-btn.active {
  background: rgba(201, 169, 97, 0.15);
  border-color: var(--gold-dark);
  color: var(--gold);
}

.tweak-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tweak-toggle-label {
  font-size: 0.72rem;
  color: rgba(245, 239, 225, 0.6);
}

.tweak-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.tweak-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.tweak-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  border: 1px solid rgba(201, 169, 97, 0.15);
  cursor: pointer;
  transition: background 0.2s ease;
}

.tweak-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(245, 239, 225, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.tweak-switch input:checked + .tweak-switch-track {
  background: rgba(201, 169, 97, 0.25);
  border-color: var(--gold-dark);
}

.tweak-switch input:checked + .tweak-switch-track::after {
  transform: translateX(14px);
  background: var(--gold);
}

.tweak-slider-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tweak-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: rgba(201, 169, 97, 0.15);
  border-radius: 2px;
  outline: none;
}

.tweak-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}

.tweak-slider-val {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 600;
  min-width: 24px;
  text-align: right;
}
