/**index.less**/ page { height: 100vh; background-color: #f5f5f5; } .container { padding: 20rpx; height: 100vh; overflow-y: auto; } /* 输入区域样式 */ .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; }