/* ============================================================
   PredictHub - 共享样式表
   SaaS风格：干净、留白、大圆角、微阴影
   主色调：indigo-600
   ============================================================ */

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #4f46e5, #4338ca);
}

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

/* ---------- 全局字体 ---------- */
body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ---------- Navbar 滚动效果 ---------- */
#navbar {
  transition: all 0.35s ease;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* ---------- 移动端菜单 ---------- */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
#mobile-menu.open {
  max-height: 480px;
  opacity: 1;
}

/* ---------- Feature 卡片悬停上浮 ---------- */
.feature-card {
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15), 0 8px 16px rgba(0, 0, 0, 0.06);
}

/* ---------- FAQ 手风琴 ---------- */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
}
.faq-question {
  cursor: pointer;
  transition: color 0.25s ease;
}
.faq-question:hover {
  color: #4f46e5;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.faq-item.active .faq-answer {
  max-height: 300px;
}
.faq-icon {
  transition: transform 0.35s ease;
  display: inline-block;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* ---------- CTA 区域动画 ---------- */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  animation: cta-pulse 6s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ---------- 统计数字滚动效果 ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- 评价卡片 ---------- */
.testimonial-card {
  transition: all 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

/* ---------- 星级评分颜色 ---------- */
.star-filled {
  color: #f59e0b;
}

/* ---------- 表单输入框 ---------- */
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.25s ease;
  outline: none;
  background: #fff;
}
.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.form-input:hover {
  border-color: #c7d2fe;
}

/* ---------- 按钮效果 ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #4f46e5, #4338ca);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: #fff;
  color: #4f46e5;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid #4f46e5;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.btn-secondary:hover {
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.15);
}

/* ---------- 页脚链接 ---------- */
.footer-link {
  color: #c7d2fe;
  transition: color 0.25s ease;
  text-decoration: none;
}
.footer-link:hover {
  color: #fff;
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }
  .hero-subtitle {
    font-size: 1.05rem !important;
  }
  .feature-card {
    margin-bottom: 1rem;
  }
  .section-padding {
    padding: 3rem 1rem !important;
  }
  #navbar .nav-links {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem !important;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- 页面过渡 ---------- */
.page-content {
  animation: fadeInUp 0.5s ease;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 关于页面团队卡片 ---------- */
.team-card {
  transition: all 0.3s ease;
}
.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.12);
}

/* ---------- 联系页面信息卡片 ---------- */
.contact-info-card {
  transition: all 0.3s ease;
}
.contact-info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

/* ---------- Toast 提示 ---------- */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  background: #10b981;
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
}
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
