/* ===== CSS Variables (shared design language) ===== */
/* Fix for mobile modal centering */
html, body {
  min-height: 100vh;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fb;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-light: rgba(99, 102, 241, 0.08);
  --accent-lighter: rgba(99, 102, 241, 0.04);
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --max-width: 960px;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --accent-light: rgba(129, 140, 248, 0.12);
  --accent-lighter: rgba(129, 140, 248, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.85);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-logo {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-size: 20px;
  font-weight: 700;
  transition: opacity 0.2s ease;
}
.header-logo:hover { opacity: 0.8; }


.theme-toggle {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text-primary);
}


.theme-toggle svg {
  color: var(--text-primary);
  transition: color var(--transition);
}

.theme-toggle:hover svg {
  color: var(--accent);
}

.theme-toggle:hover {
  background: transparent;
  opacity: 0.7;
  transform: scale(1.1);
}



#theme-toggle {
  border: none;
  outline: none;
  background: transparent;
  border-radius: 0;
}

/* ===== Header Navigation ===== */
.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text-primary);
}

.mobile-menu-btn:hover {
  background: var(--accent-light);
}

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 100px 24px 40px;
  min-height: 80vh;
  background: linear-gradient(180deg, var(--accent-lighter) 0%, var(--bg-primary) 100%);
}


.hero-avatar {
  margin-bottom: 16px;
}

.avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  object-fit: cover;
  transition: transform var(--transition), box-shadow var(--transition);
}

.avatar-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.hero-content { max-width: 640px; }

.hero-title {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: 8px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-slogan {
  font-size: 16px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* ===== Sections ===== */
.section {
  padding: 56px 24px;
}

.section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ===== About / Timeline ===== */
.about-content {
  max-width: 600px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border-color);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 14px;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-tag {
  font-size: 18px;
  flex-shrink: 0;
}

.timeline-content p {
  font-size: 15px;
  color: var(--text-secondary);
}

.values {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.value-tag {
  padding: 8px 18px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

/* ===== Cards Grid ===== */
.cards-grid {
  display: grid;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cards-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.cards-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tool Cards */
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.card-link {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-light);
  border-radius: 6px;
  transition: all var(--transition);
}

.tool-card:hover .card-link {
  background: var(--accent);
  color: #fff;
}

/* Product Cards */
.product-card {
  position: relative;
}

.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
}

.product-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.product-card.featured .product-badge {
  background: var(--accent);
  color: #fff;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-item {
  text-align: center;
  padding: 32px 20px;
}

.contact-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.contact-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-detail {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin: 0 auto;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
}

.qr-placeholder.large {
  width: 200px;
  height: 200px;
}

.qr-placeholder span {
  font-size: 24px;
  margin-bottom: 4px;
}

.qr-placeholder p {
  font-size: 11px;
  padding: 0 8px;
}

/* FAQ */
.faq-list {
  text-align: left;
  margin-top: 8px;
}

.faq-list details {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.faq-list details:last-child {
  border-bottom: none;
}

.faq-list summary {
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::before {
  content: '▸ ';
  color: var(--accent);
  font-size: 12px;
}

.faq-list details[open] summary::before {
  content: '▾ ';
}

.faq-list details p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  padding-left: 16px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg-secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.modal h3 {
  font-size: 18px;
  margin-bottom: 20px;
}

.modal .qr-placeholder {
  margin-bottom: 16px;
}

.modal-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Responsive ===== */

/* QR Code Images */
.qr-image {
  width: 140px !important;
  height: 140px !important;
  max-width: 100% !important;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

.wechat-id {
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.qr-image-modal {
  width: 180px !important;
  height: 180px !important;
  max-width: 90% !important;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto 12px;
  display: block;
}

@media (max-width: 768px) {
  .header {
    padding: 10px 12px;
    flex-wrap: nowrap;
  }

  .header-logo {
    font-size: 16px;
    flex-shrink: 0;
  }

  .header-nav {
    margin-left: auto;
    gap: 0;
  }

  .nav-link {
    padding: 6px 6px;
    font-size: 12px;
  }

  .mobile-menu-btn { display: none; }


  .hero-title {
    font-size: 48px;
    letter-spacing: 4px;
  }

  .hero-subtitle { font-size: 18px; }

  .section { padding: 40px 16px; }

  .section-title { font-size: 22px; margin-bottom: 24px; }

  .cards-grid.two-col,
  .cards-grid.three-col,
  .cards-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-item {
    padding: 24px 16px;
    border-bottom: 1px solid var(--border-color);
  }

  .contact-item:last-child {
    border-bottom: none;
  }

  .card {
    padding: 22px 18px;
  }

  .qr-image {
    width: 120px !important;
    height: 120px !important;
    max-width: 100% !important;
  }

  .modal {
    padding: 28px 20px;
  }

  .qr-image-modal {
    width: 160px !important;
    height: 160px !important;
    max-width: 90% !important;
  }
}

@media (max-width: 480px) {
  .avatar-img { width: 64px; height: 64px; border-width: 2px; }
  .hero-title { font-size: 36px; letter-spacing: 2px; }
  .hero-subtitle { font-size: 16px; }
  .hero-desc { font-size: 14px; }
  .hero { padding: 80px 16px 28px; min-height: auto; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
  .header { padding: 10px 12px; }
  .header-logo span { display: none; }
  .logo { font-size: 18px; }
  .values { gap: 8px; }
  .value-tag { padding: 6px 12px; font-size: 13px; }
  .timeline { padding-left: 24px; }
  .timeline-content p { font-size: 14px; }
  .section-title { font-size: 20px; }
  .card-title { font-size: 16px; }
  .card-desc { font-size: 13px; }
  .product-price { font-size: 18px; }
  .faq-list summary { font-size: 13px; }
  .faq-list details p { font-size: 12px; }
}

