/* 文件夹展开面板 / 拖拽虚影与幽灵 / 边缘翻页
   —— 由 styles.css 第 4772–4993 行原样切分，规则与顺序未改动。 */
/* ========== 文件夹展开面板 ========== */
.folder-panel {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
}
.folder-panel-box {
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 340px;
  max-height: 80%;
  overflow-y: auto;
}
.folder-panel-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 20px;
}
.folder-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.folder-panel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.2s;
}
.folder-panel-item:active {
  background: rgba(0,0,0,0.05);
  transform: scale(0.95);
}
.folder-panel-item .app-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.folder-panel-item .app-icon svg {
  width: 32px;
  height: 32px;
  fill: white;
}
.folder-panel-item .app-name {
  font-size: 12px;
  color: #333;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ========== 拖拽占位虚影 ========== */
.drop-placeholder {
  border: 2px dashed rgba(255,255,255,0.6);
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  pointer-events: none;
}

/* ========== 拖拽幽灵 ========== */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.95;
  transform-origin: center;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}

/* ============================================================
   ⭐ 桌面拖拽系统 v6（从 Demo 迁移）
   - 占位虚影 drop-placeholder
   - 边缘翻页提示 edge-hint
   - 拖拽幽灵内部结构
   - 文件夹多图标堆叠
   ============================================================ */

/* 占位虚影：拖动时跟着手指走的虚线框 */
.desktop-drop-placeholder {
  position: absolute;
  left: 0;
  top: 0;
  border: 2px dashed rgba(255,255,255,0.75);
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1),
              width 0.15s ease, height 0.15s ease,
              border-color 0.15s, background 0.15s;
}
.desktop-drop-placeholder.invalid {
  border-color: #ff4d4f;
  background: rgba(255,77,79,0.15);
}

/* 边缘翻页提示 */
.desktop-edge-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 60px;
  border-radius: 18px;
  background: rgba(0,0,0,0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 9000;
}
.desktop-edge-hint.left { left: 4px; }
.desktop-edge-hint.right { right: 4px; }
.desktop-edge-hint.show { opacity: 1; }

/* 拖拽幽灵增强：内部图标不要被全局 .app-icon 覆盖 */
.desktop-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10005;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  will-change: transform;
  filter: drop-shadow(0 16px 32px rgba(0,0,0,0.28));
  transform-origin: 0 0;
  transition: transform 0.05s linear;
}
.desktop-drag-ghost .ghost-widget-wrap {
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(30px);
  width: 100%;
  height: 100%;
}
.desktop-drag-ghost .ghost-folder-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(30px);
  border: 2px solid rgba(255,255,255,0.7);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  padding: 7px;
  box-sizing: border-box;
}
.desktop-drag-ghost .ghost-folder-icon .mini {
  background: rgba(255,255,255,0.85);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}

/* 文件夹图标（桌面上的多图标堆叠） */
.desktop-folder-icon {
  position: relative;
  overflow: hidden;
}
.desktop-folder-icon .folder-stack {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  padding: 6px;
  box-sizing: border-box;
}
.desktop-folder-icon .folder-mini {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
}
.desktop-folder-icon .folder-mini svg {
  width: 60%;
  height: 60%;
  fill: #666;
}

