.crop-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

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

.crop-modal {
  background: var(--bg-primary, #000);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.crop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color, #2f3336);
}

.crop-modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.crop-modal-btn {
  background: transparent;
  color: var(--text-primary, #fff);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 50px;
  min-width: 64px;
}

.crop-modal-btn--cancel {
  color: var(--text-secondary, #71767b);
}

.crop-modal-btn--confirm {
  color: var(--accent, #1d9bf0);
  font-weight: 700;
}

.crop-viewport {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #111;
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.crop-viewport.is-dragging {
  cursor: grabbing;
}

.crop-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  pointer-events: none;
  max-width: none;
}

.crop-mask {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crop-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
  pointer-events: none;
}

.crop-frame--circle {
  border-radius: 50%;
}

.crop-controls {
  padding: 14px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.crop-controls label {
  font-size: 12px;
  color: var(--text-secondary, #71767b);
  flex-shrink: 0;
}

.crop-zoom {
  flex: 1;
  accent-color: var(--accent, #1d9bf0);
}

@media (max-width: 480px) {
  .crop-viewport {
    height: 260px;
  }
}
