/* ============================================
   公共样式文件 - 商城小程序&APP开发官网
   配色：科技蓝(主) + 活力浅橙(辅) + 白色(底)
   ============================================ */

/* === 全局变量定义 === */
:root {
  --primary: #1a6fff;          /* 科技蓝主色 */
  --primary-dark: #0a4fd4;     /* 深科技蓝 */
  --primary-light: #4a90ff;    /* 亮科技蓝 */
  --primary-bg: #e8f1ff;       /* 极浅蓝底 */
  --accent: #ff8c42;           /* 活力浅橙辅色 */
  --accent-light: #ffa869;     /* 亮橙 */
  --accent-bg: #fff4ed;        /* 极浅橙底 */
  --dark: #1a2138;             /* 深色文字 */
  --gray: #5a6378;             /* 正文灰 */
  --gray-light: #9aa3b8;       /* 浅灰文字 */
  --bg-light: #f7f9fc;         /* 浅灰底 */
  --border: #e8ecf2;           /* 边框色 */
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(26, 33, 56, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 33, 56, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 33, 56, 0.15);
  --gradient-primary: linear-gradient(135deg, #1a6fff 0%, #4a90ff 100%);
  --gradient-accent: linear-gradient(135deg, #ff8c42 0%, #ffa869 100%);
  --gradient-hero: linear-gradient(135deg, #0a1e4f 0%, #1a3f8f 50%, #1a6fff 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 基础重置 === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

/* === 容器 === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === 导航栏 === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-menu a {
  font-size: 15px;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  padding: 4px 0;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a.active::after,
.nav-menu a:hover::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.nav-cta {
  background: var(--gradient-primary);
  color: white !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 111, 255, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* === 按钮通用 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 16px rgba(26, 111, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 111, 255, 0.4);
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 140, 66, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* === 区块通用 === */
.section {
  padding: 80px 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

.section-tag.accent {
  background: var(--accent-bg);
  color: var(--accent);
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === 卡片通用 === */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid var(--border);
}

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

/* === 动画 === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes rotateBg {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 滚动渐入 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.15s; }
.fade-in-delay-2 { transition-delay: 0.3s; }
.fade-in-delay-3 { transition-delay: 0.45s; }

/* === 页面加载动画 === */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--primary-bg);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === 悬浮咨询栏 === */
.float-contact {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  position: relative;
}

.float-btn.wechat {
  background: #07c160;
}

.float-btn.phone {
  background: var(--primary);
}

.float-btn.top {
  background: white;
  border: 1px solid var(--border);
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-btn svg {
  width: 24px;
  height: 24px;
  color: white;
}

.float-btn.top svg {
  color: var(--gray);
}

.float-btn .tooltip {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.float-btn:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* 微信二维码弹窗 */
.wechat-popup {
  position: absolute;
  right: 60px;
  top: -60px;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  width: 180px;
}

.wechat-popup.show {
  opacity: 1;
  visibility: visible;
}

.wechat-popup .qr-placeholder {
  width: 148px;
  height: 148px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-light);
  font-size: 12px;
}

.wechat-popup p {
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  margin-top: 8px;
}

/* === 页脚 === */
.footer {
  background: #0f1a3a;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: white;
}

.footer-contact p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact .phone-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
}

/* === 响应式 === */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px 24px;
    gap: 20px;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .float-contact {
    right: 16px;
    bottom: 80px;
  }

  .container {
    padding: 0 20px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 17px;
  }

  .nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

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