/* ============================================================
 * 柒剑科技 · 官网样式表
 * 主色调：科技蓝紫渐变
 * ============================================================ */

:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --secondary: #00cec9;
  --accent: #fd79a8;
  --bg-dark: #0a0a1a;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3e;
  --text-primary: #f0f0ff;
  --text-secondary: #9898c8;
  --text-muted: #6a6a9a;
  --border-color: rgba(108, 92, 231, 0.2);
  --gradient-main: linear-gradient(135deg, #6c5ce7, #00cec9);
  --gradient-text: linear-gradient(135deg, #a29bfe, #00cec9);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1200px;
  --header-height: 72px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.3s;
}
a:hover { color: var(--secondary); }

/* ===== 粒子背景 ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== 导航栏 ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
  transition: all 0.3s;
}
.header.scrolled {
  background: rgba(10, 10, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.logo span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  transition: all 0.3s;
  position: relative;
}
.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.15);
}
.nav-cta {
  background: var(--gradient-main) !important;
  color: #fff !important;
  padding: 10px 24px !important;
  border-radius: 8px !important;
  font-weight: 600;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Hero 区 ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
}
.hero-content {
  max-width: 800px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  font-size: 14px;
  color: var(--primary-light);
  margin-bottom: 24px;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 206, 201, 0.6); }
  50% { opacity: 0.8; box-shadow: 0 0 0 10px rgba(0, 206, 201, 0); }
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero h1 .highlight {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.5);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid rgba(108, 92, 231, 0.4);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  transform: translateY(-2px);
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(108, 92, 231, 0.15);
}
.stat-item {
  text-align: center;
}
.stat-value {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 通用 Section ===== */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== 产品展示 ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.4s;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 92, 231, 0.4);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.product-card:hover::before {
  opacity: 1;
}
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(108, 92, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.product-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}
.product-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
}
.product-link .arrow {
  transition: transform 0.3s;
}
.product-link:hover .arrow {
  transform: translateX(4px);
}

/* ===== 特性区 ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
  transition: all 0.3s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(108, 92, 231, 0.3);
  transform: translateY(-3px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.feature-card h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== 开放平台 ===== */
.openclaw-section {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.05));
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.openclaw-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.openclaw-info h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}
.openclaw-info p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 24px;
}
.benefit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}
.benefit-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 206, 201, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 13px;
  margin-top: 2px;
}
.openclaw-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.openclaw-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}
.openclaw-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 92, 231, 0.4);
}
.openclaw-card .num {
  font-size: 36px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.openclaw-card .label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 关于我们 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h2 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
}
.about-text p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-tech {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tech-tag {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}
.tech-tag:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===== 联系/反馈 ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.contact-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.contact-item p {
  font-size: 14px;
  color: var(--text-secondary);
}
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.form-group textarea {
  height: 120px;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--gradient-main);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all 0.3s;
}
.faq-item:hover {
  border-color: rgba(108, 92, 231, 0.3);
}
.faq-question {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  user-select: none;
  transition: color 0.3s;
}
.faq-question:hover {
  color: var(--primary-light);
}
.faq-icon {
  font-size: 18px;
  transition: transform 0.3s;
  color: var(--text-muted);
  flex-shrink: 0;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}
.faq-answer p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-color);
  padding: 60px 24px 30px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo {
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.7;
}
.footer-col h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color 0.3s;
}
.footer-col a:hover {
  color: var(--primary-light);
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(108, 92, 231, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s;
}
.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: rgba(0, 206, 201, 0.15);
  border: 1px solid var(--secondary);
  color: var(--secondary);
}
.toast.error {
  background: rgba(253, 121, 168, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 4px;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    width: 100%;
    padding: 14px 18px;
  }
  .nav-cta {
    text-align: center;
  }
  .menu-toggle {
    display: flex;
  }
  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }
  .openclaw-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .openclaw-cards {
    grid-template-columns: 1fr 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  /* AI Token Hub 响应式 */
  #ai-hub .ai-hub-intro {
    grid-template-columns: 1fr !important;
  }
  #ai-hub [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .section { padding: 60px 16px; }
  .products-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-tech { grid-template-columns: 1fr; }
  .openclaw-cards { grid-template-columns: 1fr; }
  /* AI Token Hub 响应式 */
  #ai-hub .ai-hub-intro {
    grid-template-columns: 1fr !important;
  }
  #ai-hub [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  #ai-hub [style*="grid-template-columns:repeat(auto-fill,minmax(160px,1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== 动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}
