/* 蓝牙搜索页面样式 */ .container { padding: 20rpx; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; } /* 顶部标题栏 */ .header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30rpx; padding: 10rpx 0; } .back-btn { display: flex; align-items: center; gap: 8rpx; padding: 10rpx 20rpx; border-radius: 20rpx; background: rgba(255,255,255,0.2); transition: all 0.3s ease; } .back-btn:hover { background: rgba(255,255,255,0.3); transform: translateX(-4rpx); } .back-icon { font-size: 32rpx; color: white; font-weight: bold; } .back-text { font-size: 28rpx; color: white; } .title { font-size: 36rpx; font-weight: bold; color: white; text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.1); letter-spacing: 1rpx; } .refresh-btn { background: rgba(255,255,255,0.2); color: white; font-size: 28rpx; padding: 8rpx 24rpx; border-radius: 20rpx; border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(10rpx); transition: all 0.3s ease; } .refresh-btn:hover { background: rgba(255,255,255,0.3); transform: translateY(-2rpx); box-shadow: 0 4rpx 8rpx rgba(0,0,0,0.1); } .refresh-btn[loading] { opacity: 0.8; pointer-events: none; } /* 搜索状态提示 */ .status-bar { margin-bottom: 20rpx; padding: 24rpx; background: rgba(255,255,255,0.95); border-radius: 16rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.1); backdrop-filter: blur(10rpx); display: flex; align-items: center; gap: 15rpx; } .status-indicator { width: 12rpx; height: 12rpx; border-radius: 50%; font-size: 12rpx; line-height: 12rpx; animation: pulse 2s infinite; } .status-indicator.searching { color: #667eea; } .status-indicator.completed { color: #07c160; animation: none; } .status-text { font-size: 28rpx; color: #333; font-weight: 500; flex: 1; } .search-count { font-size: 24rpx; color: #666; background: #f0f0f0; padding: 6rpx 16rpx; border-radius: 12rpx; } /* 搜索进度条 */ .progress-container { margin-bottom: 30rpx; padding: 20rpx; background: rgba(255,255,255,0.95); border-radius: 16rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.1); backdrop-filter: blur(10rpx); } .progress-bar { width: 100%; height: 12rpx; background: #f0f0f0; border-radius: 6rpx; overflow: hidden; margin-bottom: 15rpx; } .progress-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 6rpx; transition: width 0.5s ease; animation: progressAnimation 2s ease-in-out infinite; } .progress-text { font-size: 24rpx; color: #666; text-align: center; font-weight: 500; } /* 加载状态 */ .loading-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 120rpx 20rpx; background: rgba(255,255,255,0.95); border-radius: 24rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.1); backdrop-filter: blur(10rpx); animation: slideUp 0.5s ease; } .loading-spinner { width: 80rpx; height: 80rpx; border: 8rpx solid #f3f3f3; border-top: 8rpx solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 30rpx; } .loading-text { font-size: 28rpx; color: #333; font-weight: 500; margin-bottom: 15rpx; } .loading-subtext { font-size: 24rpx; color: #999; } /* 设备列表 */ .device-list { margin-top: 20rpx; } /* 空状态 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100rpx 20rpx; background: rgba(255,255,255,0.95); border-radius: 24rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.1); backdrop-filter: blur(10rpx); text-align: center; animation: slideUp 0.5s ease; } .empty-icon { font-size: 80rpx; margin-bottom: 30rpx; } .empty-text { font-size: 32rpx; color: #333; font-weight: 500; margin-bottom: 20rpx; } .empty-hint { font-size: 24rpx; color: #666; margin-bottom: 20rpx; font-weight: 500; } .empty-checklist { text-align: left; margin-bottom: 40rpx; padding-left: 20rpx; } .checklist-item { display: block; font-size: 22rpx; color: #999; margin-bottom: 10rpx; line-height: 1.4; } .retry-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20rpx 60rpx; border-radius: 12rpx; font-size: 28rpx; font-weight: 500; transition: all 0.3s ease; box-shadow: 0 4rpx 12rpx rgba(102,126,234,0.3); } .retry-btn:hover { transform: translateY(-2rpx); box-shadow: 0 6rpx 16rpx rgba(102,126,234,0.4); } .retry-btn[disabled] { opacity: 0.6; transform: none; box-shadow: none; } /* 设备列表项 */ .device-item { background: rgba(255,255,255,0.95); border-radius: 20rpx; padding: 30rpx; margin-bottom: 20rpx; box-shadow: 0 8rpx 24rpx rgba(0,0,0,0.1); transition: all 0.3s ease; backdrop-filter: blur(10rpx); position: relative; overflow: hidden; } .device-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4rpx; background: linear-gradient(90deg, #667eea, #764ba2); transform: scaleX(0); transition: transform 0.3s ease; } .device-item:hover { transform: translateY(-6rpx); box-shadow: 0 16rpx 40rpx rgba(0,0,0,0.15); } .device-item:hover::before { transform: scaleX(1); } .item-hover { transform: translateY(-6rpx); box-shadow: 0 16rpx 40rpx rgba(0,0,0,0.15); } /* 设备项头部 */ .item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20rpx; } .device-info { flex: 1; margin-right: 20rpx; } .device-name { font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 8rpx; } .device-type { font-size: 22rpx; color: #999; } .signal-strength { display: flex; flex-direction: column; align-items: flex-end; gap: 8rpx; } .signal-bars { display: flex; align-items: flex-end; gap: 4rpx; height: 30rpx; } .signal-bar { width: 8rpx; background: #667eea; border-radius: 4rpx; transition: all 0.3s ease; } .signal-bar:nth-child(1) { height: 10rpx; } .signal-bar:nth-child(2) { height: 16rpx; } .signal-bar:nth-child(3) { height: 22rpx; } .signal-bar:nth-child(4) { height: 28rpx; } .signal-value { font-size: 22rpx; color: #666; font-weight: 500; } /* 设备项主体 */ .item-body { margin-bottom: 20rpx; } .device-id { font-size: 20rpx; color: #999; word-break: break-all; line-height: 1.4; } .device-address { font-size: 20rpx; color: #999; margin-top: 8rpx; } /* 设备项底部 */ .item-footer { display: flex; justify-content: flex-end; } .connect-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15rpx 30rpx; border-radius: 12rpx; transition: all 0.3s ease; box-shadow: 0 4rpx 12rpx rgba(102,126,234,0.3); display: flex; align-items: center; gap: 10rpx; } .connect-btn:hover { transform: translateY(-2rpx); box-shadow: 0 6rpx 16rpx rgba(102,126,234,0.4); } .connect-icon { font-size: 24rpx; } .connect-text { font-size: 28rpx; font-weight: 500; } /* 搜索提示 */ .search-tips { margin-top: 30rpx; padding: 24rpx; background: rgba(255,255,255,0.9); border-radius: 16rpx; box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05); backdrop-filter: blur(10rpx); } .tips-text { font-size: 24rpx; color: #666; line-height: 1.6; display: block; margin-bottom: 10rpx; } .tips-text:last-child { margin-bottom: 0; } /* 动画 */ @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } } @keyframes progressAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } @keyframes slideUp { from { opacity: 0; transform: translateY(50rpx); } to { opacity: 1; transform: translateY(0); } } @keyframes fadeIn { from { opacity: 0; transform: translateY(20rpx); } to { opacity: 1; transform: translateY(0); } } /* 按钮悬停效果 */ .btn-hover { transform: scale(0.98); opacity: 0.9; } /* 响应式设计 */ @media (max-width: 414px) { .header { padding: 0; } .title { font-size: 28rpx; } .back-btn { padding: 8rpx 16rpx; } .back-text { display: none; } .refresh-btn { font-size: 24rpx; padding: 6rpx 20rpx; } .device-item { padding: 24rpx; } .device-name { font-size: 28rpx; } .progress-container { padding: 16rpx; } .empty-state { padding: 80rpx 20rpx; } }