.feedback-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.feedback-btn {
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
  color: white;
  padding: 16px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.feedback-btn:hover {
  transform: scale(1.1);
  animation: none;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.feedback-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.feedback-btn:hover svg {
  transform: rotate(12deg);
}

.feedback-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  opacity: 0.3;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.feedback-pulse-ring.delay {
  background: #3b82f6;
  opacity: 0.2;
  animation-delay: 300ms;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.feedback-tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 12px;
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.feedback-btn:hover + .feedback-tooltip {
  opacity: 1;
}

.feedback-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: #1f2937;
}

.feedback-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.feedback-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.feedback-modal {
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.feedback-modal-overlay.active .feedback-modal {
  transform: scale(1);
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.feedback-modal-header h3 {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary, #111827);
  margin: 0;
}

.feedback-modal-header p {
  color: var(--text-secondary, #6b7280);
  margin: 4px 0 0 0;
  font-size: 14px;
}

.feedback-reward-hint {
  color: #16a34a;
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

.feedback-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-close-btn:hover {
  background: var(--bg-secondary, #f3f4f6);
  color: var(--text-primary, #111827);
}

.feedback-close-btn svg {
  width: 20px;
  height: 20px;
}

.feedback-status {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-status.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #166534;
}

.feedback-status.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

.feedback-status-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feedback-status.success .feedback-status-icon {
  background: #22c55e;
}

.feedback-status.error .feedback-status-icon {
  background: #ef4444;
}

.feedback-status-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #6b7280);
}

.feedback-form-group label .required {
  color: #ef4444;
  margin-left: 2px;
}

.feedback-form-group input,
.feedback-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-primary, #111827);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.feedback-form-group input:focus,
.feedback-form-group textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.feedback-form-group textarea {
  resize: none;
  min-height: 120px;
}

.feedback-upload-btn {
  width: 100%;
  padding: 12px 16px;
  border: 2px dashed var(--border-color, #e5e7eb);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary, #6b7280);
  transition: all 0.2s ease;
  font-size: 14px;
}

.feedback-upload-btn:hover {
  border-color: #22c55e;
  background: var(--bg-secondary, #f9fafb);
}

.feedback-upload-btn svg {
  width: 20px;
  height: 20px;
}

.feedback-image-preview {
  position: relative;
  width: 100%;
  height: 192px;
  background: var(--bg-secondary, #f9fafb);
  border-radius: 8px;
  overflow: hidden;
}

.feedback-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feedback-remove-image {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ef4444;
  color: white;
  border: none;
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.feedback-remove-image:hover {
  background: #dc2626;
}

.feedback-remove-image svg {
  width: 16px;
  height: 16px;
}

.feedback-submit-btn {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.feedback-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #16a34a 0%, #2563eb 100%);
}

.feedback-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.feedback-submit-btn svg {
  width: 20px;
  height: 20px;
}

.feedback-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
  .feedback-tooltip {
    background: #374151;
  }
  .feedback-tooltip::after {
    border-left-color: #374151;
  }
  .feedback-status.success {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #86efac;
  }
  .feedback-status.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
  }
}

@media (max-width: 640px) {
  .feedback-container {
    right: 16px;
    bottom: 16px;
  }
  .feedback-modal {
    padding: 20px;
    width: 95%;
  }
}
