  @keyframes pulse {
    0%, 100% {
      box-shadow: 0 0 8px 2px rgba(0,123,255,0.7);
    }
    50% {
      box-shadow: 0 0 15px 4px rgba(0,123,255,1);
    }
  }
  
    .language-switcher {
      display: flex;
      gap: 12px;
      margin: 20px 0;
    }

    .language-switcher button {
      padding: 10px 20px;
      border: none;
      border-radius: 25px;
      font-weight: 600;
      font-size: 16px;
      cursor: pointer;
      background: linear-gradient(45deg, #6a11cb, #2575fc);
      color: white;
      box-shadow: 0 4px 15px rgba(37, 117, 252, 0.5);
      transition: background 0.3s ease, transform 0.2s ease;
      user-select: none;
    }

    .language-switcher button:hover {
      background: linear-gradient(45deg, #2575fc, #6a11cb);
      transform: scale(1.05);
    }

    .language-switcher button.active {
      background: linear-gradient(45deg, #ff7e5f, #feb47b);
      box-shadow: 0 6px 20px rgba(254, 180, 123, 0.7);
    }
    #popup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        width: 320px;
        padding: 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.3);
        text-align: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9999;
    }

    /* 显示时加 .show */
    #popup.show {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    #popup .close {
        position: absolute;
        right: 15px;
        top: 15px;
        cursor: pointer;
        font-size: 22px;
        color: #999;
        transition: transform 0.2s, color 0.2s;
    }

    #popup .close:hover {
        transform: scale(1.3);
        color: #ff4d4f;
    }
    #popup h3 {
      margin-bottom: 10px;
    }

    #popup p {
      margin-bottom: 15px;
    }

    #popup label {
      display: flex;
      align-items: center;  /* 垂直居中 */
      gap: 6px;             /* 复选框和文字间距 */
      justify-content: flex-end;  /* 内容靠右 */
      width: 100%;          /* 占满弹窗宽度 */
      cursor: pointer;      /* 鼠标变手，体验更好 */
      user-select: none;    /* 禁止选中文字（可选） */
    }

    .marquee-container {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      background-color: #ff9800;
      color: white;
      font-size: 20px;
      padding: 10px 20px;
      white-space: nowrap;
      overflow: hidden;
      display: flex;
      justify-content: flex-start;
    }
    .marquee-content {
      display: inline-block;
      padding-left: 100%; 
      animation: marquee 15s linear infinite;
    }

    @keyframes marquee {
      0% {
        transform: translateX(0); 
      }
      100% {
        transform: translateX(-100%); 
      }
    }
    @media (max-width: 768px) {
      .marquee-container {
        font-size: 1rem;
      }
    }
/* 通用重置 */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* 页面背景 & 布局 */
body {
  font-family: 'Baloo 2', cursive;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 原本是 padding:16px; 现在把上边距调大，留出公告高度 */
  padding: 60px 16px 16px;
}
.btn, .btn-primary {
  font-family: 'Bangers', cursive;
}
.copy-text, .custom-alert-message {
  font-family: 'Gloria Hallelujah', cursive;
}
h2, .btn-primary {
  font-family: 'Luckiest Guy', cursive;
}
input {
  font-family: 'Baloo 2', cursive;  /* 设置字体为 Baloo 2 */
  font-size: 12px;  /* 设置字体大小 */
  color: #666;  /* 设置字体颜色 */
}


/* 公告栏 */
.notice {
  position: fixed; /* 固定在页面顶部 */
  top: 0;
  left: 0;
  right: 0;
  background-color: #ff9800; /* 公告背景颜色 */
  color: white; /* 公告文字颜色 */
  padding: 10px 20px;
  text-align: center;
  z-index: 1000; /* 保证公告在最上层 */
  font-size: 16px;
}

/* 卡片容器 */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  width: 360px;
  max-width: 100%;
  padding: 24px;
  margin: 24px 0;
}

/* 标题 */
.card h2 {
  font-size: 18px;
  text-align: center;
  margin-bottom: 16px;
}

/* 每行字段 */
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-top: 16px;
}
.field-row:first-child {
  margin-top: 0;
}

/* 左侧输入区 */
.field-left {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-left label {
  font-size: 15px;
  color: #666;
}
.field-left input[type="number"],
.field-left input[type="text"] {
  border: none;
  outline: none;
  font-size: 20px;
  background: transparent;
  color: #333;
  width: 100%;
}

/* 滑动条 */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  margin-top: 8px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}
input[type=range]::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

/* 币种选择模拟 */
.token-select {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f5f5;
  border-radius: 16px;
  padding: 4px 8px;
  user-select: none;
}
.token-select img {
  width: 20px;
  height: 20px;
}
.token-select .caret {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #333;
}
.cny-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E53E3E;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

/* 箭头 */
.swap-arrow {
  text-align: center;
  margin: 16px 0;
  font-size: 18px;
  color: #333;
}

/* 汇率提示 */
.rate-info {
  font-size: 12px;
  color: #777;
  margin-top: 8px;
  text-align: left;
}

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 0;
  background: #000;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
}

/* 响应式 */
@media (max-width: 420px) {
  .card {
    padding: 16px;
    margin: 16px 0;
  }
}

/* 淡入淡出区域 */
.fade-area {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fade-area.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  display: none;     /* 彻底不占空间 */
}

/* 弹跳动画 */
@keyframes bounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.05); }
  50%  { transform: scale(0.97); }
  70%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.bounce {
  animation: bounce 0.5s;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.btn {
  background: linear-gradient(135deg, #4a90e2, #357ABD); 
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #357ABD, #4a90e2);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.btn-primary {
  background: #FBBF24;
  color: #1F2937;
}

.btn-primary:hover {
  background: #D97706;
}




/* 选项组容器 */
.payment-select {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
/* 隐藏原生 radio */
.payment-select input[type="radio"] {
  display: none;
}
/* 美化 label 为可点击的卡片 */
.payment-select label {
  flex: 1;
  padding: 12px;
  text-align: center;
  border: 1px solid #DDD;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
}
/* 未选中时 hover 效果 */
.payment-select label:hover {
  border-color: #3182CE;
}
/* 选中时高亮 */
.payment-select input[type="radio"]:checked + label {
  background: #EBF8FF;
  border-color: #3182CE;
  color: #3182CE;
}

/* 自定义 Alert */
.custom-alert.hidden {
  display: none;
}
.custom-alert {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
}
.custom-alert-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
}
.custom-alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7); 
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 280px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  text-align: center;
  z-index: 2001;
  opacity: 0;
}

.custom-alert-message {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
  word-break: break-word;
}
.custom-alert-box .btn {
  width: 100px;
  margin: 0 auto;
}

/* 遮罩淡入 */
@keyframes alertOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 弹窗弹跳入场 */
@keyframes alertPopIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.7);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  60% {
    transform: translate(-50%, -50%) scale(0.9);
  }
  80% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}


/* 当 custom-alert 变为可见时触发 */
.custom-alert:not(.hidden) .custom-alert-overlay {
  animation: alertOverlayFadeIn 0.3s ease-out forwards;
}
.custom-alert:not(.hidden) .custom-alert-box {
  animation: alertPopIn 0.4s cubic-bezier(0.2,1,0.3,1) forwards;
}

.address-container {
  width: 100%;           /* 跟父容器同宽 */
  overflow: hidden;      /* 隐藏溢出部分 */
  white-space: nowrap;   /* 强制一行 */
}

/* 可点击的文字 */
.copy-text {
  color: #007BFF;
  display: inline-block; /* inline-block 才能调整 font-size */
  font-size: 14px;       /* 初始字号，可按需微调 */
  cursor: pointer;
  transform-origin: left center;
  transition: font-size 0.2s;
}

.copy-text:hover {
  color: #0056b3;
}

/* 提示文本 */
#copyMessage {
  font-size: 14px;
  color: green;
  margin-left: 10px;
}

#copyMessage.hidden {
  display: none;
}

#copyMessage2 {
  font-size: 14px;
  color: green;
  margin-left: 10px;
}

#copyMessage2.hidden {
  display: none;
}
