/**
 * 腾龙商贸官网增强 CSS
 * 粒子背景 · 计数器 · 公告条 · AI客服 · 动画 · 天气 · 通知 · 夜间模式
 */

/* ============================ 1. 导航栏重设计 ============================ */
.header {
  position: sticky !important;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4) 1;
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.1);
}
.kuan_heaaer { max-width: 1300px !important; display: flex; align-items: center; padding: 0 20px; }
.kuan_heaaer .logo {
  width: 200px !important;
  flex-shrink: 0;
  margin-top: 0 !important;
  display: flex;
  align-items: center;
}
.kuan_heaaer .logo img {
  max-height: 48px !important;
  float: none !important;
}
.kuan_heaaer .nav_div {
  background: transparent !important;
  height: auto !important;
  width: auto !important;
  flex: 1;
}
.kuan_heaaer .nav_div .nav_ul {
  margin-left: 20px !important;
  display: flex;
  align-items: center;
  height: 64px;
}
.kuan_heaaer .nav_div .nav_ul li {
  width: auto !important;
  height: 100% !important;
  float: none !important;
  border: none !important;
  display: flex;
  align-items: center;
}
.kuan_heaaer .nav_div .nav_ul li a {
  color: #475569 !important;
  font-size: 15px !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 8px;
  position: relative;
  transition: all 0.3s;
  display: flex !important;
  align-items: center;
  height: auto !important;
  line-height: normal !important;
  width: auto !important;
}
.kuan_heaaer .nav_div .nav_ul li a span {
  margin-top: 0 !important;
  line-height: normal !important;
}
/* 导航下划线动画 */
.kuan_heaaer .nav_div .nav_ul li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.kuan_heaaer .nav_div .nav_ul li a:hover {
  color: #1e40af !important;
  background: rgba(59,130,246,0.06);
}
.kuan_heaaer .nav_div .nav_ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}
/* 激活状态 */
.kuan_heaaer .nav_div .nav_ul .active,
.kuan_heaaer .nav_div .nav_ul li:hover {
  background: transparent !important;
}
.kuan_heaaer .nav_div .nav_ul .active a {
  color: #2563eb !important;
  background: rgba(59,130,246,0.08);
}
.kuan_heaaer .nav_div .nav_ul .active a::after {
  transform: translateX(-50%) scaleX(1);
  background: #3b82f6;
}
/* 下拉菜单 */
.kuan_heaaer .nav_div .nav_ul .erji {
  top: 100% !important;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 8px 0 !important;
  min-width: 140px;
  width: auto !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}
.kuan_heaaer .nav_div .nav_ul .erji a {
  color: #475569 !important;
  font-size: 13px !important;
  padding: 8px 20px !important;
  height: auto !important;
  line-height: normal !important;
  margin: 0 !important;
  white-space: nowrap;
  transition: all 0.2s;
  border-radius: 0;
}
.kuan_heaaer .nav_div .nav_ul .erji a:hover {
  background: rgba(59,130,246,0.06);
  color: #2563eb !important;
  font-weight: 500 !important;
}
/* 手机菜单按钮 */
.phone-nav { color: #475569 !important; font-size: 24px !important; padding: 8px; display: none !important; }
@media (max-width: 980px) {
  .kuan_heaaer { padding: 0 12px; }
  .kuan_heaaer .logo { width: 160px !important; }
  .kuan_heaaer .logo img { max-height: 36px !important; }
  .kuan_heaaer .nav_div { display: none !important; }
  .kuan_heaaer .phone-nav { display: block !important; }
}

/* 头部电话 */
.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
  padding: 8px 16px;
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 20px;
  transition: all 0.3s;
  cursor: default;
}
.header-phone:hover { border-color: #3b82f6; color: #1d4ed8; background: rgba(59,130,246,0.06); }
@media (max-width: 980px) { .header-phone { display: none !important; } }

/* ============================ 2. 公告条 ============================ */
#noticeBar {
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  color: #fff;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  overflow: hidden;
  position: relative;
  z-index: 9;
}
#noticeBar .notice-inner {
  display: inline-block;
  animation: noticeScroll 20s linear infinite;
  white-space: nowrap;
}
#noticeBar .notice-icon { margin-right: 8px; }
@keyframes noticeScroll {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ============================ 2. 粒子 Canvas ============================ */
#particleCanvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* ============================ 3. 打字机 ============================ */
#heroTyper {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 14px 32px;
  border-radius: 40px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(255,255,255,0.3);
  pointer-events: none;
}
.typer-cursor {
  animation: blink 0.8s infinite;
  color: #60a5fa;
}
@keyframes blink {
  0%,50% { opacity: 1; }
  51%,100% { opacity: 0; }
}

/* ============================ 4. 数字计数器 ============================ */
#countUpSection {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  padding: 55px 0;
  color: #fff;
}
#countUpSection .container {
  max-width: 1200px;
  margin: 0 auto;
}
.count-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  text-align: center;
}
.count-item {
  padding: 20px;
}
.count-num {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(180deg, #60a5fa, #f0f9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.count-label {
  font-size: 16px;
  color: #94a3b8;
  margin-top: 6px;
  letter-spacing: 2px;
}

/* ============================ 5. 滚动入场动画 ============================ */
.reveal-element {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}
.case_home .case_com li:nth-child(1) { transition-delay: 0.1s; }
.case_home .case_com li:nth-child(2) { transition-delay: 0.25s; }
.case_home .case_com li:nth-child(3) { transition-delay: 0.4s; }
.case_home .case_com li:nth-child(4) { transition-delay: 0.55s; }

/* ============================ 6. 实时交易通知 ============================ */
#liveToast {
  position: fixed;
  bottom: 120px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateX(-120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 300px;
  font-size: 13px;
}
.toast-msg.show {
  transform: translateX(0);
  opacity: 1;
}
.toast-avatar { font-size: 28px; flex-shrink: 0; }
.toast-name { font-weight: 600; color: #1e40af; }
.toast-desc { color: #666; margin-top: 2px; }

/* ============================ 8. 夜间模式（融入右侧咨询栏） ============================ */
.suspension-box .a-darkmode .i {
  float: none;
  background: #6366f1 !important;
  background-image: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-style: normal;
  cursor: pointer;
  color: #fff;
}
.suspension-box .a-darkmode:hover .i { background: #4f46e5 !important; }
html.dark-mode .suspension-box .a-darkmode .i { background: #f59e0b !important; }
html.dark-mode .suspension-box .a-darkmode:hover .i { background: #d97706 !important; }

/* 夜间模式 — 全局翻转 + 图片/固定元素还原 */
html.dark-mode {
  filter: invert(1) hue-rotate(180deg);
}
html.dark-mode img,
html.dark-mode video,
html.dark-mode canvas,
html.dark-mode iframe,
html.dark-mode .banner,
html.dark-mode #particleCanvas {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* 夜间模式自动处理，无需手动配 UI 颜色 */

/* ============================ 9. AI 智能客服 ============================ */
#aiChatbot {
  position: fixed;
  bottom: 100px;
  right: 22px;
  z-index: 9998;
  width: 350px;
  max-height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#aiChatbot.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.aic-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.aic-close { cursor: pointer; font-size: 18px; opacity: 0.8; }
.aic-close:hover { opacity: 1; }
.aic-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aic-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 85%;
  word-break: break-word;
}
.aic-msg.bot {
  background: #f1f5f9;
  color: #334155;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.aic-msg.user {
  background: #2563eb;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.aic-input-area {
  display: flex;
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  gap: 8px;
}
.aic-input-area input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.aic-input-area input:focus { border-color: #2563eb; }
.aic-input-area button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.aic-input-area button:hover { background: #1d4ed8; }

/* 聊天气泡按钮 */
.aic-bubble {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 12px 22px;
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(37,99,235,0.45), 0 0 0 4px rgba(37,99,235,0.12);
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: floatPulse 3s ease-in-out infinite;
}
.aic-bubble:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(37,99,235,0.55), 0 0 0 6px rgba(37,99,235,0.18);
}
.aic-bubble svg {
  flex-shrink: 0;
  opacity: 0.95;
}
.aic-label {
  white-space: nowrap;
}
.aic-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239,68,68,0.5);
  border: 2px solid #fff;
}
@keyframes floatPulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 4px 24px rgba(37,99,235,0.45), 0 0 0 4px rgba(37,99,235,0.12); }
  50% { transform: translateY(-6px); box-shadow: 0 8px 32px rgba(37,99,235,0.6), 0 0 0 8px rgba(37,99,235,0.06); }
}

/* 响应式 */
@media (max-width: 768px) {
  #aiChatbot { width: 92vw; right: 4vw; bottom: 85px; max-height: 60vh; }
  .aic-bubble { bottom: 24px; right: 12px; padding: 10px 16px; font-size: 13px; border-radius: 24px; }
  .aic-bubble svg { width: 22px; height: 22px; }
  .aic-label { display: none; }
  #heroTyper { font-size: 14px; padding: 10px 20px; bottom: 12%; }
  .count-num { font-size: 32px; }
  #noticeBar { font-size: 11px; padding: 5px 0; }
  #liveToast { display: none !important; }
}

/* ============================ A. 全局页面润色 ============================ */
/* 区块间距 */
.wrap { padding: 50px 0 !important; }
.case_home { padding: 60px 0 !important; }
.nes { padding: 40px 0 !important; }

/* 段落标题重设计 */
.top {
  margin-bottom: 30px !important;
  position: relative;
  padding-bottom: 16px;
}
.top span {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  letter-spacing: 2px !important;
  display: block !important;
}
.top i {
  font-size: 14px !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 4px !important;
  font-style: normal !important;
  display: block !important;
  margin-top: 4px !important;
}
.top em {
  display: block !important;
  width: 50px !important;
  height: 3px !important;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6) !important;
  margin: 12px auto 0 !important;
  border-radius: 2px !important;
}

/* 产品展示区 - 浅色背景替代原来的蓝色 */
.case_home {
  background: #f8fafc !important;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.case_home .case_com .top span { color: #1e293b !important; }
.case_home .case_com .top i { color: #94a3b8 !important; }
.case_home .case_com .top em { background: linear-gradient(90deg, #3b82f6, #8b5cf6) !important; }
.case_home .case_com ul {
  background: transparent !important;
  padding: 0 !important;
  margin-top: 20px !important;
}
.case_home .case_com ul li {
  background: #fff !important;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  padding: 0 !important;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.case_home .case_com ul li:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  border-color: #e2e8f0;
}
.case_home .case_com ul li .pic_ca {
  margin-top: 0 !important;
  border-radius: 0;
}
.case_home .case_com ul li .pic_ca img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.case_home .case_com ul li:hover .pic_ca img {
  transform: scale(1.06);
}
.case_home .case_com ul li .text_ca {
  padding: 14px 12px;
  text-align: center;
}
.case_home .case_com ul li .text_ca p {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 4px 0;
}
.case_home .case_com ul li .text_ca a {
  font-size: 12px;
  color: #3b82f6;
  transition: color 0.2s;
}
.case_home .case_com ul li:hover .text_ca a { color: #1d4ed8; }

/* 软件下载区 */
.nes { background: #fff; }
.nes .news_list li {
  transition: all 0.3s;
  border-radius: 8px;
  padding: 10px;
}
.nes .news_list li:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

/* 关于我们区 */
.wrap.container .row {
  background: #fff;
  border-radius: 16px;
  padding: 30px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f1f5f9;
}
.wrap.container .row:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.wrap.container .row h6 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* 页脚润色 */
.footer {
  background: #0f172a !important;
  padding-top: 40px !important;
}
.footer_com .di_nav li .tit { color: #e2e8f0 !important; font-size: 15px !important; }
.footer_com .di_nav li a { color: #94a3b8 !important; }
.footer_com .di_nav li a:hover { color: #60a5fa !important; }
.copy { color: #64748b !important; font-size: 12px !important; border-top: 1px solid #1e293b !important; padding-top: 20px !important; margin-top: 20px !important; }

/* 去掉交易通知 toast（B2B官网不需要） */
#liveToast { display: none !important; }
