/* 顶部导航栏 */ .header-row { display: flex; align-items: center; gap: 16rpx; height: 96rpx; padding: 0 16rpx; background: #fff; } .logo-container { width: 96rpx; height: 96rpx; border-radius: 24rpx; overflow: hidden; flex-shrink: 0; } .logo { width: 100%; height: 100%; } .app-title { font-size: 32rpx; font-weight: 600; color: #8552A1; flex-shrink: 0; } .font-size-control { display: flex; align-items: center; flex: 1; gap: 4rpx; /* 改为 2rpx 的 gap,小程序 rpx = 物理像素*2 */ padding: 0 12rpx; height: 64rpx; } .font-size-icon { width: 24rpx; height: 24rpx; flex-shrink: 0; display: block; } .font-slider-wrap { flex: 1; height: 64rpx; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; } .font-size-value { font-size: 20rpx; color: #4E5969; line-height: 28rpx; text-align: center; margin-bottom: 4rpx; } .font-slider { width: 100%; height: 24rpx; margin: 0; padding: 0; } .color-picker-btn { width: 48rpx; height: 48rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .color-icon { width: 48rpx; height: 48rpx; } /* 输入栏和导出按钮 */ .input-row { display: flex; align-items: center; gap: 6rpx; height: 78rpx; padding: 0 16rpx; margin-top: 16rpx; } .content-icon { width: 44rpx; height: 72rpx; flex-shrink: 0; } .text-input-container { flex: 1; height: 100%; background: #F7F8FA; border-radius: 12rpx; padding: 0 6rpx; display: flex; align-items: center; } .text-input { width: 100%; height: 100%; font-size: 20rpx; color: #4E5969; } /* 效果预览区域 */ .preview-section { flex: 1; display: flex; flex-direction: column; margin-top: 16rpx; padding: 8rpx; border: 1rpx solid #3EE4C3; border-radius: 12rpx; background: #fff; overflow: hidden; } .section-title { padding: 12rpx 0; font-size: 28rpx; font-weight: 400; color: #000; } .preview-list { flex: 1; min-height: 0; } .preview-item { display: flex; flex-direction: column; gap: 6rpx; margin-bottom: 6rpx; } .preview-header { display: flex; align-items: center; gap: 4rpx; padding-bottom: 4rpx; border-bottom: 0.5rpx solid #C9CDD4; } .font-icon { width: 16rpx; height: 16rpx; flex-shrink: 0; } .font-name-text { flex: 1; font-size: 20rpx; color: #86909C; } .export-btns-inline { display: flex; align-items: center; gap: 10rpx; } .download-icon { width: 24rpx; height: 24rpx; flex-shrink: 0; display: block; } .export-btn-sm { display: flex; align-items: center; justify-content: center; border-radius: 8rpx; padding: 4rpx 6rpx; width: 50rpx; height: 22rpx; } .export-btn-sm.export-svg-btn { background: #E3D6EE; } .export-btn-sm.export-png-btn { background: #FFE4BA; } .export-icon-sm { width: 100%; height: 100%; } .preview-checkbox { width: 14rpx; height: 14rpx; } .checkbox-wrapper { width: 100%; height: 100%; border: 1rpx solid #C9CDD4; border-radius: 3rpx; display: flex; align-items: center; justify-content: center; box-sizing: border-box; } .checkbox-wrapper.checked { border-color: #9B6BC2; background: #9B6BC2; } .checkbox-icon { width: 100%; height: 100%; } .preview-content { background: transparent; padding: 4rpx 0; min-height: 40rpx; display: flex; align-items: center; justify-content: flex-start; } .preview-image { display: block; max-width: 100%; } .preview-loading { font-size: 24rpx; color: #86909C; } .preview-error { font-size: 22rpx; color: #dc2626; text-align: center; padding: 0 12rpx; } .preview-empty { text-align: center; padding: 80rpx 0; font-size: 24rpx; color: #C9CDD4; } /* 字体选择和已收藏字体 */ .bottom-section { display: flex; flex: 1; gap: 16rpx; min-height: 0; margin-top: 16rpx; padding: 0; } .font-selection, .favorite-selection { flex: 1; display: flex; flex-direction: column; border: 1rpx solid #3EE4C3; border-radius: 16rpx; background: #fff; padding: 8rpx 8rpx; overflow: hidden; min-width: 0; box-sizing: border-box; } .favorite-selection { border-left: 2rpx solid #3EE4C3; } /* 搜索相关样式 */ .selection-header { display: flex; align-items: center; gap: 8rpx; padding: 0; margin-bottom: 8rpx; } .selection-header .section-title { padding: 0; margin: 0; font-size: 28rpx; font-weight: 400; flex-shrink: 0; display: flex; align-items: center; height: 48rpx; width: 66rpx; } .favorite-header { display: flex; align-items: center; padding: 0; margin-bottom: 8rpx; } .favorite-header .section-title { padding: 0; margin: 0; font-size: 28rpx; font-weight: 400; display: flex; align-items: center; height: 48rpx; } .search-container { flex: 1; display: flex; align-items: center; background: #FEFDFE; border-radius: 24rpx; padding: 0 12rpx; height: 48rpx; min-width: 0; overflow: hidden; } .search-icon { width: 24rpx; height: 24rpx; flex-shrink: 0; margin-right: 8rpx; } .search-input { flex: 1; font-size: 24rpx; color: #4E5969; height: 48rpx; line-height: 48rpx; min-height: 0; padding: 0; margin: 0; background: transparent; } .search-toggle { width: 32rpx; height: 32rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #8552A1; border-radius: 20rpx; } .search-toggle .search-icon { width: 18rpx; height: 18rpx; opacity: 1; } .font-tree { flex: 1; min-height: 0; overflow-y: auto; } .font-category { position: relative; margin-bottom: 14rpx; } .category-header { display: flex; align-items: center; gap: 8rpx; margin-bottom: 14rpx; } .expand-icon { width: 40rpx; height: 40rpx; transition: transform 0.3s; flex-shrink: 0; } .category-name { flex: 1; font-size: 21rpx; font-weight: 500; color: #000; } .category-select-all { width: 24rpx; height: 24rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 4rpx; } .select-all-icon { width: 100%; height: 100%; display: block; } .font-list { display: flex; flex-direction: column; gap: 0; } .select-font-list { position: relative; } .font-item { display: flex; align-items: center; gap: 9rpx; padding-bottom: 9rpx; border-bottom: 1rpx solid #C9CDD4; margin-bottom: 9rpx; } .select-font-item { position: relative; padding-left: 28rpx; } .tree-vertical-line { position: absolute; left: 19rpx; top: 42rpx; bottom: 16rpx; width: 1rpx; background: #C9CDD4; } .tree-horizontal-line { position: absolute; left: 19rpx; top: 18rpx; width: 10rpx; height: 1rpx; background: #C9CDD4; } .font-item-icon { width: 18rpx; height: 18rpx; flex-shrink: 0; } .font-item-name { flex: 1; min-width: 0; font-size: 20rpx; color: #86909C; line-height: 28rpx; white-space: normal; word-break: break-all; } .font-item-actions { display: flex; align-items: center; gap: 9rpx; flex-shrink: 0; } .font-checkbox { width: 21rpx; height: 21rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .checkbox-icon-sm { width: 100%; height: 100%; } .favorite-btn { width: 21rpx; height: 21rpx; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .favorite-icon { width: 100%; height: 100%; display: block; } .favorite-list { padding-top: 8rpx; } .favorite-font-item { padding-left: 0; } .empty-favorites { text-align: center; padding: 60rpx 0; font-size: 24rpx; color: #C9CDD4; } /* 颜色选择器弹窗 */ .color-picker-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; } .color-picker-content { background: #fff; border-radius: 20rpx; padding: 40rpx; width: 80%; } .color-palette { display: flex; flex-wrap: wrap; gap: 20rpx; margin-bottom: 30rpx; } .color-dot { width: 60rpx; height: 60rpx; border-radius: 50%; box-sizing: border-box; } .color-input-row { display: flex; align-items: center; gap: 16rpx; } .color-input { flex: 1; height: 60rpx; background: #F7F8FA; border-radius: 10rpx; padding: 0 16rpx; font-size: 28rpx; } /* 版权说明 */ .copyright-footer { text-align: center; font-size: 20rpx; color: #86909C; padding: 16rpx 0; flex-shrink: 0; } /* 画布 */ .hidden-canvas { position: fixed; width: 1px; height: 1px; left: -9999px; top: -9999px; }