/* ===== 右侧工具栏样式 ===== */
.fixed-container {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.icon-bar {
  background-color: transparent;
  border-radius: 4px 0 0 4px;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: none;
}

.icon-item {
  position: relative;
  width: 60px;
  height: 60px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  border-radius: 0;
}

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

.icon-item:hover {
  background-color: #f5f5f5;
  transform: none;
  border: none;
}

.icon-item img {
  width: 45px;
  height: 45px;
  border: none;
}

.icon-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  border: none;
}

.tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  width: 280px;
  padding: 20px;
  background-color: white;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 280px;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  border-width: 8px 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent white;
  filter: drop-shadow(2px 0 2px rgba(0,0,0,0.1));
}

.icon-item:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip strong {
  color: #333;
  margin-bottom: 10px;
  display: block;
  font-size: 16px;
}

.qr-code-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.qr-item {
  text-align: center;
}

.qr-item img {
  width: 90px;
  height: 90px;
  display: block;
  margin: 0 auto;
  border: 1px solid #f0f0f0;
}

.qr-item figcaption {
  font-size: 12px;
  margin-top: 8px;
  color: #666;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-item {
  z-index: 2;
}

.icon-item:hover {
  z-index: 10;
}

.icon-item:nth-child(1) .tooltip {
  min-width: 300px;
}

.icon-item:nth-child(4) .tooltip {
  min-width: 250px;
  width: auto;
  padding: 25px;
}

.toTop.hidden {
  display: none;
}

.icon-item.toTop {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #c7c6cf;
  border: none;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 4px;
  left: 8px;
  margin-left: 0;
  transition: background-color 0.3s ease;
}

.icon-item.toTop img {
  width: 17px;
  height: 15px;
  display: block;
  margin: 0 auto;
}

.icon-item.toTop:hover {
  background-color: #ff4444;
}

/* 模态框样式 */
.custom-modal .modal-dialog {
  max-width: 95%;
  width: 95%;
  height: 90vh;
  margin: 5vh auto;
}

.custom-modal .modal-content {
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
}

.custom-modal .modal-header {
  background: #DC0014;
  color: white;
  border-bottom: none;
  padding: 15px 20px;
  height: 60px;
}

.custom-modal .modal-body {
  padding: 0;
  height: calc(100% - 60px);
}

.custom-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .fixed-container {
    transform: translateY(-50%) scale(0.9);
    right: -10px;
  }
  
  .icon-item {
    width: 50px;
    height: 50px;
    border: none;
  }
  
  .tooltip {
    right: 60px;
    min-width: 250px;
  }
  
  .icon-item:nth-child(4) .tooltip {
    min-width: 300px;
  }
  
  .qr-item img {
    width: 80px;
    height: 80px;
  }
  
  .icon-item.toTop {
    width: 50px;
    height: 50px;
    border: none;
  }
  
  .custom-modal .modal-dialog {
    max-width: 98%;
    width: 98%;
    height: 85vh;
    margin: 7.5vh auto;
  }
}

@media (max-width: 576px) {
  .custom-modal .modal-dialog {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  
  .custom-modal .modal-content {
    border-radius: 0;
  }
}

/* 加载状态指示器 */
.iframe-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background: #f8f9fa;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #DC0014;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 创建新的粘性上下文 */
header.main {
  position: relative;
}

header.main nav.main {
  position: fixed; /* 改为fixed定位 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #F7F7F7;
}
/* 为body内容增加上边距，避免被固定导航栏遮挡 */
body {
  padding-top: 132px; /* 等于导航栏的高度 */
} 