<template>
  <div class="book-hall-section">
    <h2 class="section-title">书报馆件</h2>
    <div class="book-list">
      <div class="book-item" v-for="book in books" :key="book.id">
        <div class="book-cover">
          <img :src="book.cover" :alt="book.title" />
        </div>
        <div class="book-info">
          <h3>{{ book.title }}</h3>
          <p>{{ book.author }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';

const books = ref<any[]>([]);

onMounted(() => {
  // TODO: 加载书籍数据
});
</script>

<style lang="scss" scoped>
.book-hall-section {
  padding: 40px;
  background: white;
  border-radius: 8px;
  margin: 20px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  color: #141F38;
  margin-bottom: 24px;
}

.book-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.book-item {
  cursor: pointer;
  transition: transform 0.3s;
  
  &:hover {
    transform: translateY(-5px);
  }
}

.book-cover {
  width: 100%;
  height: 280px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.book-info {
  margin-top: 12px;
  
  h3 {
    font-size: 16px;
    font-weight: 500;
    color: #141F38;
    margin-bottom: 4px;
  }
  
  p {
    font-size: 14px;
    color: #666;
  }
}
</style>

