<template>
	<view class="container">
		<!-- 宣传图片区域 -->
		<view class="banner">
			<view class="temp-banner">
				<text class="banner-text">共享风扇</text>
				<text class="banner-subtitle">让清凉随身携带</text>
			</view>
		</view>
		
		<!-- 功能按钮区域 -->
		<view class="function-area">
			<view class="function-btn rent" @click="goToRent">
				<text class="btn-text">扫码租借</text>
				<text class="btn-desc">快速租借风扇</text>
			</view>
			
			<view class="function-btn return" @click="goToReturn">
				<text class="btn-text">扫码归还</text>
				<text class="btn-desc">轻松完成归还</text>
			</view>
		</view>

		<!-- 使用提示区域 -->
		<view class="tips-section">
			<view class="tips-title">使用小贴士</view>
			<view class="tips-list">
				<view class="tip-item">
					<view class="tip-dot"></view>
					<text>租借时间：每次最长可租借12小时</text>
				</view>
				<view class="tip-item">
					<view class="tip-dot"></view>
					<text>押金说明：租借需支付99元押金，归还后自动退还</text>
				</view>
				<view class="tip-item">
					<view class="tip-dot"></view>
					<text>收费标准：2元/小时，不足1小时按1小时计算</text>
				</view>
				<view class="tip-item">
					<view class="tip-dot"></view>
					<text>爱护提示：请勿将设备带离指定区域，保持设备清洁</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			goToRent() {
				uni.navigateTo({
					url: '/pages/rent/index'
				})
			},
			goToReturn() {
				uni.navigateTo({
					url: '/pages/return/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		height: 87.5vh;
		background: #f8f8f8;
		padding-bottom: 40rpx;
		
		.banner {
			padding: 20rpx;
			
			.temp-banner {
				height: 320rpx;
				background: linear-gradient(135deg, #1976D2, #64B5F6);
				border-radius: 24rpx;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				color: #fff;
				box-shadow: 0 4rpx 20rpx rgba(25, 118, 210, 0.2);

				.banner-text {
					font-size: 48rpx;
					font-weight: bold;
					margin-bottom: 16rpx;
				}

				.banner-subtitle {
					font-size: 28rpx;
					opacity: 0.9;
				}
			}
		}
		
		.function-area {
			padding: 30rpx;
			display: flex;
			justify-content: space-between;
			
			.function-btn {
				width: 320rpx;
				height: 180rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				background: #fff;
				border-radius: 20rpx;
				box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.06);
				transition: all 0.3s;
				
				&:active {
					transform: scale(0.98);
				}
				
				.btn-text {
					font-size: 36rpx;
					font-weight: 500;
					margin-bottom: 8rpx;
				}

				.btn-desc {
					font-size: 24rpx;
					color: #666;
				}
				
				&.rent {
					background: linear-gradient(135deg, #4CAF50, #81C784);
					.btn-text, .btn-desc {
						color: #fff;
					}
				}
				
				&.return {
					background: linear-gradient(135deg, #FF9800, #FFB74D);
					.btn-text, .btn-desc {
						color: #fff;
					}
				}
			}
		}

		.tips-section {
			margin: 30rpx;
			padding: 30rpx;
			background: #fff;
			border-radius: 20rpx;
			box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);

			.tips-title {
				font-size: 32rpx;
				font-weight: 500;
				margin-bottom: 24rpx;
				color: #333;
				padding-left: 20rpx;
				border-left: 8rpx solid #1976D2;
			}

			.tips-list {
				.tip-item {
					display: flex;
					align-items: center;
					margin-bottom: 20rpx;
					padding: 0 10rpx;

					&:last-child {
						margin-bottom: 0;
					}

					.tip-dot {
						width: 12rpx;
						height: 12rpx;
						border-radius: 50%;
						background: #1976D2;
						margin-right: 16rpx;
						flex-shrink: 0;
					}

					text {
						font-size: 26rpx;
						color: #666;
						line-height: 1.5;
					}
				}
			}
		}
	}
</style>
