/* 修改返回顶部按钮样式 */
/* .floating-nav-container .nav-item.primary {
    background: linear-gradient(135deg, #007BFF, #0056b3);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    transition: all 0.3s ease;
}

.floating-nav-container .nav-item.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, #0056b3, #003d8a);
} */

/* 悬浮导航容器 */
.floating-nav-container {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  will-change: transform;
}

/* 悬浮导航主容器 */
#floatingNav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 滚动时增加间距 */
#floatingNav.scrolled {
  gap: 14px;
}

/* 导航项基础样式 */
.nav-item {
  position: relative;
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #2c3e50, #1a2530);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  will-change: transform;
}

.nav-item:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.3),
    0 3px 6px rgba(0, 0, 0, 0.15);
  background: linear-gradient(145deg, #34495e, #253649);
  z-index: 100;
}

/* 返回顶部特殊样式 */
.nav-item.primary {
  background: linear-gradient(145deg, #3498db, #1a5f8f);
  overflow: hidden;
}

.nav-item.primary:hover {
  background: linear-gradient(145deg, #2980b9, #155077);
  transform: translateY(-4px) scale(1.07);
}

/* 滚动时返回顶部按钮效果 */
#floatingNav.scrolled .nav-item.primary {
  transform: scale(1.1);
  box-shadow: 
    0 10px 25px rgba(52, 152, 219, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(52, 152, 219, 0.2);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 
      0 10px 25px rgba(52, 152, 219, 0.4),
      0 4px 10px rgba(0, 0, 0, 0.2),
      0 0 0 2px rgba(52, 152, 219, 0.2);
  }
  50% {
    box-shadow: 
      0 12px 30px rgba(52, 152, 219, 0.6),
      0 5px 12px rgba(0, 0, 0, 0.25),
      0 0 0 4px rgba(52, 152, 219, 0.3);
  }
}

/* 箭头动画 */
#floatingNav.scrolled .arrow-up {
  animation: arrow-bounce 1.5s infinite;
}

@keyframes arrow-bounce {
  0%, 100% {
    transform: translateY(0);
    color: #e3f2fd;
  }
  50% {
    transform: translateY(-6px);
    color: #ffffff;
  }
}

/* 图标容器 */
.icon-container, .arrow-container {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #e3f2fd;
  transition: all 0.3s ease;
}

.nav-item:hover .icon-container,
.nav-item:hover .arrow-container {
  color: #ffffff;
  transform: scale(1.1);
}

/* 标签样式 */
.nav-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) scale(0);
  transform-origin: right center;
  background: rgba(44, 62, 80, 0.95);
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-label:after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent rgba(44, 62, 80, 0.95) transparent transparent;
}

.nav-item:hover .nav-label {
  transform: translateY(-50%) scale(1);
  opacity: 1;
  right: calc(100% + 15px);
}

/* 弹出层容器 */
.popup-container {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateZ(0) scale(0);
  width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  will-change: opacity, transform;
}

.popup-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

.popup-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: transparent;
  border-radius: 16px;
}

/* .popup-decoration 已删除 - 不再显示顶部渐变横线 */

.nav-item:hover .popup-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1) translateZ(0);
  right: calc(100% + 15px);
}

/* 弹出层内容样式 */
.popup-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(237, 242, 247, 0.8);
}

.popup-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #3498db, #2c80b9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: white;
  font-size: 16px;
  box-shadow: 0 3px 8px rgba(52, 152, 219, 0.3);
}

.popup-icon.wechat {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 3px 8px rgba(46, 204, 113, 0.3);
}

.popup-icon.support {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  box-shadow: 0 3px 8px rgba(155, 89, 182, 0.3);
}

.popup-title {
  font-weight: 700;
  font-size: 16px;
  color: #1a365d;
  margin: 0;
}

.popup-subtitle {
  font-size: 12px;
  color: #718096;
  margin-top: 1px;
}

.contact-info {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.6;
}

.phone-number {
  display: block;
  font-weight: 800;
  color: #2563eb;
  font-size: 18px;
  margin: 8px 0 12px;
  position: relative;
  padding-left: 24px;
}

.phone-number:before {
  content: '\f095';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: #3498db;
  font-size: 16px;
}

.working-hours {
  color: #64748b;
  font-size: 12px;
  display: block;
  padding-left: 24px;
}

.email-contact {
  display: block;
  color: #4338ca;
  font-weight: 600;
  margin-top: 6px;
  padding-left: 24px;
  position: relative;
}

.email-contact:before {
  content: '\f0e0';
  font-family: 'Font Awesome 6 Free';
  font-weight: 400;
  position: absolute;
  left: 0;
  top: 2px;
  color: #8b5cf6;
  font-size: 14px;
}

.qr-container {
  text-align: center;
  margin: 12px 0 8px;
}

.qr-box {
  width: 160px;
  height: 160px;
  background: white;
  border-radius: 12px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.qr-image {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

.qr-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.8), transparent);
  animation: scan 2s infinite;
}

@keyframes scan {
  0% { top: 0; opacity: 0.7; }
  50% { opacity: 1; }
  100% { top: 158px; opacity: 0.7; }
}

.qr-description {
  font-size: 14px;
  color: #334155;
  font-weight: 600;
  margin: 8px 0 4px;
}

.qr-subtext {
  font-size: 12px;
  color: #64748b;
}

.popup-footer {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(203, 213, 224, 0.6);
  font-size: 11px;
  color: #718096;
}

/* 高亮效果 */
.highlight {
  position: relative;
}

.highlight:after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, #3498db, #2ecc71, #9b59b6, #3498db);
  z-index: -1;
  border-radius: 17px;
  animation: rotate 3s linear infinite;
  opacity: 0.4;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .floating-nav-container {
    right: 15px;
  }
  
  .nav-item {
    width: 45px;
    height: 45px;
    border-radius: 12px;
  }
  
  .popup-container {
    width: 250px;
  }
  
  .qr-box {
    width: 140px;
    height: 140px;
  }
  
  .qr-image {
    width: 120px;
    height: 120px;
  }
}