/* ============================================================
   Wallet UI 全体
============================================================ */

body {
  margin: 0;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  background: #0f172a;
  color: white;
}

/* -----------------------------
   各カード（共通）
----------------------------- */
.card {
  background: #1e293b;
  padding: 20px 50px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}

/* -----------------------------
   入力欄
----------------------------- */
.input-box {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
  color: white;
  margin-bottom: 12px;
}

/* -----------------------------
   ボタン
----------------------------- */
.button-primary {
  background: #4f46e5;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  color: white;
  cursor: pointer;
  font-size: 14px;
}
.button-primary:hover {
  background: #6366f1;
}

/* ============================================================
   ポップアップ通知（右上固定）
============================================================ */
.popup-card {
  position: fixed;
  right: 16px;
  top: 80px;
  background: rgba(30, 41, 59, 0.95);
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  color: white;
  font-size: 14px;
  line-height: 1.5;
  z-index: 9000;
  min-width: 260px;
  max-width: 320px;
}

.popup-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 6px;
}

/* ============================================================
   取引履歴カード（全改訂版）
============================================================ */

/* 1件の TX カード */
.tx-item {
  background: #1f2937;
  padding: 16px 18px;
  border-radius: 12px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: 0.2s;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tx-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* アイコン */
.tx-item img {
  width: 46px;
  height: 46px;
  border-radius: 6px;
}

/* 内容 */
.tx-body {
  flex: 1;
}

/* タイトル（メッセージ） */
.tx-title {
  font-size: 17px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 4px;
}

/* 状態（CONFIRMED / UNCONFIRMED） */
.tx-status {
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

/* 日時 */
.tx-time {
  font-size: 12px;
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   UNCONFIRMED（未承認）／ カード強制ハイライト
============================================================ */
.tx-item.unconfirmed {
  background: #fff1a8 !important;
  border: 1px solid #facc15 !important;
  animation: pendingBlink 1.8s infinite ease-in-out;
}

/* テキスト色も変更 */
.tx-item.unconfirmed .tx-title {
  color: #6b5e00 !important;
}
.tx-item.unconfirmed .tx-status {
  color: #7a6300 !important;
}
.tx-item.unconfirmed .tx-time {
  color: #7a6300 !important;
}

/* 点滅アニメーション */
@keyframes pendingBlink {
  0%   { box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
  50%  { box-shadow: 0 0 14px rgba(250, 204, 21, 0.85); }
  100% { box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
}

/* ============================================================
   ステータスの色付け（成功 / エラー / 情報）
============================================================ */
.status-success {
  color: #4ade80;
}
.status-error {
  color: #f87171;
}
.status-info {
  color: #93c5fd;
}


#account-address {
  word-break: break-all;
  white-space: normal;
}


/* アドレス行（コピー横並び） */
.address-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.address-text {
  flex: 1;
  word-break: break-all;
  white-space: normal;
}

/* コピーボタン */
.copy-btn {
  background: #4f46e5;
  border: none;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.copy-btn:hover {
  background: #6366f1;
}

/* トランザクション amount 色分け */
.tx-amount-send {
  color: #f87171; /* 赤 */
  font-weight: bold;
}
.tx-amount-receive {
  color: #4ade80; /* 緑 */
  font-weight: bold;
}

/* -----------------------------------------------------
   address-row の横並び調整
----------------------------------------------------- */
.address-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* アドレスの折り返し */
.address-text {
  max-width: 85%;
  overflow-wrap: break-word;
  word-break: break-all;
  line-height: 1.5;
}

/* コピーアイコン */
.copy-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.copy-btn:hover {
  background: #6366f1;
}

/* ==========================
   モバイル完全最適化（決定版）
========================== */
@media (max-width: 768px) {

  /* ===== 全体の左右余白 ===== */
  body {
    padding: 0;
    margin: 0;
  }

  .container {
    padding: 10px 20px 40px 20px;
    gap: 32px;
  }

  /* ===== Header ===== */
  header {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }

  header h2 {
    font-size: 24px;
    margin: 0;
    line-height: 1.3;
  }

  .header-info {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.6;
  }

  .header-info p {
    margin: 0;
  }

  /* ===== Card ===== */
  .card {
    padding: 22px 20px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  }

  .card h2 {
    font-size: 20px;
    margin-bottom: 18px;
    line-height: 1.4;
  }

  /* ===== アドレス表示行 ===== */
  .address-row {
    display: flex;
    gap: 12px;
    align-items: center;
  }

  .address-text {
    font-size: 15px;
    word-break: break-all;
    line-height: 1.45;
  }

  .copy-btn {
    padding: 10px;
    font-size: 16px;
    border-radius: 10px;
  }

  /* ===== 入力欄 ===== */
  input.input-box,
  textarea.input-box {
    width: 100%;
    padding: 14px 14px;
    font-size: 15px;
    border-radius: 12px;
    margin-bottom: 14px;
    box-sizing: border-box;
  }

  textarea.input-box {
    min-height: 120px;
  }

  /* ===== 送金ボタン ===== */
  .button-primary {
    width: 100%;
    text-align: center;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 600;
    margin-top: 6px;
    border-radius: 12px;
  }

  /* ===== TXカード ===== */
  .tx-item {
    padding: 18px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
  }

  .tx-title {
    font-size: 16px;
  }
}
