/* Windows XP 데스크톱 아이콘 스타일 */
/* 이 파일은 Windows XP 운영체제의 데스크톱 아이콘 UI를 재현하기 위한 CSS 스타일을 포함하고 있습니다. */
/* 전체 구조: #desktop-area > #desktop-icons > .desktop-icon(position:absolute) */

/* 아이콘 컨테이너: 전체 바탕화면 영역을 덮음 */
#desktop-icons {
  position: absolute;
  inset: 0; /* top/right/bottom/left 모두 0 */
  z-index: 0;
  pointer-events: none; /* 컨테이너 자체는 이벤트를 받지 않음 */
}

/* 각 아이콘: 절대 좌표로 배치 */
.desktop-icon {
  position: absolute;   /* 그리드 좌표 기반 배치의 핵심 */
  width: 72px;
  height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 4px;
  cursor: pointer;
  user-select: none;    /* 텍스트 선택 방지 */
  pointer-events: all;  /* 아이콘은 이벤트를 받음 */
  transition: opacity 0.1s ease;
  box-sizing: border-box;
}

/* 아이콘 드래그 중 스타일 */
.desktop-icon.dragging {
  opacity: 0.65;
  z-index: 1000 !important; /* 다른 아이콘 위에 표시 */
  cursor: grabbing;
  transition: none; /* 드래그 중 transition 제거 (반응성) */
}

.desktop-icon img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  pointer-events: none; /* 이미지가 이벤트를 가로채지 않도록 */
}

.desktop-icon span {
  font-family: 'Tahoma', sans-serif; /* 윈도우 XP 기본 폰트 */
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* 텍스트 그림자 */
  padding: 1px 3px;
  text-align: center;
  border-radius: 2px;
  pointer-events: none; /* 텍스트가 이벤트를 가로채지 않도록 */
  max-width: 72px;
  word-break: break-word;
  line-height: 1.3;
}

/* 아이콘 선택 시 이미지에 파란색 필터 적용 */
.desktop-icon.selected img {
  filter: sepia(90%) hue-rotate(185deg) saturate(4) brightness(0.6) opacity(0.8);
}

/* 아이콘 선택 시 텍스트 배경 스타일 */
.desktop-icon.selected span {
  background-color: #1133a5; /* Windows XP 스타일 파란색 */
  color: white;
  border: 1px dotted white;
  padding: 0px 2px;
  border-radius: 0;
}

/* 드래그 선택 상자 스타일 */
.selection-box {
  position: absolute;
  border: 1px dotted #4d4d4d;
  background: rgba(77, 77, 255, 0.05);
  z-index: 100;
  pointer-events: none;
}
