/* 首页专用的页面样式 */
page {
  height: 100vh;
  overflow: hidden;
  padding-bottom: 0 !important;
}

.home {
  background: linear-gradient(180deg, #5B9BD5 0%, #4A90C2 100%);
  height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部滚动图片 - 缩短为原来的3/4 */
.banner-container {
  height: 25vh;
  width: 100%;
  flex-shrink: 0;
}

.banner-swiper {
  width: 100%;
  height: 100%;
}

.banner-img {
  width: 100%;
  height: 100%;
}

.banner-item {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 40rpx 32rpx 24rpx;
  color: #fff;
}

.banner-title {
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 8rpx;
  line-height: 1.3;
}

.banner-subtitle {
  font-size: 24rpx;
  opacity: 0.9;
  line-height: 1.2;
}

.banner-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 10;
}

.loading-icon {
  font-size: 60rpx;
  margin-bottom: 16rpx;
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 28rpx;
  opacity: 0.9;
}

/* 移除不需要的样式 */

/* 出行方式选择 */
.service-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  margin: 12rpx 20rpx;
  border-radius: 50rpx;
  padding: 6rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 12rpx 0;
  border-radius: 50rpx;
  font-size: 26rpx;
  color: #666;
  transition: all 0.3s ease;
}

.tab-item.active {
  background: #4A90C2;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4rpx 12rpx rgba(74, 144, 194, 0.4);
}

/* 出行选择区域 */
.booking-section {
  background: rgba(255, 255, 255, 0.95);
  margin: 12rpx 20rpx;
  border-radius: 20rpx;
  padding: 20rpx 20rpx 12rpx 20rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.route-selector {
  display: flex;
  align-items: center;
  margin-bottom: 24rpx;
  gap: 16rpx;
}

.route-picker {
  flex: 1;
}

.route-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 16rpx;
  padding: 20rpx 16rpx;
  border: 2rpx solid #e1e8ed;
  min-height: 88rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.route-item:active {
  background: #f8f9fa;
  border-color: #4A90C2;
  transform: scale(0.98);
}

.route-text {
  font-size: 30rpx;
  color: #2c3e50;
  text-align: center;
  width: 100%;
  font-weight: 500;
  letter-spacing: 0.5rpx;
}

.swap-btn {
  background: linear-gradient(135deg, #4A90C2 0%, #357ABD 100%);
  border: none;
  border-radius: 50%;
  width: 56rpx;
  height: 56rpx;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4rpx 16rpx rgba(74, 144, 194, 0.25);
  transition: all 0.3s ease;
}

.swap-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2rpx 8rpx rgba(74, 144, 194, 0.4);
}

.swap-icon {
  font-size: 32rpx;
  color: #fff;
  font-weight: bold;
}

/* 日期选择 */
.date-picker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12rpx;
  padding: 18rpx;
  border: 2rpx solid #e9ecef;
  margin-bottom: 20rpx;
}

.date-label {
  font-size: 26rpx;
  color: #666;
}

.date-value {
  font-size: 26rpx;
  color: #4A90C2;
  font-weight: bold;
}

/* 查询按钮 */
.search-btn {
  width: 80%;
  margin: 8rpx auto 2rpx auto;
  background: linear-gradient(135deg, #4A90C2 0%, #357ABD 100%);
  color: #fff;
  border: none;
  border-radius: 40rpx;
  padding: 14rpx 0;
  font-size: 28rpx;
  font-weight: bold;
  box-shadow: 0 6rpx 20rpx rgba(74, 144, 194, 0.3);
}


/* 热门路线 */
.hot-routes {
  background: rgba(255, 255, 255, 0.95);
  margin: 0rpx 20rpx 20rpx 20rpx;
  border-radius: 20rpx;
  padding: 16rpx;
  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.section-title {
  font-size: 28rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 16rpx;
  padding: 0 8rpx;
}

.routes-loading {
  text-align: center;
  padding: 80rpx 32rpx;
  color: #666;
}

.routes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12rpx;
}

.route-card {
  border-radius: 12rpx;
  padding: 16rpx;
  position: relative;
  min-height: 100rpx;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #f8f9fa;
  border: 1rpx solid #e9ecef;
}

.route-img {
  width: 100%;
  height: 60rpx;
  border-radius: 8rpx;
  margin-bottom: 8rpx;
  background: #e9ecef;
}

.route-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 24rpx 20rpx 16rpx;
  color: #fff;
}

.route-name {
  font-size: 24rpx;
  font-weight: bold;
  margin-bottom: 8rpx;
  display: block;
  line-height: 1.2;
}

.route-price {
  font-size: 20rpx;
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 4rpx;
}

.route-duration {
  font-size: 18rpx;
  opacity: 0.8;
  margin-bottom: 8rpx;
}

.route-tags {
  display: flex;
  gap: 6rpx;
  flex-wrap: wrap;
}

.route-tag {
  background: rgba(74, 144, 194, 0.8);
  color: #fff;
  padding: 2rpx 6rpx;
  border-radius: 6rpx;
  font-size: 16rpx;
  font-weight: 500;
}

/* 响应式设计 - 适配不同手机型号 */
@media screen and (max-height: 667px) {
  .banner-container {
    height: 22vh;
  }
  
  .booking-section {
    padding: 16rpx;
  }
  
  .hot-routes {
    padding: 12rpx;
  }
  
  .route-card {
    min-height: 80rpx;
    padding: 12rpx;
  }
}

@media screen and (max-height: 568px) {
  .banner-container {
    height: 20vh;
  }
  
  .service-tabs {
    margin: 8rpx 20rpx;
    padding: 4rpx;
  }
  
  .tab-item {
    padding: 8rpx 0;
    font-size: 24rpx;
  }
}

/* 确保内容不超出屏幕 */
@media screen and (max-height: 736px) {
  .home {
    max-height: 100vh;
    overflow: hidden;
  }
}