<template>
  <div class="neon-container min-h-screen bg-black">
    <!-- 顶部导航栏 -->
    <div class="neon-header">
      <div class="neon-header-content">
        <div class="neon-logo">
          <img :src="logoUrl" alt="Neon Logo" class="neon-logo-img">
          <span class="neon-logo-text">NEON</span>
        </div>
        <div class="neon-nav">
          <a href="#" class="neon-nav-item active">首页</a>
          <a href="#" class="neon-nav-item">组件</a>
          <a href="#" class="neon-nav-item">文档</a>
          <a href="#" class="neon-nav-item">主题</a>
        </div>
        <div class="neon-header-actions">
          <button class="neon-btn text">
            <Search class="w-5 h-5" />
          </button>
          <button class="neon-btn text">
            <Bell class="w-5 h-5" />
          </button>
          <button class="neon-btn text">
            <User class="w-5 h-5" />
          </button>
        </div>
      </div>
    </div>

    <!-- 主要内容区 -->
    <div class="neon-main">
      <!-- 卡片列表 -->
      <div class="neon-card-list">
        <div v-for="card in cards" :key="card.id" class="neon-card">
          <div class="neon-card-cover">
            <img :src="card.cover" :alt="card.title" class="neon-card-cover-img">
          </div>
          <div class="neon-card-body">
            <div class="neon-card-meta">
              <div class="neon-card-meta-avatar">
                <div class="neon-avatar" :class="card.avatarClass">
                  {{ card.initials }}
                </div>
              </div>
              <div class="neon-card-meta-content">
                <h3 class="neon-card-meta-title">{{ card.title }}</h3>
                <p class="neon-card-meta-description">{{ card.description }}</p>
              </div>
            </div>
            <p class="neon-card-content">{{ card.content }}</p>
            <div class="neon-card-actions">
              <button class="neon-btn text">
                <Heart class="w-5 h-5" />
                <span>{{ card.likes }}</span>
              </button>
              <button class="neon-btn text">
                <MessageSquare class="w-5 h-5" />
                <span>{{ card.comments }}</span>
              </button>
              <button class="neon-btn text">
                <Share2 class="w-5 h-5" />
              </button>
            </div>
          </div>
        </div>
      </div>

      <!-- 表单元素 -->
      <div class="neon-form">
        <div class="neon-form-item">
          <label class="neon-form-item-label">文本输入</label>
          <div class="neon-form-item-control">
            <input type="text" placeholder="请输入内容" class="neon-input">
          </div>
        </div>
        <div class="neon-form-item">
          <label class="neon-form-item-label">密码输入</label>
          <div class="neon-form-item-control">
            <input type="password" placeholder="请输入密码" class="neon-input">
          </div>
        </div>
        <div class="neon-form-item">
          <label class="neon-form-item-label">下拉选择</label>
          <div class="neon-form-item-control">
            <select class="neon-select">
              <option>选项 1</option>
              <option>选项 2</option>
              <option>选项 3</option>
            </select>
          </div>
        </div>
        <div class="neon-form-item">
          <label class="neon-form-item-label">开关</label>
          <div class="neon-form-item-control">
            <label class="neon-switch">
              <input type="checkbox">
              <span class="neon-switch-inner"></span>
            </label>
          </div>
        </div>
      </div>

      <!-- 按钮组 -->
      <div class="neon-btn-group">
        <button class="neon-btn primary">主要按钮</button>
        <button class="neon-btn secondary">次要按钮</button>
        <button class="neon-btn outline">轮廓按钮</button>
        <button class="neon-btn text">文本按钮</button>
      </div>

      <!-- 标签页 -->
      <div class="neon-tabs">
        <div class="neon-tabs-nav">
          <div 
            v-for="tab in tabs" 
            :key="tab.id"
            class="neon-tabs-tab"
            :class="{ active: activeTab === tab.id }"
            @click="activeTab = tab.id"
          >
            {{ tab.label }}
          </div>
        </div>
        <div class="neon-tabs-content">
          <div v-if="activeTab === 'tab1'" class="neon-tabs-tabpane">
            <p>标签页 1 的内容</p>
          </div>
          <div v-if="activeTab === 'tab2'" class="neon-tabs-tabpane">
            <p>标签页 2 的内容</p>
          </div>
          <div v-if="activeTab === 'tab3'" class="neon-tabs-tabpane">
            <p>标签页 3 的内容</p>
          </div>
        </div>
      </div>

      <!-- 对话框 -->
      <div v-if="showDialog" class="neon-modal-mask">
        <div class="neon-modal-wrap">
          <div class="neon-modal">
            <div class="neon-modal-content">
              <div class="neon-modal-header">
                <div class="neon-modal-title">对话框标题</div>
                <button class="neon-modal-close" @click="showDialog = false">
                  <X class="w-5 h-5" />
                </button>
              </div>
              <div class="neon-modal-body">
                <p>这是一个霓虹灯风格的对话框示例。</p>
              </div>
              <div class="neon-modal-footer">
                <button class="neon-btn" @click="showDialog = false">取消</button>
                <button class="neon-btn primary" @click="showDialog = false">确定</button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 消息提示 -->
      <div v-if="showMessage" class="neon-message">
        <div class="neon-message-notice">
          <div class="neon-message-notice-content">
            <Info class="w-5 h-5" />
            <span>这是一条消息提示</span>
          </div>
        </div>
      </div>

      <!-- 通知面板 -->
      <div v-if="showNotifications" class="neon-notification">
        <div class="neon-notification-notice">
          <div class="neon-notification-notice-content">
            <div class="neon-notification-notice-icon">
              <Bell class="w-5 h-5" />
            </div>
            <div class="neon-notification-notice-message">通知标题</div>
            <div class="neon-notification-notice-description">通知内容</div>
          </div>
          <button class="neon-notification-notice-close" @click="showNotifications = false">
            <X class="w-5 h-5" />
          </button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { 
  Search, Bell, User, MoreVertical,
  Heart, MessageSquare, Share2, X,
  Info
} from 'lucide-vue-next'

const showDialog = ref(false)
const showMessage = ref(false)
const showNotifications = ref(false)
const activeTab = ref('tab1')

const logoUrl = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNiIgZmlsbD0idXJsKCNwYWludDApIi8+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJwYWludDAiIHgxPSIwIiB5MT0iMCIgeDI9IjMyIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMDBGRkZGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkYwMEZGIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PC9zdmc+'

const cards = ref([
  {
    id: 1,
    title: '卡片标题',
    description: '副标题',
    content: '这是卡片的内容，可以包含多行文本。',
    cover: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIwIiBoZWlnaHQ9IjI0MCIgdmlld0JveD0iMCAwIDMyMCAyNDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMyMCIgaGVpZ2h0PSIyNDAiIGZpbGw9IiMwMDAwMDAiLz48cGF0aCBkPSJNMTYwIDYwQzEzMy40MzEgNjAgMTEyIDgxLjQzMSAxMTIgMTA4QzExMiAxMzQuNTY5IDEzMy40MzEgMTU2IDE2MCAxNTZDMTg2LjU2OSAxNTYgMjA4IDEzNC41NjkgMjA4IDEwOEMyMDggODEuNDMxIDE4Ni41NjkgNjAgMTYwIDYwWiIgZmlsbD0iIzAwRkZGRiIvPjxwYXRoIGQ9Ik0xNjAgMTgwQzEzMy40MzEgMTgwIDExMiAyMDEuNDMxIDExMiAyMjhDMTEyIDI1NC41NjkgMTMzLjQzMSAyNzYgMTYwIDI3NkMxODYuNTY5IDI3NiAyMDggMjU0LjU2OSAyMDggMjI4QzIwOCAyMDEuNDMxIDE4Ni41NjkgMTgwIDE2MCAxODBaIiBmaWxsPSIjRkYwMEZGIi8+PC9zdmc+',
    likes: 42,
    comments: 8,
    initials: 'JD',
    avatarClass: 'bg-cyan-500'
  },
  {
    id: 2,
    title: '另一个标题',
    description: '另一个副标题',
    content: '这是另一个卡片的内容。',
    cover: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIwIiBoZWlnaHQ9IjI0MCIgdmlld0JveD0iMCAwIDMyMCAyNDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHJlY3Qgd2lkdGg9IjMyMCIgaGVpZ2h0PSIyNDAiIGZpbGw9IiMwMDAwMDAiLz48cGF0aCBkPSJNMTYwIDYwQzEzMy40MzEgNjAgMTEyIDgxLjQzMSAxMTIgMTA4QzExMiAxMzQuNTY5IDEzMy40MzEgMTU2IDE2MCAxNTZDMTg2LjU2OSAxNTYgMjA4IDEzNC41NjkgMjA4IDEwOEMyMDggODEuNDMxIDE4Ni41NjkgNjAgMTYwIDYwWiIgZmlsbD0iI0ZGMDBCQiIvPjxwYXRoIGQ9Ik0xNjAgMTgwQzEzMy40MzEgMTgwIDExMiAyMDEuNDMxIDExMiAyMjhDMTEyIDI1NC41NjkgMTMzLjQzMSAyNzYgMTYwIDI3NkMxODYuNTY5IDI3NiAyMDggMjU0LjU2OSAyMDggMjI4QzIwOCAyMDEuNDMxIDE4Ni41NjkgMTgwIDE2MCAxODBaIiBmaWxsPSIjMDBGRkZGIi8+PC9zdmc+',
    likes: 36,
    comments: 5,
    initials: 'AB',
    avatarClass: 'bg-pink-500'
  }
])

const tabs = ref([
  { id: 'tab1', label: '标签页 1' },
  { id: 'tab2', label: '标签页 2' },
  { id: 'tab3', label: '标签页 3' }
])
</script>

<style scoped>
.neon-container {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(45deg, #000, #1a1a1a);
}

.neon-header {
  @apply fixed top-0 left-0 right-0 h-16 bg-black/80 z-10;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-header-content {
  @apply container mx-auto px-4 h-full flex items-center justify-between;
}

.neon-logo {
  @apply flex items-center;
}

.neon-logo-img {
  @apply h-8 w-8;
}

.neon-logo-text {
  @apply ml-2 text-xl font-medium text-cyan-400;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neon-nav {
  @apply flex items-center space-x-6;
}

.neon-nav-item {
  @apply text-cyan-400 hover:text-cyan-300;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-nav-item.active {
  @apply text-cyan-300;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.neon-header-actions {
  @apply flex items-center space-x-2;
}

.neon-main {
  @apply pt-20 pb-8 px-4;
}

.neon-card-list {
  @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4;
}

.neon-card {
  @apply bg-black/80 rounded-xl overflow-hidden;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.neon-card:hover {
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  transform: translateY(-5px);
}

.neon-card-cover {
  @apply relative h-48 overflow-hidden;
}

.neon-card-cover-img {
  @apply w-full h-full object-cover;
}

.neon-card-body {
  @apply p-4;
}

.neon-card-meta {
  @apply flex items-start mb-4;
}

.neon-card-meta-avatar {
  @apply mr-4;
}

.neon-avatar {
  @apply w-10 h-10 rounded-full flex items-center justify-center text-white font-medium;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.neon-card-meta-content {
  @apply flex-1;
}

.neon-card-meta-title {
  @apply text-base font-medium text-cyan-400;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-card-meta-description {
  @apply text-sm text-cyan-300;
}

.neon-card-content {
  @apply text-cyan-200 mb-4;
}

.neon-card-actions {
  @apply flex items-center border-t border-cyan-500/20 pt-4;
}

.neon-form {
  @apply space-y-4 mt-6;
}

.neon-form-item {
  @apply flex flex-col;
}

.neon-form-item-label {
  @apply mb-2 text-cyan-400;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-form-item-control {
  @apply flex-1;
}

.neon-input,
.neon-select {
  @apply w-full px-4 py-2 bg-black/80 rounded-xl border border-cyan-500/20 focus:border-cyan-500 focus:ring-1 focus:ring-cyan-500 text-cyan-200;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.neon-switch {
  @apply relative inline-block w-12 h-6;
}

.neon-switch input {
  @apply hidden;
}

.neon-switch-inner {
  @apply absolute inset-0 rounded-full bg-black/80 transition-colors duration-300;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-switch-inner:after {
  content: '';
  @apply absolute w-5 h-5 rounded-full bg-cyan-400 top-0.5 left-0.5 shadow transition-transform duration-300;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neon-switch input:checked + .neon-switch-inner {
  @apply bg-cyan-500/30;
}

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

.neon-btn-group {
  @apply flex flex-wrap gap-2 mt-6;
}

.neon-btn {
  @apply px-4 py-2 rounded-xl text-sm font-medium transition-all duration-300;
}

.neon-btn.primary {
  @apply bg-cyan-500/30 text-cyan-400 hover:bg-cyan-500/40;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-btn.secondary {
  @apply bg-purple-500/30 text-purple-400 hover:bg-purple-500/40;
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.2);
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.neon-btn.outline {
  @apply bg-transparent text-cyan-400 border border-cyan-500/20 hover:border-cyan-500;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.neon-btn.text {
  @apply bg-transparent text-cyan-400 hover:text-cyan-300;
}

.neon-tabs {
  @apply mt-6;
}

.neon-tabs-nav {
  @apply flex border-b border-cyan-500/20;
}

.neon-tabs-tab {
  @apply px-4 py-3 text-cyan-400 cursor-pointer hover:text-cyan-300;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-tabs-tab.active {
  @apply text-cyan-300 border-b-2 border-cyan-500;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.neon-tabs-content {
  @apply p-4;
}

.neon-tabs-tabpane {
  @apply bg-black/80 rounded-xl p-4;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-modal-mask {
  @apply fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50;
}

.neon-modal-wrap {
  @apply fixed inset-0 overflow-auto;
}

.neon-modal {
  @apply relative top-20 mx-auto w-full max-w-md;
}

.neon-modal-content {
  @apply bg-black/80 rounded-xl shadow-lg;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-modal-header {
  @apply flex justify-between items-center p-4 border-b border-cyan-500/20;
}

.neon-modal-title {
  @apply text-lg font-medium text-cyan-400;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-modal-close {
  @apply text-cyan-400 hover:text-cyan-300;
}

.neon-modal-body {
  @apply p-4;
}

.neon-modal-footer {
  @apply flex justify-end space-x-2 p-4 border-t border-cyan-500/20;
}

.neon-message {
  @apply fixed top-4 right-4 z-50;
}

.neon-message-notice {
  @apply mb-4;
}

.neon-message-notice-content {
  @apply flex items-center px-4 py-3 bg-black/80 rounded-xl shadow-lg;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-notification {
  @apply fixed top-4 right-4 z-50;
}

.neon-notification-notice {
  @apply mb-4 bg-black/80 rounded-xl shadow-lg overflow-hidden;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.neon-notification-notice-content {
  @apply p-4;
}

.neon-notification-notice-icon {
  @apply float-left mr-4 text-cyan-400;
}

.neon-notification-notice-message {
  @apply text-base font-medium text-cyan-400;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.neon-notification-notice-description {
  @apply mt-1 text-sm text-cyan-300;
}

.neon-notification-notice-close {
  @apply absolute top-4 right-4 text-cyan-400 hover:text-cyan-300;
}
</style> 