.feedback-widget-root {
  position: fixed;
  right: 28px;
  bottom: 98px;
  z-index: 2147483000;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2937;
}

.feedback-widget-root[hidden] {
  display: none !important;
}

.feedback-entry-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(30, 126, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  transition:
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.feedback-entry-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  z-index: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(4px, -50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.feedback-entry-button:hover + .feedback-entry-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

.feedback-entry-button:hover {
  color: #1677ff;
  border-color: rgba(22, 119, 255, 0.48);
  box-shadow: 0 18px 40px rgba(22, 119, 255, 0.2);
}

.feedback-entry-icon {
  width: 46px;
  height: 46px;
  max-width: 100%;
  max-height: 100%;
  flex: none;
  display: block;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-2px, 5px);
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(5px);
}

.feedback-modal-backdrop.open {
  display: flex;
}

.feedback-modal {
  width: min(520px, 100%);
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.feedback-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #eef2f7;
}

.feedback-modal-title {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.feedback-modal-subtitle {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}

.feedback-close-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.feedback-close-button:hover {
  background: #f3f4f6;
  color: #111827;
}

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

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

.feedback-field label {
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.feedback-category-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.feedback-category {
  min-height: 34px;
  border: 1px solid #d9e3f3;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.feedback-category.active,
.feedback-category:hover {
  border-color: #1677ff;
  background: #eff6ff;
  color: #1677ff;
}

.feedback-textarea,
.feedback-input {
  width: 100%;
  border: 1px solid #d9e3f3;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.feedback-textarea {
  min-height: 132px;
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.65;
}

.feedback-input {
  height: 42px;
  padding: 0 14px;
}

.feedback-textarea:focus,
.feedback-input:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.feedback-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.feedback-status {
  min-height: 20px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-status.error {
  color: #cf1322;
}

.feedback-status.success {
  color: #16833a;
}

.feedback-submit-button {
  min-width: 108px;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: #1677ff;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(22, 119, 255, 0.22);
}

.feedback-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  box-shadow: none;
}

@media (max-width: 640px) {
  .feedback-widget-root {
    right: 18px;
    bottom: 88px;
  }

  .feedback-entry-button {
    width: 52px;
    height: 52px;
  }

  .feedback-entry-icon {
    width: 42px;
    height: 42px;
  }

  .feedback-category-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .feedback-modal-backdrop {
    padding: 16px;
  }
}
