<template>
  <div class="home-container">
    <!-- Hero Section -->
    <div class="hero-section glass">
      <div class="hero-content">
        <h1 class="hero-title">Hertz Admin</h1>
        <p class="hero-subtitle">
          基于 Spring Boot 3 与 Vue 3 的<br />现代化全栈权限管理系统
        </p>
        <p class="hero-desc">
          极简设计，高效开发。集成 RBAC 权限、动态路由、AI 助手与实时监控，<br />为您提供开箱即用的企业级中后台解决方案。
        </p>
        <div class="hero-actions">
          <el-button type="primary" size="large" class="cta-btn" @click="router.push('/login')">
            立即开始
            <el-icon class="el-icon--right"><ArrowRight /></el-icon>
          </el-button>
          <el-button size="large" class="secondary-btn" @click="router.push('/portal/about')">
            了解更多
          </el-button>
        </div>
      </div>
      <div class="hero-decoration">
        <div class="circle circle-1"></div>
        <div class="circle circle-2"></div>
      </div>
    </div>

    <!-- Features Section -->
    <div class="section-container">
      <h2 class="section-title">核心特性</h2>
      <div class="features-grid">
        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><Lock /></el-icon>
          </div>
          <h3>RBAC 权限</h3>
          <p>细粒度的基于角色的访问控制，支持菜单、按钮级别的权限管理，保障系统安全。</p>
        </el-card>

        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><Menu /></el-icon>
          </div>
          <h3>动态菜单</h3>
          <p>根据用户角色与权限动态生成侧边栏菜单与路由，无需手动配置前端路由表。</p>
        </el-card>

        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><Monitor /></el-icon>
          </div>
          <h3>现代化 UI</h3>
          <p>采用 Element Plus 组件库，深度定制 iOS 风格设计，提供极致的用户体验。</p>
        </el-card>

        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><ChatDotRound /></el-icon>
          </div>
          <h3>AI 智能助手</h3>
          <p>集成大语言模型，支持 RAG 知识库问答，为您的应用注入人工智能的活力。</p>
        </el-card>

        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><Odometer /></el-icon>
          </div>
          <h3>系统监控</h3>
          <p>内置服务器状态监控，实时掌握 CPU、内存、JVM 及磁盘使用情况。</p>
        </el-card>

        <el-card class="feature-card glass" shadow="hover">
          <div class="feature-icon-wrapper">
            <el-icon class="feature-icon"><Lightning /></el-icon>
          </div>
          <h3>高效开发</h3>
          <p>前后端分离架构，标准 RESTful API，完善的代码规范，助您快速构建应用。</p>
        </el-card>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import {
  ArrowRight,
  Lock,
  Menu,
  Monitor,
  ChatDotRound,
  Odometer,
  Lightning
} from '@element-plus/icons-vue'

const router = useRouter()
</script>

<style scoped>
.home-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding-bottom: 40px;
}

/* Hero Section */
.hero-section {
  position: relative;
  text-align: center;
  padding: 100px 40px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(240,249,255,0.9) 100%);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  margin: 0 0 24px;
  background: linear-gradient(135deg, var(--ios-primary) 0%, #2a5298 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px;
  line-height: 1.4;
}

.hero-desc {
  font-size: 16px;
  color: #666;
  margin: 0 auto 40px;
  max-width: 600px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.cta-btn {
  padding: 0 32px !important;
  font-size: 16px !important;
  height: 48px !important;
  border-radius: 24px !important;
}

.secondary-btn {
  padding: 0 32px !important;
  font-size: 16px !important;
  height: 48px !important;
  border-radius: 24px !important;
}

/* Background Decoration */
.hero-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(40px);
}

.circle-1 {
  width: 300px;
  height: 300px;
  background: var(--ios-primary);
  top: -50px;
  right: -50px;
}

.circle-2 {
  width: 200px;
  height: 200px;
  background: #00C6FB;
  bottom: -20px;
  left: -20px;
}

/* Section Common */
.section-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #1d1d1f;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.5);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08) !important;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0,122,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon {
  font-size: 24px;
  color: var(--ios-primary);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #1d1d1f;
}

.feature-card p {
  margin: 0;
  color: #666;
  line-height: 1.6;
  font-size: 14px;
}
</style>
