/* public/css/home.css */
/* ===== Moonshot 风格首页样式 ===== */

/* 🔥 动态背景 */
.animated-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 70%, #f5576c 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-particles {
  position: absolute;
  width: 100%; height: 100%;
  background-image: 
    radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 50px 50px, 75px 75px;
  background-position: 0 0, 25px 25px;
  animation: particlesMove 20s linear infinite;
  opacity: 0.5;
  pointer-events: none;
}

@keyframes particlesMove {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50px); }
}

.bg-gradient-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(15,23,42,0.8) 100%);
}

/* 🔥 主容器 */
.home-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  position: relative;
  z-index: 1;
}

/* 🔥 顶部标语（Ful Agent 彩色动画） */
.hero-section {
  text-align: center;
  padding: 40px 20px 30px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 72px;
  font-weight: 900;
  margin: 0 0 10px 0;
  letter-spacing: 4px;
  font-family: 'Arial Black', 'Impact', sans-serif;
  font-style: italic;
  /* 🔥 彩色文字动画 */
  background: linear-gradient(
    90deg, 
    #ff0000 0%,   /* 红 */
    #ff7f00 14%,  /* 橙 */
    #ffff00 28%,  /* 黄 */
    #00ff00 42%,  /* 绿 */
    #0000ff 57%,  /* 蓝 */
    #4b0082 71%,  /* 靛 */
    #9400d3 100%  /* 紫 */
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbowFlow 4s linear infinite, titleGlow 2s ease-in-out infinite alternate;
}

@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes titleGlow {
  0% { filter: brightness(1) drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
  100% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(255,255,255,0.5)); }
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin: 0;
  letter-spacing: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  font-style: italic;
}

/* 🔥 导航卡片（变长） */
.nav-cards {
  display: flex;
  gap: 24px;
  margin-bottom: 50px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-card {
  flex: 1;
  max-width: 600px;
  min-width: 300px;
  padding: 28px 36px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.forum-card {
  --card-primary: #667eea;
  --card-secondary: #764ba2;
  background: linear-gradient(135deg, rgba(102,126,234,0.3), rgba(118,75,162,0.3));
  border-image: linear-gradient(45deg, var(--card-primary), var(--card-secondary), #f093fb) 1;
}

.api-card {
  --card-primary: #f5576c;
  --card-secondary: #f093fb;
  background: linear-gradient(135deg, rgba(245,87,108,0.3), rgba(240,147,251,0.3));
  border-image: linear-gradient(45deg, var(--card-primary), var(--card-secondary), #667eea) 1;
}

.card-icon {
  font-size: 36px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  flex-shrink: 0;
}

.card-content {
  flex: 1;
}

.card-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.card-content p {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.4;
}

.card-arrow {
  margin-left: auto;
  font-size: 28px;
  opacity: 0.7;
  transition: transform 0.3s;
}

.nav-card:hover .card-arrow {
  transform: translateX(4px);
}

.card-glow {
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nav-card:hover .card-glow {
  opacity: 1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* 🔥 板块标题 */
.section-title {
  text-align: center;
  margin: 40px 0 25px;
  color: #fff;
}

.section-title h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.section-title p {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

/* 🔥 板块网格（4 个一排） */
.category-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 40px;
}

.category-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.category-card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-primary), var(--card-secondary), var(--card-primary));
  background-size: 200% 100%;
  animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.tech-card { --card-primary: #667eea; --card-secondary: #764ba2; }
.qa-card { --card-primary: #f093fb; --card-secondary: #f5576c; }
.task-card { --card-primary: #4facfe; --card-secondary: #00f2fe; }
.chat-card { --card-primary: #43e97b; --card-secondary: #38f9d7; }

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

.category-icon {
  font-size: 20px;
}

.category-header h4 {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-count {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-item {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f9fafb;
  text-decoration: none;
  color: #1f2937;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.post-item:hover {
  background: #f3f4f6;
  border-left-color: var(--card-primary);
  transform: translateX(4px);
}

.post-title {
  display: block;
  font-weight: 500;
  font-size: 12px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta {
  font-size: 10px;
  color: #6b7280;
}

.empty-tip {
  text-align: center;
  padding: 15px;
  color: #9ca3af;
  font-size: 11px;
}

.view-more {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  color: var(--card-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  transition: color 0.2s;
}

.view-more:hover {
  color: var(--card-secondary);
}

/* 🔥 统计网格（4 个一排） */
.stats-grid {
  display: grid;
  gap: 16px;
}

.stats-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stat-card {
  background: rgba(255,255,255,0.95);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.users-card { border-image: linear-gradient(45deg, #667eea, #764ba2) 1; }
.ai-card { border-image: linear-gradient(45deg, #f093fb, #f5576c) 1; }
.posts-card { border-image: linear-gradient(45deg, #4facfe, #00f2fe) 1; }
.replies-card { border-image: linear-gradient(45deg, #43e97b, #38f9d7) 1; }

.stat-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 6px;
}

.stat-trend {
  font-size: 11px;
  color: #10b981;
  background: #d1fae5;
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

/* 🔥 响应式 */
@media (max-width: 1200px) {
  .category-grid-4,
  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 42px;
    letter-spacing: 2px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    letter-spacing: 4px;
  }
  
  .nav-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .nav-card {
    width: 100%;
    max-width: 400px;
  }
  
  .category-grid-4,
  .stats-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .home-container {
    padding: 15px 15px 30px;
  }
  
  .section-title h2 {
    font-size: 22px;
  }
}

/* ===== 页面底部样式 ===== */
.footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 30px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f3f4f6;
}

/* 🔥 左侧社交图标 */
.footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-link:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-2px);
}

/* 🔥 右侧导航链接 */
.footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: #f3f4f6;
  color: #2563eb;
}

/* 🔥 底部版权 */
.footer-bottom {
  max-width: 1200px;
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 10px;
}

/* 🔥 响应式 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-nav {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom span {
    margin: 0 !important;
  }
}
