<template>
  <div class="futuristic-container min-h-screen bg-gradient-to-br from-slate-900 via-blue-900 to-indigo-900">
    <!-- 顶部应用栏 -->
    <div class="futuristic-app-bar">
      <div class="container mx-auto px-4 py-3 flex items-center justify-between">
        <div class="flex items-center">
          <Menu class="w-5 h-5 text-blue-200 mr-4" />
          <h1 class="text-xl font-medium text-blue-200">Futuristic Design</h1>
        </div>
        <div class="flex items-center space-x-4">
          <button class="futuristic-icon-button">
            <Search class="w-5 h-5" />
          </button>
          <button class="futuristic-icon-button">
            <Bell class="w-5 h-5" />
          </button>
          <button class="futuristic-icon-button">
            <User class="w-5 h-5" />
          </button>
        </div>
      </div>
    </div>

    <!-- 主要内容区 -->
    <div class="container mx-auto p-6">
      <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
        <!-- 左侧导航 -->
        <div class="futuristic-card">
          <div class="p-4">
            <h2 class="text-lg font-medium mb-4 text-blue-200">导航菜单</h2>
            <nav class="space-y-2">
              <a href="#" class="futuristic-nav-item active">
                <Home class="w-5 h-5" />
                <span>首页</span>
              </a>
              <a href="#" class="futuristic-nav-item">
                <Inbox class="w-5 h-5" />
                <span>收件箱</span>
                <span class="futuristic-badge">12</span>
              </a>
              <a href="#" class="futuristic-nav-item">
                <Star class="w-5 h-5" />
                <span>收藏</span>
              </a>
              <a href="#" class="futuristic-nav-item">
                <Settings class="w-5 h-5" />
                <span>设置</span>
              </a>
            </nav>
          </div>
        </div>

        <!-- 中间内容 -->
        <div class="md:col-span-2 space-y-6">
          <!-- 卡片列表 -->
          <div class="futuristic-card">
            <div class="p-4">
              <h2 class="text-lg font-medium mb-4 text-blue-200">卡片列表</h2>
              <div class="space-y-4">
                <div class="futuristic-list-item">
                  <div class="futuristic-avatar bg-gradient-to-br from-blue-500 to-indigo-500">JD</div>
                  <div class="flex-1">
                    <h3 class="font-medium text-blue-200">卡片标题</h3>
                    <p class="text-blue-300">卡片副标题</p>
                  </div>
                  <button class="futuristic-icon-button">
                    <MoreVertical class="w-5 h-5" />
                  </button>
                </div>
                <div class="futuristic-list-item">
                  <div class="futuristic-avatar bg-gradient-to-br from-indigo-500 to-purple-500">AB</div>
                  <div class="flex-1">
                    <h3 class="font-medium text-blue-200">另一个标题</h3>
                    <p class="text-blue-300">另一个副标题</p>
                  </div>
                  <button class="futuristic-icon-button">
                    <MoreVertical class="w-5 h-5" />
                  </button>
                </div>
              </div>
            </div>
          </div>

          <!-- 表单元素 -->
          <div class="futuristic-card">
            <div class="p-4">
              <h2 class="text-lg font-medium mb-4 text-blue-200">表单元素</h2>
              <div class="space-y-4">
                <div class="futuristic-input-group">
                  <label class="text-blue-300">文本输入</label>
                  <input type="text" placeholder="请输入内容" class="futuristic-input">
                </div>
                <div class="futuristic-input-group">
                  <label class="text-blue-300">密码输入</label>
                  <input type="password" placeholder="请输入密码" class="futuristic-input">
                </div>
                <div class="futuristic-input-group">
                  <label class="text-blue-300">下拉选择</label>
                  <select class="futuristic-input">
                    <option>选项 1</option>
                    <option>选项 2</option>
                    <option>选项 3</option>
                  </select>
                </div>
                <div class="flex items-center space-x-4">
                  <label class="futuristic-checkbox">
                    <input type="checkbox">
                    <span class="futuristic-checkmark"></span>
                    <span class="text-blue-300">复选框</span>
                  </label>
                  <label class="futuristic-radio">
                    <input type="radio" name="radio">
                    <span class="futuristic-radiomark"></span>
                    <span class="text-blue-300">单选框</span>
                  </label>
                </div>
                <div class="futuristic-switch">
                  <input type="checkbox" id="switch1">
                  <label for="switch1" class="text-blue-300">开关</label>
                </div>
              </div>
            </div>
          </div>

          <!-- 按钮组 -->
          <div class="futuristic-card">
            <div class="p-4">
              <h2 class="text-lg font-medium mb-4 text-blue-200">按钮样式</h2>
              <div class="flex flex-wrap gap-4">
                <button class="futuristic-button">主要按钮</button>
                <button class="futuristic-button outlined">次要按钮</button>
                <button class="futuristic-button text">文本按钮</button>
                <button class="futuristic-button icon">
                  <Plus class="w-5 h-5" />
                </button>
              </div>
            </div>
          </div>

          <!-- 进度指示器 -->
          <div class="futuristic-card">
            <div class="p-4">
              <h2 class="text-lg font-medium mb-4 text-blue-200">进度指示器</h2>
              <div class="space-y-4">
                <div class="futuristic-progress">
                  <div class="futuristic-progress-bar" style="width: 60%"></div>
                </div>
                <div class="futuristic-progress circular">
                  <div class="futuristic-progress-circle"></div>
                </div>
              </div>
            </div>
          </div>

          <!-- 对话框 -->
          <div class="futuristic-card">
            <div class="p-4">
              <h2 class="text-lg font-medium mb-4 text-blue-200">对话框示例</h2>
              <button class="futuristic-button" @click="showDialog = true">打开对话框</button>
            </div>
          </div>
        </div>
      </div>
    </div>

    <!-- 底部导航栏 -->
    <div class="futuristic-bottom-nav">
      <a href="#" class="futuristic-bottom-nav-item active">
        <Home class="w-6 h-6" />
        <span>首页</span>
      </a>
      <a href="#" class="futuristic-bottom-nav-item">
        <Search class="w-6 h-6" />
        <span>搜索</span>
      </a>
      <a href="#" class="futuristic-bottom-nav-item">
        <Plus class="w-6 h-6" />
        <span>添加</span>
      </a>
      <a href="#" class="futuristic-bottom-nav-item">
        <Bell class="w-6 h-6" />
        <span>通知</span>
      </a>
      <a href="#" class="futuristic-bottom-nav-item">
        <User class="w-6 h-6" />
        <span>我的</span>
      </a>
    </div>

    <!-- 对话框 -->
    <div v-if="showDialog" class="futuristic-dialog-overlay">
      <div class="futuristic-dialog">
        <div class="futuristic-dialog-header">
          <h3 class="text-blue-200">对话框标题</h3>
          <button class="futuristic-icon-button" @click="showDialog = false">
            <X class="w-5 h-5" />
          </button>
        </div>
        <div class="futuristic-dialog-content">
          <p class="text-blue-300">这是一个未来主义风格的对话框示例。</p>
        </div>
        <div class="futuristic-dialog-actions">
          <button class="futuristic-button text" @click="showDialog = false">取消</button>
          <button class="futuristic-button" @click="showDialog = false">确定</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { 
  Menu, Search, Bell, User, Home, 
  Inbox, Star, Settings, MoreVertical,
  Plus, X
} from 'lucide-vue-next'

const showDialog = ref(false)
</script>

<style scoped>
.futuristic-container {
  font-family: 'Orbitron', sans-serif;
  position: relative;
  overflow: hidden;
}

.futuristic-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.1) 0%,
    rgba(99, 102, 241, 0.1) 50%,
    rgba(147, 51, 234, 0.1) 100%
  );
  animation: futuristic 15s ease infinite;
  z-index: 0;
}

@keyframes futuristic {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.futuristic-app-bar {
  @apply sticky top-0 z-10 bg-slate-900/50 backdrop-blur-sm;
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-icon-button {
  @apply p-2 rounded-full text-blue-200;
  transition: all 0.3s ease;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-icon-button:hover {
  @apply bg-blue-800 text-blue-100;
  transform: scale(1.1);
}

.futuristic-card {
  @apply rounded-lg p-4 bg-slate-900/50 backdrop-blur-sm;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.futuristic-card:hover {
  @apply bg-slate-900/70;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.futuristic-nav-item {
  @apply flex items-center space-x-3 p-2 rounded-lg text-blue-200;
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-nav-item:hover {
  @apply bg-blue-800 text-blue-100;
}

.futuristic-nav-item.active {
  @apply bg-blue-800 text-blue-100;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
}

.futuristic-badge {
  @apply bg-blue-500 text-white text-xs px-2 py-1 rounded-full;
}

.futuristic-list-item {
  @apply flex items-center space-x-4 p-2 rounded-lg;
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-list-item:hover {
  @apply bg-blue-800;
}

.futuristic-avatar {
  @apply w-10 h-10 rounded-full flex items-center justify-center text-white font-medium;
}

.futuristic-input-group {
  @apply space-y-1;
}

.futuristic-input {
  @apply w-full px-3 py-2 rounded-lg text-blue-200;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.futuristic-input:focus {
  @apply outline-none;
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.futuristic-input::placeholder {
  @apply text-blue-400;
}

.futuristic-checkbox,
.futuristic-radio {
  @apply flex items-center space-x-2 cursor-pointer;
}

.futuristic-checkmark,
.futuristic-radiomark {
  @apply w-5 h-5 rounded;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.futuristic-checkmark {
  @apply rounded;
}

.futuristic-radiomark {
  @apply rounded-full;
}

.futuristic-checkbox input:checked + .futuristic-checkmark,
.futuristic-radio input:checked + .futuristic-radiomark {
  @apply bg-blue-500 border-blue-500;
}

.futuristic-switch {
  @apply flex items-center space-x-2;
}

.futuristic-switch input {
  @apply hidden;
}

.futuristic-switch label {
  @apply relative inline-block w-12 h-6 rounded-full cursor-pointer;
  background: rgba(59, 130, 246, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-switch label:after {
  content: '';
  @apply absolute w-5 h-5 bg-blue-100 rounded-full top-0.5 left-0.5;
  transition: all 0.3s ease;
}

.futuristic-switch input:checked + label {
  @apply bg-blue-500;
}

.futuristic-switch input:checked + label:after {
  @apply translate-x-6;
}

.futuristic-button {
  @apply px-4 py-2 rounded-lg text-blue-200;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.futuristic-button:hover {
  @apply bg-blue-800;
  transform: translateY(-2px);
}

.futuristic-button.outlined {
  @apply bg-transparent border border-blue-300;
}

.futuristic-button.text {
  @apply bg-transparent border-none;
}

.futuristic-button.icon {
  @apply p-2 rounded-full;
}

.futuristic-progress {
  @apply h-1 rounded-full overflow-hidden;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-progress-bar {
  @apply h-full rounded-full;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.5), rgba(99, 102, 241, 0.5));
}

.futuristic-progress.circular {
  @apply w-12 h-12 rounded-full;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-progress-circle {
  @apply w-full h-full rounded-full border-4;
  border-image: linear-gradient(45deg, rgba(59, 130, 246, 0.5), rgba(99, 102, 241, 0.5)) 1;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.futuristic-bottom-nav {
  @apply fixed bottom-0 left-0 right-0 bg-slate-900/50 backdrop-blur-sm flex justify-around items-center py-2;
  border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-bottom-nav-item {
  @apply flex flex-col items-center space-y-1 text-blue-200;
  transition: all 0.3s ease;
}

.futuristic-bottom-nav-item:hover {
  @apply text-blue-100;
}

.futuristic-bottom-nav-item.active {
  @apply text-blue-100;
  background: linear-gradient(45deg, rgba(59, 130, 246, 0.3), rgba(99, 102, 241, 0.3));
}

.futuristic-dialog-overlay {
  @apply fixed inset-0 bg-black/30 flex items-center justify-center;
  backdrop-filter: blur(4px);
}

.futuristic-dialog {
  @apply rounded-lg p-4 bg-slate-900/80 backdrop-blur-sm w-full max-w-md;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.futuristic-dialog-header {
  @apply flex justify-between items-center p-4 border-b border-blue-800;
}

.futuristic-dialog-content {
  @apply p-4;
}

.futuristic-dialog-actions {
  @apply flex justify-end space-x-2 p-4 border-t border-blue-800;
}
</style> 