.container { padding: 20rpx; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; } .header { text-align: center; margin-bottom: 30rpx; padding: 30rpx; background: rgba(255, 255, 255, 0.95); border-radius: 25rpx; box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.15); .title { font-size: 40rpx; font-weight: bold; color: #333; display: block; margin-bottom: 10rpx; } .subtitle { font-size: 26rpx; color: #666; display: block; } } .section { background: rgba(255, 255, 255, 0.95); border-radius: 25rpx; padding: 30rpx; margin-bottom: 25rpx; box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.15); backdrop-filter: blur(10rpx); } .section-title { font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 25rpx; display: flex; justify-content: space-between; align-items: center; border-bottom: 2rpx solid #f0f0f0; padding-bottom: 15rpx; } /* 选择形状按钮 */ .select-shapes-btn { width: 100%; height: 90rpx; font-size: 32rpx; border-radius: 20rpx; background: linear-gradient(45deg, #667eea, #764ba2); border: none; color: white; display: flex; align-items: center; justify-content: center; box-shadow: 0 8rpx 25rpx rgba(102, 126, 234, 0.4); .btn-text { margin-left: 10rpx; font-weight: 500; } } /* 形状卡片容器 */ .shape-cards-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20rpx; } /* 形状卡片 */ .shape-card { position: relative; padding: 20rpx; background: linear-gradient(145deg, #ffffff, #f0f0f0); border-radius: 20rpx; border: 2rpx solid #e0e0e0; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; align-items: center; &:active { transform: scale(0.98); background: linear-gradient(145deg, #f8f9fa, #e9ecef); } .delete-btn { position: absolute; top: 10rpx; right: 10rpx; width: 40rpx; height: 40rpx; background: rgba(255, 255, 255, 0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.15); z-index: 10; } .shape-preview-container { position: relative; width: 80rpx; height: 80rpx; margin-bottom: 15rpx; display: flex; align-items: center; justify-content: center; } .shape-preview-canvas { position: absolute; width: 80rpx; height: 80rpx; opacity: 0; /* 隐藏,只用于未来可能的Canvas预览 */ } .shape-name { font-size: 26rpx; color: #333; font-weight: 500; margin-bottom: 10rpx; text-align: center; } .color-info { display: flex; align-items: center; gap: 8rpx; .color-dot { width: 20rpx; height: 20rpx; border-radius: 50%; border: 2rpx solid #ddd; } .color-text { font-size: 22rpx; color: #666; } } } /* 形状选择弹窗样式 */ .shape-selector-popup { .van-popup { max-height: 80vh; } } .shape-selector-container { padding: 30rpx; max-height: 80vh; overflow-y: auto; .popup-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30rpx; padding-bottom: 20rpx; border-bottom: 2rpx solid #f0f0f0; .popup-title { font-size: 32rpx; font-weight: bold; color: #333; } .selected-count { font-size: 24rpx; color: #667eea; background: rgba(102, 126, 234, 0.1); padding: 8rpx 15rpx; border-radius: 15rpx; } } .shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20rpx; margin-bottom: 30rpx; } .popup-actions { padding-top: 20rpx; border-top: 2rpx solid #f0f0f0; .confirm-btn { width: 100%; height: 80rpx; font-size: 30rpx; border-radius: 20rpx; background: linear-gradient(45deg, #667eea, #764ba2); } } } /* 弹窗中的形状选项 */ .shape-option { position: relative; height: 140rpx; border: 3rpx solid #e0e0e0; border-radius: 20rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(145deg, #ffffff, #f0f0f0); transition: all 0.3s ease; cursor: pointer; box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1); &.selected { border-color: #667eea; background: linear-gradient(145deg, #e3f2fd, #bbdefb); transform: translateY(-5rpx); box-shadow: 0 8rpx 25rpx rgba(102, 126, 234, 0.3); .shape-name { color: #667eea; font-weight: bold; } } &.disabled { opacity: 0.5; background: #f5f5f5; border-color: #ddd; .shape-name { color: #999; } } .selected-mark { position: absolute; top: 8rpx; right: 8rpx; width: 24rpx; height: 24rpx; background: #667eea; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 10; } } .shape-preview-box { width: 60rpx; height: 60rpx; margin-bottom: 10rpx; display: flex; align-items: center; justify-content: center; } /* SVG 样式 */ .shape-svg { width: 60rpx; height: 60rpx; display: block; } .shape-svg-small { width: 50rpx; height: 50rpx; display: block; } /* 保留基础样式,移除所有形状相关的CSS */ .shape-name { font-size: 24rpx; color: #666; text-align: center; } /* 颜色选择器 */ .color-selector { display: grid; grid-template-columns: repeat(auto-fill, minmax(120rpx, 1fr)); gap: 20rpx; } .color-option { height: 100rpx; border-radius: 20rpx; border: 3rpx solid #e0e0e0; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1); &.active { border-color: #667eea; transform: scale(1.05); box-shadow: 0 0 0 6rpx rgba(102, 126, 234, 0.3); } .color-name { color: white; font-size: 22rpx; font-weight: bold; text-shadow: 1rpx 1rpx 2rpx rgba(0, 0, 0, 0.5); } } /* 添加按钮 */ .add-btn { width: 100%; height: 90rpx; font-size: 32rpx; border-radius: 20rpx; background: linear-gradient(45deg, #667eea, #764ba2); border: none; color: white; display: flex; align-items: center; justify-content: center; box-shadow: 0 8rpx 25rpx rgba(102, 126, 234, 0.4); .add-icon { font-size: 40rpx; margin-right: 10rpx; font-weight: bold; } } /* 已选择的形状 */ .selected-shapes { display: flex; flex-direction: column; gap: 15rpx; } .selected-shape { display: flex; align-items: center; padding: 20rpx; background: linear-gradient(145deg, #f8f9fa, #e9ecef); border-radius: 20rpx; border: 2rpx solid #e0e0e0; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1); &:active { background: linear-gradient(145deg, #ffebee, #ffcdd2); border-color: #ff5722; transform: scale(0.98); } } .shape-preview { width: 40rpx; height: 40rpx; border-radius: 50%; margin-right: 20rpx; border: 2rpx solid #333; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2); } .shape-details { flex: 1; display: flex; flex-direction: column; gap: 5rpx; } .shape-info { font-size: 28rpx; color: #333; font-weight: 500; } .color-info { font-size: 22rpx; color: #666; font-family: monospace; } .remove-hint { font-size: 20rpx; color: #999; font-style: italic; } /* 设置项 */ .setting-item { margin-bottom: 30rpx; &:last-child { margin-bottom: 0; } } .setting-label { font-size: 28rpx; color: #333; margin-bottom: 15rpx; display: block; font-weight: 500; } .bg-radio-group { display: flex; flex-wrap: wrap; gap: 25rpx; margin-top: 15rpx; } .bg-option { display: flex; align-items: center; gap: 10rpx; padding: 10rpx 15rpx; border-radius: 15rpx; background: rgba(0, 0, 0, 0.05); text { font-size: 26rpx; color: #666; } } .feature-intro { margin-top: 30rpx; padding: 25rpx; background: linear-gradient(145deg, #f0f8ff, #e6f3ff); border-radius: 15rpx; border-left: 5rpx solid #667eea; } .intro-title { font-size: 26rpx; color: #333; font-weight: bold; display: block; margin-bottom: 15rpx; } .intro-text { font-size: 24rpx; color: #666; display: block; margin-bottom: 8rpx; padding-left: 15rpx; &:last-child { margin-bottom: 0; } } /* 操作按钮 */ .generate-btn { width: 100%; height: 90rpx; font-size: 32rpx; border-radius: 20rpx; margin-bottom: 20rpx; background: linear-gradient(45deg, #4CAF50, #45a049); border: none; color: white; box-shadow: 0 8rpx 25rpx rgba(76, 175, 80, 0.4); &:disabled { background: #ccc; box-shadow: none; } } .save-btn { width: 100%; height: 90rpx; font-size: 32rpx; border-radius: 20rpx; background: linear-gradient(45deg, #ff9800, #f57c00); border: none; color: white; box-shadow: 0 8rpx 25rpx rgba(255, 152, 0, 0.4); } /* 隐藏的画布 */ .hidden-canvas { position: fixed; top: -9999rpx; left: -9999rpx; width: 595px; height: 842px; } /* 预览图片 */ .preview-image { width: 100%; max-height: 600rpx; border-radius: 20rpx; border: 3rpx solid #e0e0e0; background-color: white; cursor: pointer; box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.15); transition: transform 0.3s ease; &:active { transform: scale(0.98); } } .preview-hint { display: block; text-align: center; font-size: 24rpx; color: #666; margin-top: 20rpx; padding: 15rpx; background: rgba(0, 0, 0, 0.05); border-radius: 15rpx; }