/* 创客API 应用内对话框（替代 window.alert / confirm / prompt） */

.app-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

.app-dialog-root[hidden] {
  display: none !important;
}

.app-dialog-panel {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1e;
  color: #f4f4f5;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  padding: 20px 20px 16px;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}

.app-dialog-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.app-dialog-message {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #a1a1aa;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-dialog-field {
  margin-bottom: 16px;
}

.app-dialog-field input {
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c0c0e;
  color: #f4f4f5;
  font-size: 14px;
  outline: none;
}

.app-dialog-field input:focus {
  border-color: #8b5cf6;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.app-dialog-btn {
  min-width: 88px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #2a2a30;
  color: #f4f4f5;
  font-size: 14px;
  cursor: pointer;
}

.app-dialog-btn:hover {
  background: #33333a;
}

.app-dialog-btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
}

.app-dialog-btn--primary:hover {
  filter: brightness(1.06);
}

.app-dialog-btn--danger {
  border-color: transparent;
  background: #dc2626;
}

.app-dialog-btn--danger:hover {
  background: #ef4444;
}
