/* =========================================================================
   首页科技感样式 — Aceternity UI 风格
   粒子特效 + 渐变光晕 + 网格背景 + 卡片悬浮
   ========================================================================= */

/* ====== 主容器 ====== */
.ace-home {
  position: relative;
  overflow: hidden;
}

/* ====== Hero 区域 ====== */
.ace-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
  padding: 80px 24px;
}

/* 粒子背景 */
.ace-hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ace-hero-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* 渐变光晕 */
.ace-hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.15) 0%, rgba(168,85,247,0.08) 30%, transparent 60%);
  filter: blur(60px);
  animation: ace-glow-pulse 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ace-glow-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.15); }
}

/* 网格背景 */
.ace-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

/* Hero 内容 */
.ace-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
}

/* 标签 */
.ace-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ace-hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 8px #818cf8;
  animation: ace-dot-blink 2s ease-in-out infinite;
}

@keyframes ace-dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 主标题 */
.ace-hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.ace-hero-line {
  display: block;
  color: rgba(255,255,255,0.9);
}

.ace-hero-gradient {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 30%, #f472b6 60%, #818cf8 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ace-gradient-move 5s ease-in-out infinite;
}

@keyframes ace-gradient-move {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 描述 */
.ace-hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* CTA 按钮 */
.ace-hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.ace-btn {
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.ace-btn svg { width: 18px; height: 18px; }

.ace-btn-primary {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}

.ace-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.55);
}

.ace-btn-ghost {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.1);
}

.ace-btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
  transform: translateY(-2px);
}

.ace-btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* 统计 */
.ace-hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
}

.ace-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ace-stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.ace-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* 滚动提示 */
.ace-hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  animation: ace-scroll-bounce 2s ease-in-out infinite;
}

.ace-hero-scroll svg { width: 18px; height: 18px; }

@keyframes ace-scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.6; }
}

/* ====== 通用 Section ====== */
.ace-categories,
.ace-latest,
.ace-features,
.ace-cta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.ace-section-title {
  margin-bottom: 40px;
}

.ace-section-title-text {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

/* ====== 分类网格 ====== */
.ace-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ace-cat-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #0f0f0f;
}

.ace-cat-card:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.ace-cat-img {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.ace-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ace-cat-card:hover .ace-cat-img img {
  transform: scale(1.08);
}

.ace-cat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,1) 0%, rgba(15,15,15,0.4) 50%, transparent 100%);
}

.ace-cat-info {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ace-cat-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.ace-cat-count {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.ace-cat-arrow {
  position: absolute;
  bottom: 16px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.ace-cat-card:hover .ace-cat-arrow {
  opacity: 1;
  transform: translateX(0);
}

.ace-cat-arrow svg { width: 16px; height: 16px; }

/* ====== 最新组件 ====== */
.ace-latest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.ace-latest-header .ace-section-title { margin-bottom: 0; }

.ace-latest-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}

.ace-latest-more:hover { color: #fff; }
.ace-latest-more svg { width: 16px; height: 16px; }

.ace-latest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ace-latest-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #0f0f0f;
}

.ace-latest-card:hover {
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.3);
}

.ace-latest-img {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.ace-latest-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.ace-latest-card:hover .ace-latest-img img {
  transform: scale(1.08);
}

.ace-latest-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,15,1) 0%, transparent 70%);
}

.ace-latest-body {
  padding: 14px 16px;
}

.ace-latest-cat {
  font-size: 11px;
  color: #818cf8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ace-latest-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin: 4px 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ace-latest-body p {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ace-latest-date {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

/* ====== 特性区 ====== */
.ace-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ace-feature {
  padding: 32px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: #0f0f0f;
  transition: all 0.3s ease;
  text-align: center;
}

.ace-feature:hover {
  border-color: rgba(129,140,248,0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(99,102,241,0.08);
}

.ace-feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.15));
  border: 1px solid rgba(129,140,248,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
}

.ace-feature-icon svg { width: 24px; height: 24px; }

.ace-feature h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.ace-feature p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ====== CTA 底部 ====== */
.ace-cta {
  position: relative;
  text-align: center;
  padding: 100px 24px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ace-cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.15), rgba(168,85,247,0.08), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

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

.ace-cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.ace-cta-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 32px;
}

/* ====== 滚动渐入动画 ====== */
.ace-cat-card,
.ace-latest-card,
.ace-feature {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}

.ace-cat-card.ace-visible,
.ace-latest-card.ace-visible,
.ace-feature.ace-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== 响应式 ====== */
@media (max-width: 1024px) {
  .ace-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .ace-latest-grid { grid-template-columns: repeat(2, 1fr); }
  .ace-feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .ace-hero { min-height: 90vh; padding: 60px 16px; }
  .ace-hero-stats { gap: 24px; }
  .ace-stat-num { font-size: 1.5rem; }
  .ace-categories, .ace-latest, .ace-features, .ace-cta { padding: 48px 16px; }
  .ace-section-title-text { font-size: 1.5rem; }
  .ace-latest-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ace-cta-content h2 { font-size: 1.75rem; }
  .ace-hero-cta { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .ace-cat-grid { grid-template-columns: 1fr; }
  .ace-latest-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ace-feature-grid { grid-template-columns: 1fr; }
  .ace-hero-stats { gap: 16px; flex-wrap: wrap; }
  .ace-stat-num { font-size: 1.25rem; }
}
