/* 全局悬浮反馈组件 */
#feedback-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#feedback-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

#feedback-trigger:active { transform: scale(0.95); }

#feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

#feedback-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

#feedback-overlay.visible { opacity: 1; }
#feedback-overlay.is-capturing { display: none; }

#feedback-modal {
  width: 440px;
  max-width: 92vw;
  max-height: 85vh;
  overflow: hidden;
  border: 1px solid var(--border, #27272a);
  border-radius: 12px;
  background: var(--bg-card, #111118);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s ease;
}

#feedback-overlay.visible #feedback-modal { transform: translateY(0) scale(1); }

#feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border, #27272a);
}

#feedback-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--text-primary, #e4e4e7);
  font-size: 1rem;
  font-weight: 600;
}

#feedback-close {
  padding: 0.25rem;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text-muted, #71717a);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: color 0.15s;
}

#feedback-close:hover { color: var(--text-primary, #e4e4e7); }
#feedback-modal-body { padding: 1.25rem; }

#feedback-modal-body label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary, #a1a1aa);
  font-size: 0.85rem;
  font-weight: 500;
}

#feedback-type {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  background: var(--bg-input, #18181b);
  color: var(--text-primary, #e4e4e7);
}

#feedback-description {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  background: var(--bg-input, #18181b);
  color: var(--text-primary, #e4e4e7);
  font-family: var(--font-body, inherit);
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.15s;
}

#feedback-description:focus {
  outline: none;
  border-color: var(--amber, #f5a623);
}

#feedback-description::placeholder { color: var(--text-muted, #52525b); }

#feedback-info {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.06);
  color: var(--text-muted, #71717a);
  font-size: 0.75rem;
  line-height: 1.6;
}

#feedback-info code {
  padding: 0.1em 0.35em;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
}

#feedback-snapshot-controls {
  margin-top: 0.9rem;
  padding: 0.75rem;
  border: 1px dashed var(--border, #3f3f46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

#feedback-capture {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border, #3f3f46);
  border-radius: 6px;
  background: var(--bg-input, #18181b);
  color: var(--text-primary, #e4e4e7);
  cursor: pointer;
}

#feedback-capture:disabled { opacity: 0.55; cursor: wait; }

#feedback-snapshot-preview {
  display: none;
  margin-top: 0.75rem;
}

#feedback-snapshot-preview.visible { display: block; }

#feedback-snapshot-image {
  display: block;
  width: 100%;
  max-height: 180px;
  border: 1px solid var(--border, #27272a);
  border-radius: 6px;
  background: #09090b;
  object-fit: contain;
}

#feedback-snapshot-status {
  margin-top: 0.45rem;
  color: var(--text-muted, #71717a);
  font-size: 0.75rem;
}

#feedback-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border, #27272a);
}

.feedback-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body, inherit);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s, opacity 0.15s;
}

.feedback-btn-cancel {
  border-color: var(--border, #27272a);
  background: transparent;
  color: var(--text-secondary, #a1a1aa);
}

.feedback-btn-cancel:hover {
  border-color: var(--border-hover, #3f3f46);
  color: var(--text-primary, #e4e4e7);
}

.feedback-btn-submit {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #000;
  font-weight: 600;
}

.feedback-btn-submit:hover { box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4); }
.feedback-btn-submit:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
