
/* 浮动横幅样式 */
.float-banner {
  position: fixed;
  z-index: 9999;
  transition: all 0.3s ease;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
}

.float-banner img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: block;
}

/* 关闭按钮样式 */
.float-banner-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.float-banner-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.float-banner-close:active {
  transform: scale(0.95);
}

/* 桌面端位置 - 大屏幕 */
@media (min-width: 769px) {
  .float-banner {
    left: 50%; bottom: 15px; transform: translateX(-50%);
  }
  
  .float-banner img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
  }
  
  .float-banner-close {
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 20px;
    top: -10px;
    right: -10px;
  }
}

/* 手机端位置 - 小屏幕 */
@media (max-width: 768px) {
  .float-banner {
    left: 50%; bottom: 10px; transform: translateX(-50%);
  }
  
  .float-banner img {
    max-width: 80vw;
    max-height: 80vh;
    width: auto;
    height: auto;
  }
  
  .float-banner {
    min-width: 44px;
    min-height: 44px;
  }
  
  .float-banner:active {
    transform: scale(0.95);
  }
  
  .float-banner-close {
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 14px;
    top: -6px;
    right: -6px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .float-banner {
    transition: transform 0.2s ease;
  }
  
  .float-banner:active {
    transform: scale(0.95);
  }
  
  .float-banner-close:active {
    transform: scale(0.9);
  }
}
