/* static/css/a11.css */

/* ======= a11 遮罩 & 淡入動畫 ======= */
.a11-modal {
  display: none;               /* JS 控制显示 */
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  /* 左右保留距離（含 iOS 安全區域） */
  padding-left:  calc(env(safe-area-inset-left) + 12px);
  padding-right: calc(env(safe-area-inset-right) + 12px);
  animation: a11-fadeIn 0.4s ease-out both;
}
.a11-modal.open {
  display:flex !important; 
}
@keyframes a11-fadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.6); }
}

/* ======= a11 卡片內容 & 科幻裝飾 ======= */
.a11-modal .modal-content {
  position: relative;
  box-sizing: border-box;
  /* 寬度改為響應式，確保左右至少各 12px 留白 */
  width: min(280px, calc(100vw - 24px));
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  background: rgba(20, 20, 40, 0.95);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #00ffff, #ff00ff, #00ffff) 1;
  border-radius: 12px;
  box-shadow:
    0 0 12px rgba(0,255,255,0.5),
    0 0 24px rgba(255,0,255,0.3),
    inset 0 0 8px rgba(0,255,255,0.2);
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  animation: a11-pulse 3s ease-in-out infinite alternate;
}
@keyframes a11-pulse {
  from {
    box-shadow:
      0 0 12px rgba(0,255,255,0.4),
      0 0 24px rgba(255,0,255,0.2);
  }
  to {
    box-shadow:
      0 0 24px rgba(0,255,255,0.8),
      0 0 48px rgba(255,0,255,0.6),
      inset 0 0 12px rgba(0,255,255,0.3);
  }
}

/* ======= 科幻网格叠层 ======= */
.a11-modal .modal-content::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px) 0 0,
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px) 0 0;
  background-size: 20px 20px;
  mix-blend-mode: overlay;
}

/* ======= a11 標題 ======= */
.a11-modal .modal-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: #0ff !important;
  text-shadow:
    0 0 8px  #0ff,
    0 0 16px #ff00ff,
    0 0 24px #0ff;
  text-align: center;
  animation: a11-titleGlow 1.5s ease-in-out infinite alternate;
}
@keyframes a11-titleGlow {
  from {
    text-shadow:
      0 0 6px  #0ff,
      0 0 12px #ff00ff;
  }
  to {
    text-shadow:
      0 0 12px #0ff,
      0 0 24px #ff00ff;
  }
}

/* ======= a11 文本提示 ======= */
.a11-modal .modal-text {
  margin: 0 0 16px;
  font-size: 14px;
  color: #0ff !important;
  line-height: 1.5;
  text-shadow: 0 0 4px rgba(0,0,0,0.6);
}

/* ======= a11 輸入框 & 隱藏箭頭 ======= */
.a11-modal .modal-content input[type="number"] {
  display: block;
  margin: 0 auto 20px;
  width: 80px;
  padding: 6px;
  font-size: 1rem;
  text-align: center;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid #666;
  border-radius: 4px;
  -moz-appearance: textfield;
}
.a11-modal .modal-content input[type="number"]::-webkit-outer-spin-button,
.a11-modal .modal-content input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ======= a11 按鈕群 & 掃光效果 ======= */
.a11-modal .modal-buttons {
  display: flex;
  gap: 12px;
}
.a11-modal .modal-buttons button {
  position: relative;
  flex: 1;
  padding: 8px 0;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  overflow: hidden;
  transition: transform 0.2s;
}
.a11-modal .modal-buttons button::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.5s;
}
.a11-modal .modal-buttons button:hover {
  transform: translateY(-2px);
}
.a11-modal .modal-buttons button:hover::after {
  left: 200%;
}

/* ======= a11 確認/取消 按鈕（改用 class） ======= */
/* 確認充值按鈕：綠→藍漸變 + 掃光 & 發光 */
.a11-confirm-btn {
  flex: 1;
  padding: 8px 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(90deg, #34d399, #60a5fa);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  filter:
    drop-shadow(0 0 6px rgba(52,211,153,0.7))
    drop-shadow(0 0 12px rgba(96,165,250,0.7));
}
.a11-confirm-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.5s;
}
.a11-confirm-btn:hover {
  transform: translateY(-2px);
}
.a11-confirm-btn:hover::after {
  left: 200%;
}

/* 取消按鈕：灰階漸層 + 掃光 */
.a11-cancel-btn {
  flex: 1;
  padding: 8px 0;
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(90deg, #777, #aaa);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
}
.a11-cancel-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.5s;
}
.a11-cancel-btn:hover {
  transform: translateY(-2px);
}
.a11-cancel-btn:hover::after {
  left: 200%;
}

/* ======= a11 按鈕禁用狀態 ======= */
.a11-modal .modal-buttons button:disabled {
  background-color: #333;
  color: #666;
  cursor: not-allowed;
}

/* a11 取消按鈕：灰階漸變 + 灰色光芒 */
.a11-cancel-btn {
  background: linear-gradient(90deg, #777, #aaa);
  /* 原本這層，然後我們加灰色光芒 */
  filter:
    drop-shadow(0 0 4px rgba(0,0,0,0.5))         /* 原先的黑色陰影 */
    drop-shadow(0 0 6px rgba(200,200,200,0.6))    /* 淺灰光暈 */
    drop-shadow(0 0 12px rgba(150,150,150,0.4));  /* 深灰光暈 */
}
.a11-cancel-btn:hover {
  transform: translateY(-2px);
}
.a11-cancel-btn:hover::after {
  left: 200%;
}

/* ======= 充值結果文字 ======= */
#recharge-result-msg {
  color: #ffffff !important;          /* 白色文字，!important 保證壓過舊樣式 */
  font-size: 16px;                    /* 視需要調整大小 */
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);  /* 讓字在深背景上更清晰 */

  /* ✅ 讓 \n 變換行，且長字 (TxID) 可自動斷行 */
  white-space: pre-line !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ======= 結果視窗 Close 按鈕（放大、置中、掃光） ======= */
#recharge-result-close {
  display: block;
  width: 80%;
  max-width: 240px;
  margin: 14px auto 0;
  padding: 12px 0;
  font-size: 16px;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  background: linear-gradient(90deg, #34d399, #60a5fa);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 6px rgba(52,211,153,0.6),
    0 0 12px rgba(96,165,250,0.5);
  transition: transform 0.2s;
}
#recharge-result-close::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(120deg,
    transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  transform: skewX(-25deg);
  transition: left 0.5s;
}
#recharge-result-close:hover {
  transform: translateY(-2px);
}
#recharge-result-close:hover::after {
  left: 200%;
}
