/* Floating social QR sidebar */
.float-social {
  position: fixed;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-social-item {
  position: relative;
}

.float-social-btn {
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: linear-gradient(
    165deg,
    rgba(14, 22, 38, 0.96) 0%,
    rgba(8, 12, 22, 0.98) 100%
  );
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.float-social-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.float-social-btn--wechat {
  color: #07c160;
  border-color: rgba(7, 193, 96, 0.35);
}

.float-social-btn--douyin {
  /* color: #fe2c55;
  border-color: rgba(254, 44, 85, 0.35); */
}

.float-social-btn:hover,
.float-social-btn:focus-visible {
  color: #fff;
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(0, 212, 255, 0.12);
  outline: none;
}

.float-social-panel {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: 192px;
  padding: 16px 16px 14px;
  background: rgba(10, 14, 24, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.14);
  border-radius: 14px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 32px rgba(0, 212, 255, 0.06);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.float-social-panel::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: rgba(10, 14, 24, 0.97);
  border-top: 1px solid rgba(0, 212, 255, 0.14);
  border-right: 1px solid rgba(0, 212, 255, 0.14);
}

.float-social-item:hover .float-social-panel,
.float-social-item:focus-within .float-social-panel,
.float-social-item.is-open .float-social-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.float-social-panel img {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.float-social-label {
  display: block;
  font-size: 12px;
  color: #7a869a;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

.float-social-hint {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

@media (max-width: 900px) {
  .float-social {
    top: auto;
    bottom: 20px;
    right: 8px;
    transform: none;
    flex-direction: row;
    gap: 8px;
  }

  .float-social-panel {
    right: 0;
    left: auto;
    top: auto;
    bottom: calc(100% + 12px);
    transform: none;
  }

  .float-social-panel::after {
    top: auto;
    bottom: -6px;
    right: 14px;
    left: auto;
    transform: rotate(45deg);
    border-top: none;
    border-right: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.14);
    border-left: 1px solid rgba(0, 212, 255, 0.14);
  }

  .float-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .float-social-btn svg {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .float-social-panel {
    transition: none;
  }
}

@media (max-width: 480px) {
  .float-social-panel {
    width: 160px;
    padding: 12px;
  }

  .float-social-panel img {
    width: 136px;
    height: 136px;
  }

  .float-social-btn {
    width: 40px;
    height: 40px;
  }

  .float-social-btn svg {
    width: 20px;
    height: 20px;
  }
}
