/* AI关键词优化官网 - 自定义样式 */

/* AI背景装饰动画 */
@keyframes dataflow {
  0% { transform: translateY(0); opacity: 0.03; }
  50% { opacity: 0.08; }
  100% { transform: translateY(-30px); opacity: 0.03; }
}

@keyframes gridpulse {
  0%, 100% { opacity: 0.04; }
  50% { opacity: 0.07; }
}

.ai-bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ai-bg-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle 1.5px at 20% 30%, rgba(59,130,246,0.06) 1px, transparent 1px),
    radial-gradient(circle 1.5px at 60% 70%, rgba(59,130,246,0.05) 1px, transparent 1px),
    radial-gradient(circle 1.5px at 80% 20%, rgba(59,130,246,0.06) 1px, transparent 1px),
    radial-gradient(circle 1px at 40% 50%, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 200px 200px, 300px 300px, 250px 250px, 180px 180px;
  animation: gridpulse 6s ease-in-out infinite;
}

.ai-bg-pattern::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgba(59,130,246,0.03) 49.5%, rgba(59,130,246,0.03) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(59,130,246,0.03) 49.5%, rgba(59,130,246,0.03) 50.5%, transparent 50.5%);
  background-size: 60px 60px;
  animation: dataflow 12s linear infinite;
}

.dark .ai-bg-pattern::before {
  background-image:
    radial-gradient(circle 1.5px at 20% 30%, rgba(96,165,250,0.08) 1px, transparent 1px),
    radial-gradient(circle 1.5px at 60% 70%, rgba(96,165,250,0.06) 1px, transparent 1px),
    radial-gradient(circle 1.5px at 80% 20%, rgba(96,165,250,0.08) 1px, transparent 1px),
    radial-gradient(circle 1px at 40% 50%, rgba(96,165,250,0.05) 1px, transparent 1px);
}

.dark .ai-bg-pattern::after {
  background-image:
    linear-gradient(90deg, transparent 49.5%, rgba(96,165,250,0.06) 49.5%, rgba(96,165,250,0.06) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(96,165,250,0.06) 49.5%, rgba(96,165,250,0.06) 50.5%, transparent 50.5%);
}

/* 深色模式背景 */
.dark body {
  background-color: #191d24;
  color: #eef1f6;
}

.dark .bg-white { background-color: #191d24 !important; }
.dark .bg-gray-50, .dark .bg-slate-50 { background-color: #1f242d !important; }
.dark .bg-blue-50 { background-color: #1a2538 !important; }
.dark .bg-red-50 { background-color: #331a1a !important; }
.dark .bg-blue-100 { background-color: #1d2f4d !important; }
.dark .text-gray-900 { color: #eef1f6 !important; }
.dark .text-gray-600 { color: #9ba3b0 !important; }
.dark .text-gray-500 { color: #7a838e !important; }
.dark .text-gray-400 { color: #5f6872 !important; }
.dark .text-gray-700 { color: #d0d5db !important; }
.dark .text-gray-800 { color: #dde2e8 !important; }
.dark .border-gray-100 { border-color: #2a3040 !important; }
.dark .border-gray-200 { border-color: #2f3648 !important; }
.dark .border-gray-300 { border-color: #3a4356 !important; }
.dark .shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important; }
.dark input, .dark textarea { background-color: #2a3040; color: #eef1f6; border-color: #3a4356; }

/* 卡片悬浮动画 */
.card-hover {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(59,130,246,0.08), 0 4px 10px rgba(59,130,246,0.04);
}
.dark .card-hover:hover {
  box-shadow: 0 12px 28px rgba(96,165,250,0.12), 0 4px 10px rgba(96,165,250,0.06);
}

/* 平台Logo自适应 */
.platform-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}
.platform-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 广告位文字截断 */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 按钮渐变发光 */
.btn-glow {
  transition: all 0.3s ease;
  position: relative;
}
.btn-glow:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.9), rgba(99,179,255,0.95));
  box-shadow: 0 4px 16px rgba(59,130,246,0.25);
}
.dark .btn-glow:hover {
  background: linear-gradient(135deg, rgba(96,165,250,0.85), rgba(147,197,253,0.9));
  box-shadow: 0 4px 16px rgba(96,165,250,0.3);
}

/* 广告位样式 */
.ad-slot {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ad-slot:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.08);
}
.ad-slot img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
}
.ad-slot-banner-top {
  margin-top: 5rem;
}
.ad-slot-stats-bottom {
  margin-top: 2rem;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.2); border-radius: 3px; }

/* 平滑滚动 */
html { scroll-behavior: smooth; }
