/* ============================================================
   Tweaks panel UI
   ============================================================ */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-height: calc(100vh - 80px);
  background: #0A0A0C;
  color: #fff;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 56px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,0.06) inset;
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Manrope', system-ui, sans-serif;
}
.tweaks-panel.open { display: flex; animation: tweaksIn 0.28s cubic-bezier(.2,.8,.2,1); }
@keyframes tweaksIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tweaks-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.tweaks-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-style: italic;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.tweaks-title::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: #E30613;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  animation: tpulse 1.6s ease-in-out infinite;
}
@keyframes tpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.tweaks-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.tweaks-close:hover { background: rgba(255,255,255,0.08); }

.tweaks-section {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.tweaks-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #B6B6BC;
  font-weight: 600;
  margin-bottom: 8px;
}
.tweaks-help {
  font-size: 12.5px;
  line-height: 1.45;
  color: #B6B6BC;
  margin-bottom: 14px;
}

.tweaks-opts {
  display: flex; flex-direction: column;
  gap: 8px;
}

.tweak-opt {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #fff;
  display: flex; flex-direction: column; gap: 8px;
  transition: all 140ms cubic-bezier(.2,.8,.2,1);
}
.tweak-opt:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); }
.tweak-opt.active {
  background: rgba(227,6,19,0.14);
  border-color: #E30613;
  box-shadow: 0 0 0 1px #E30613;
}

.tweak-opt-head {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.tweak-opt-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  background: rgba(255,255,255,0.10);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.tweak-opt.active .tweak-opt-key { background: #E30613; }
.tweak-opt-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #B6B6BC;
}

.tweak-opt-preview {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex; flex-direction: column; gap: 2px;
  font-size: 14px;
}
.tweak-opt-preview .red { color: #E30613; }

.tweak-opt-tone {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #7A7A82;
}

.tweaks-foot {
  padding: 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.3);
}
.tweaks-foot-meta {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #7A7A82;
}

@media (max-width: 540px) {
  .tweaks-panel { left: 12px; right: 12px; width: auto; bottom: 12px; }
}
