:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --secondary: #00CEC9;
  --accent: #FD79A8;
  --bg-dark: #0a0a1a;
  --bg-card: #1a1a2e;
  --text-light: #ffffff;
  --text-muted: #a0a0b8;
  --gradient-1: linear-gradient(135deg, #6C5CE7 0%, #00CEC9 100%);
  --gradient-2: linear-gradient(135deg, #FD79A8 0%, #6C5CE7 100%);
  --shadow: 0 8px 32px rgba(108, 92, 231, 0.3);
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 粒子背景 */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  -webkit-text-fill-color: white;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-light);
}

/* 英雄区域 */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.search-box {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 50px;
  padding: 0.5rem;
  border: 1px solid rgba(108, 92, 231, 0.2);
  animation: fadeInUp 1s ease 0.4s both;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.8rem 1.5rem;
  color: var(--text-light);
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box button {
  background: var(--gradient-1);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.search-box button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

/* 分类标签 */
.categories {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
  animation: fadeInUp 1s ease 0.6s both;
}

.category-tag {
  padding: 0.5rem 1.5rem;
  background: var(--bg-card);
  border-radius: 50px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.category-tag:hover,
.category-tag.active {
  background: var(--gradient-1);
  color: white;
  border-color: var(--primary);
}

/* 应用卡片网格 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.app-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(108, 92, 231, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.app-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.app-card .app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.app-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.app-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card .rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #f1c40f;
  margin-bottom: 1rem;
}

.app-card .download-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--gradient-1);
  border-radius: 50px;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
}

.app-card .download-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(108, 92, 231, 0.1);
  position: relative;
  z-index: 1;
}

.footer .brand {
  color: var(--primary);
  font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .nav-links {
    display: none;
  }
  .app-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 4rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-card);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}