.app-card {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(45, 106, 79, 0.1);
  contain: content;
}

.app-card:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 16px rgba(45, 106, 79, 0.18),
              0 0 0 1px rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
}

.app-card.dragging {
  opacity: 0.6;
  transform: scale(0.95);
  background: rgba(168, 230, 207, 0.45);
  box-shadow: 0 6px 14px rgba(45, 106, 79, 0.2);
}

.app-card.drag-over {
  background: rgba(220, 237, 193, 0.6);
  border-color: rgba(45, 106, 79, 0.6);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.35),
              0 6px 16px rgba(45, 106, 79, 0.18);
}

.app-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover .app-icon {
  transform: scale(1.1);
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-icon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #a8e6cf, #dcedc1);
  border-radius: var(--radius-sm);
  font-size: 24px;
  font-weight: bold;
  color: #2d6a4f;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.2);
}

.app-name {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #2d6a4f;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
  text-shadow: 0 1px 3px rgba(45, 106, 79, 0.15);
}

.app-description {
  font-size: 10px;
  text-align: center;
  color: rgba(45, 106, 79, 0.8);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  line-height: 1.3;
  max-height: 26px;
  text-shadow: 0 1px 2px rgba(45, 106, 79, 0.12);
}

.app-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  display: none;
  gap: 4px;
}

.app-card:hover .app-actions {
  display: flex;
}

.action-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 4px rgba(45, 106, 79, 0.12);
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(45, 106, 79, 0.2);
}

/* 空白格子 */
.app-card.empty-card {
  background: rgba(255, 255, 255, 0.05);
  cursor: default;
  pointer-events: none;
}

.app-card.empty-card:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.empty-placeholder {
  width: 100%;
  height: 100%;
}
