/* ==========================================================================
   GTA VPN 悬浮优惠挂件样式 (独立模块，可随时安全删除)
   ========================================================================== */

.uh-promo-widget-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box;
}

.uh-promo-widget-root *,
.uh-promo-widget-root *::before,
.uh-promo-widget-root *::after {
  box-sizing: border-box;
}

/* 卡片主体：初始 scale=0，从小变大弹出 */
.uh-pure-promo-card {
  position: relative;
  width: 275px;
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 18px 0;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09), 0 3px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  text-align: left;
  transform-origin: bottom right;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

/* 弹簧入场动效 */
.uh-pure-promo-card.uh-animate-pop {
  pointer-events: auto;
  animation: uhScaleUpBounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 持续微浮动 */
.uh-pure-promo-card.uh-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: uhCardFloat 4.2s ease-in-out infinite;
}

.uh-pure-promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 42px rgba(37, 99, 235, 0.16);
}

/* 扫光微动效 */
.uh-pure-promo-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: uhCardShine 5.5s ease-in-out infinite 2s;
}

/* 关闭按钮 */
.uh-pure-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.uh-pure-close-btn:hover {
  background: #f1f5f9;
  color: #334155;
  transform: scale(1.1);
}

/* 插图区 */
.uh-pure-illustration {
  width: 130px;
  height: 84px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uh-pure-illustration svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.uh-tag-cyan-swing {
  transform-origin: 36px 20px;
  animation: uhTagSwingLeft 3.6s ease-in-out infinite;
}

.uh-tag-red-swing {
  transform-origin: 64px 34px;
  animation: uhTagSwingRight 3.6s ease-in-out infinite 0.4s;
}

/* 标题 */
.uh-pure-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.uh-emoji-gift {
  display: inline-block;
  transform-origin: center bottom;
  animation: uhGiftHop 2.5s ease-in-out infinite;
}

/* 详细副文本 */
.uh-pure-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 14px;
}

/* 底部操作区细横线 */
.uh-pure-footer {
  border-top: 1px solid #e2e8f0;
  margin: 0 -18px;
  padding: 12px 18px;
  text-align: center;
  background: #ffffff;
}

.uh-pure-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 2px 4px;
}

.uh-pure-action-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
  transform: scale(1.03);
}

.uh-emoji-tada {
  display: inline-block;
  animation: uhTadaWiggle 2.8s ease-in-out infinite 0.5s;
}

/* 领码态 */
.uh-code-reveal-wrapper {
  background: #f0fdf4;
  border: 1.5px dashed #22c55e;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: uhRevealPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.uh-code-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: #166534;
  text-align: left;
}

.uh-code-text {
  font-size: 16px;
  font-weight: 800;
  color: #15803d;
  font-family: monospace, Consolas, sans-serif;
  text-align: left;
}

.uh-copy-action-btn {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uh-copy-action-btn:hover { background: #16a34a; }
.uh-copy-action-btn.copied { background: #047857; }

.uh-copy-tip {
  font-size: 11px;
  color: #16a34a;
  margin-top: 5px;
  font-weight: 500;
  text-align: center;
}

/* 动效关键帧 */
@keyframes uhScaleUpBounce {
  0% { opacity: 0; transform: scale(0); }
  60% { opacity: 1; transform: scale(1.05); }
  80% { transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes uhCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes uhTagSwingLeft {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg) scale(1.01); }
  75% { transform: rotate(2.5deg) scale(0.99); }
}

@keyframes uhTagSwingRight {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(3.5deg) scale(1.01); }
  70% { transform: rotate(-2.5deg) scale(0.99); }
}

@keyframes uhCardShine {
  0%, 65% { left: -80%; }
  100% { left: 140%; }
}

@keyframes uhGiftHop {
  0%, 70%, 100% { transform: translateY(0) scale(1); }
  78% { transform: translateY(-3px) scale(1.1) rotate(-4deg); }
  86% { transform: translateY(0) scale(0.97) rotate(3deg); }
  92% { transform: translateY(-1px) scale(1.03); }
}

@keyframes uhTadaWiggle {
  0%, 60%, 100% { transform: rotate(0) scale(1); }
  68% { transform: rotate(-10deg) scale(1.15); }
  76% { transform: rotate(8deg) scale(1.12); }
  84% { transform: rotate(-5deg) scale(1.06); }
}

@keyframes uhRevealPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 480px) {
  .uh-promo-widget-root { bottom: 16px; right: 16px; }
  .uh-pure-promo-card { width: calc(100vw - 32px); max-width: 290px; }
}
