/**index.less**/ page { height: 100vh; background-color: #f5f5f5; } .container { padding: 20rpx; height: 100vh; overflow-y: auto; } .preview-section { margin-top: 24rpx; background: #fff; border-radius: 20rpx; padding: 24rpx; box-shadow: 0 6rpx 8rpx rgba(0, 0, 0, 0.15); } .section-title { display: block; text-align: center; font-size: 32rpx; font-weight: bold; margin-bottom: 24rpx; } .tianzige { display: grid; grid-auto-rows: min-content; row-gap: 12rpx; } .tzg-row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 12rpx; } .tzg-cell { position: relative; background: #fff; border: 4rpx solid #333; height: 120rpx; border-radius: 6rpx; overflow: hidden; } .tzg-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 72rpx; color: #222; font-family: 'Kaiti', 'KaiTi', 'STKaiti', 'FZKai-Z03S', serif; } .mid-line { position: absolute; background: repeating-linear-gradient(to right, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25) 2rpx, transparent 2rpx, transparent 6rpx); } .mid-line.h { left: 0; right: 0; top: 50%; height: 2rpx; transform: translateY(-50%); } .mid-line.v { top: 0; bottom: 0; left: 50%; width: 2rpx; transform: translateX(-50%); } .empty-tip { text-align: center; color: #999; font-size: 28rpx; } /* 输入区域样式 */ .input-section { background-color: #fff; border-radius: 20rpx; padding: 30rpx; margin-bottom: 20rpx; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); } .input-row { display: flex; align-items: center; gap: 20rpx; } .word-input { flex: 1; height: 80rpx; border: 2rpx solid #e0e0e0; border-radius: 40rpx; padding: 0 30rpx; font-size: 32rpx; background-color: #fafafa; } .generate-btn { width: 160rpx; height: 80rpx; background-color: #07c160; color: #fff; border-radius: 40rpx; font-size: 28rpx; border: none; display: flex; align-items: center; justify-content: center; } /* 通用区域样式 */ .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20rpx; } .section-title { font-size: 32rpx; font-weight: bold; color: #333; } .clear-btn { background-color: #ff4757; color: #fff; border-radius: 20rpx; font-size: 24rpx; padding: 10rpx 20rpx; border: none; } /* 已选择的汉字区域 */ .selected-section { background-color: #fff; border-radius: 20rpx; padding: 30rpx; margin-bottom: 20rpx; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); } .word-list { display: flex; flex-wrap: wrap; gap: 20rpx; } .word-item.selected { background-color: #07c160; color: #fff; border-radius: 50rpx; padding: 20rpx 30rpx; position: relative; min-width: 80rpx; text-align: center; } .word-text { font-size: 32rpx; font-weight: bold; } .remove-btn { position: absolute; top: -10rpx; right: -10rpx; width: 40rpx; height: 40rpx; background-color: #ff4757; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24rpx; font-weight: bold; cursor: pointer; } /* 可选汉字区域 */ .available-section { background-color: #fff; border-radius: 20rpx; padding: 30rpx; box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1); } .word-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20rpx; } .word-item.available { background-color: #f0f0f0; color: #333; border-radius: 50rpx; padding: 20rpx; text-align: center; border: 2rpx solid #e0e0e0; transition: all 0.3s ease; } .word-item.available:active { background-color: #e0e0e0; transform: scale(0.95); } .word-item.available.disabled { background-color: #ccc; color: #999; cursor: not-allowed; } .word-item.available.disabled:active { background-color: #ccc; transform: none; }