<template>
  <div class="index">
    <div class="welcome-section">
      <h1>欢迎使用图书推荐系统</h1>
      <p>发现知识的海洋，开启阅读之旅</p>
    </div>
    <swiperVue />
    <div class="feature-section">
      <el-row :gutter="20">
        <el-col :span="8">
          <div class="feature-card">
            <i class="el-icon-reading"></i>
            <h3>海量藏书</h3>
            <p>丰富的图书资源，满足您的阅读需求</p>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="feature-card">
            <i class="el-icon-search"></i>
            <h3>智能推荐</h3>
            <p>个性化的图书推荐，找到您喜欢的书籍</p>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="feature-card">
            <i class="el-icon-service"></i>
            <h3>便捷服务</h3>
            <p>简单的借阅流程，贴心的读者服务</p>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
import swiperVue from "../../components/Swiper/swiper.vue";
export default {
  name: "index",
  components: {
    swiperVue,
  },
};
</script>

<style lang="less" scoped>
.index {
  padding: 20px;
  background-color: #f5f7fa;

  .welcome-section {
    text-align: center;
    margin-bottom: 30px;

    h1 {
      font-size: 32px;
      color: #303133;
      margin-bottom: 10px;
    }

    p {
      font-size: 16px;
      color: #909399;
    }
  }

  .feature-section {
    margin-top: 40px;
    padding: 20px 0;

    .feature-card {
      text-align: center;
      padding: 30px;
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
      transition: all 0.3s;

      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
      }

      i {
        font-size: 48px;
        color: #409eff;
        margin-bottom: 20px;
      }

      h3 {
        font-size: 20px;
        color: #303133;
        margin-bottom: 10px;
      }

      p {
        font-size: 14px;
        color: #606266;
        line-height: 1.6;
      }
    }
  }
}
</style>
