<script setup>

const currentYear = new Date().getFullYear()

const footerLinks = {
  product: [
    {name: '产品功能', path: '/products'},
  ],
  company: [
    {name: '关于我们', path: '/about'},
  ],
  support: [
    {name: '帮助中心', path: '/contact'},
  ]
}

const socialLinks = [
  {name: '微信', icon: '💬', ref: 'https://weixin.qq.com/'},
  {name: '微博', icon: '🌐', ref: 'https://weibo.com/'},
  {name: 'GitHub', icon: '💻', ref: 'https://github.com/'},
  {name: 'LinkedIn', icon: '💼', ref: 'https://weixin.qq.com/'}
]
</script>

<template>
  <footer class="footer">
    <div class="container">
      <div class="footer-content">
        <!--公司信息-->
        <div class="footer-section">
          <h3 class="footer-logo">团队名</h3>
          <p class="footer-desc">团队简要描述</p>
          <div class="social-links">
            <a
                v-for="social in socialLinks"
                :key="social.name"
                :href="social.ref"
                :title="social.name"
                class="social-link"
                rel="noopener noreferrer"
                target="_blank">
              {{ social.icon }}
            </a>
          </div>
        </div>

        <!--产品链接-->
        <div class="footer-section">
          <h4 class="footer-title">产品</h4>
          <ul class="footer-links">
            <li v-for="link in footerLinks.product" :key="link.name">
              <router-link :to="link.path">{{ link.name }}</router-link>
            </li>
          </ul>
        </div>

        <!--链接-->
        <div class="footer-section">
          <h4 class="footer-title">我们</h4>
          <ul class="footer-links">
            <li v-for="link in footerLinks.company" :key="link.name">
              <router-link :to="link.path">{{ link.name }}</router-link>
            </li>
          </ul>
        </div>

        <!--支持链接-->
        <div class="footer-section">
          <h4 class="footer-title">帮助</h4>
          <ul class="footer-links">
            <li v-for="link in footerLinks.support" :key="link.name">
              <router-link :to="link.path">{{ link.name }}</router-link>
            </li>
          </ul>
        </div>
      </div>

      <!--底部版权-->
      <div class="footer-bottom">
        <p>&copy; {{ currentYear }} 团队名. All rights reserved.</p>
      </div>
    </div>
  </footer>
</template>

<style scoped>
.footer {
  background: var(--gradient-dark);
  color: white;
  padding: 60px 20px 30px;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.8;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
}

.footer-bottom p {
  font-size: 14px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer {
    padding: 40px 16px 20px;
  }
}
</style>
