/* ==========================================================================
   头像裁切弹窗
   上传前让用户自己拖动、缩放，把脸对准圆形预览框。
   ========================================================================== */

.avatar-crop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 9, 28, .74);
  backdrop-filter: blur(5px);
}

.avatar-crop[hidden] {
  display: none !important;
}

.avatar-crop__panel {
  width: min(92vw, 360px);
  padding: 18px;
  color: #E7ECFF;
  border: 1px solid rgba(143, 164, 255, .28);
  border-radius: 16px;
  background: linear-gradient(165deg, #1A2148, #0E1330);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.avatar-crop__title {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: .04em;
}

.avatar-crop__tip {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #9FB0D8;
}

.avatar-crop__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 50%;
  background: #0B1030;
  cursor: grab;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(143, 164, 255, .3), 0 0 0 6px rgba(139, 124, 246, .12);
}

.avatar-crop__stage:active {
  cursor: grabbing;
}

.avatar-crop__img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}

.avatar-crop__zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-size: 12px;
  color: #9FB0D8;
}

.avatar-crop__zoom input {
  flex: 1;
  accent-color: #8B7CF6;
}

.avatar-crop__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.avatar-crop__actions .avatar-crop__ok {
  border-color: rgba(139, 124, 246, .6);
  background: rgba(139, 124, 246, .18);
  color: #fff;
}
