/* ========== 錢包側邊面板樣式 ========== */

/* 遮罩層 */
.wallet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wallet-overlay.active {
  display: block;
  opacity: 1;
}

/* 側邊面板 */
.wallet-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background-color: #2a2a2a;
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 25px;
  overflow-y: auto;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.wallet-panel.active {
  transform: translateX(0);
}

/* 關閉按鈕 */
.close-wallet {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-wallet:hover {
  background-color: rgba(255, 30, 144, 0.2);
  color: #ff1e90;
  transform: rotate(90deg);
}

/* 錢包信息區域 */
.wallet-info {
  margin-top: 40px;
  margin-bottom: 30px;
}

.wallet-info h3 {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
  padding-bottom: 15px;
  border-bottom: 2px solid #ff1e90;
}

/* 信息項目 */
.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #444;
  margin-bottom: 10px;
}

.info-label {
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
  min-width: 80px;
}

.info-value {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
  flex: 1;
  text-align: right;
  padding-left: 10px;
}

/* 用戶資產區域 */
.user-assets {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #333;
  border-radius: 8px;
  border-left: 4px solid #ff1e90;
}

.user-assets h4 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #fff;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
  font-weight: bold;
}

/* 資產列表 */
.assets-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

/* 資產項目 */
.asset-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #2a2a2a;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.asset-item:hover {
  background-color: #3a3a3a;
  border-color: #ff1e90;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 30, 144, 0.2);
}

.asset-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #666;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.asset-item:hover .asset-logo {
  border-color: #ff1e90;
}

/* 資產信息 */
.asset-info {
  flex: 1;
  min-width: 0;
}

.asset-name {
  font-size: 13px;
  color: #fff;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.asset-amount {
  font-size: 12px;
  color: #007bff;
  font-weight: bold;
}

/* 暫無資產提示 */
.assets-list > div[style*="grid-column"] {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  color: #999;
  font-size: 14px;
  text-align: center;
  background-color: #2a2a2a;
  border-radius: 6px;
  min-height: 100px;
}

/* 資產按鈕組 */
.asset-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.asset-btn {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 12px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.asset-btn:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.asset-btn:active {
  transform: translateY(0);
}

/* 充值按鈕 */
.recharge-btn {
  width: 100%;
  padding: 12px;
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.recharge-btn:hover:not(:disabled) {
  background-color: #218838;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  transform: translateY(-2px);
}

.recharge-btn:active:not(:disabled) {
  transform: translateY(0);
}

.recharge-btn:disabled {
  background-color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 二維碼區域 */
.qrcode-section {
  display: none;
  margin-top: 20px;
  text-align: center;
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 400px;
  }
}

.qrcode-section.active {
  display: block;
}

/* 二維碼容器 */
.qrcode-img {
  width: 220px;
  height: 220px;
  margin: 0 auto 15px;
  background-color: #fff;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.qrcode-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 充值地址 */
.recharge-address {
  font-size: 12px;
  color: #ccc;
  word-break: break-all;
  padding: 10px;
  background-color: #333;
  border-radius: 4px;
  line-height: 1.6;
  border-left: 3px solid #007bff;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .wallet-panel {
    width: 100%;
    max-width: 380px;
  }

  .assets-list {
    grid-template-columns: 1fr;
  }

  .asset-buttons {
    flex-direction: column;
  }

  .asset-btn {
    flex: 1;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .wallet-panel {
    width: 100%;
    padding: 15px;
    max-width: none;
  }

  .wallet-info {
    margin-top: 30px;
  }

  .wallet-info h3 {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .info-item {
    flex-direction: column;
    gap: 5px;
  }

  .info-value {
    text-align: left;
    padding-left: 0;
  }

  .qrcode-img {
    width: 200px;
    height: 200px;
  }

  .recharge-btn,
  .asset-btn {
    font-size: 14px;
    padding: 10px;
  }
}