:root{
  --bg:#10131c;
  --surface:#151928;
  --sheet:#121526;
  --card:#181c2c;
  --card-border:#2a2e45;
  --text:#ffffff;
  --muted:#8b8fa3;
  --muted2:#b8bcd0;
  --input:#161a29;
  --accent:#6158ff;
  --accent-2:#5b53f2;
  --accent-text:#ffffff;
  --danger:#ff453a;
  --key-bg:#1c2033;
  --balance-card:#171a28;
  --pill:#1c2033;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI",Inter,Arial,sans-serif;-webkit-font-smoothing:antialiased;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-text-size-adjust:100%;text-size-adjust:100%;-moz-text-size-adjust:100%}
html{overscroll-behavior:none}
body{min-height:100vh;min-height:100dvh;display:flex;justify-content:center;background:var(--bg);overflow-x:hidden;-webkit-tap-highlight-color:transparent}
input,textarea,button{-webkit-user-select:text;user-select:text}

.main.app{
  margin-bottom:-10px;
}

@media(min-width:700px){
  .network-overlay,
  .network-sheet{
    display:none !important;
  }
}

.screen{
  display:none;
  flex-direction:column;
  min-height:calc(100vh - 28px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  min-height:calc(100dvh - 28px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  width:100%;
  transform:translateX(100%);
  transition:transform .35s ease;
  will-change:transform;
  position:absolute;
  inset:0;
  padding:0 20px;
  padding-top:env(safe-area-inset-top,10px);
  padding-bottom:calc(env(safe-area-inset-bottom,0px) + 28px);
}
.screen.active{
  display:flex;
  transform:translateX(0%);
}

.app{
  width:min(100%,480px);
  min-height:100vh;
  min-height:100dvh;
  background:var(--bg);
  position:relative;
  overflow:hidden;
}

.sheet-header{
  display:none !important;
}
.icon-btn-round{
  width:44px;height:44px;
  border-radius:50%;
  background:#1e2233;
  border:0;
  color:var(--text);
  display:grid;place-items:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.icon-btn-round svg{width:20px;height:20px}
.icon-btn-round.placeholder{background:transparent;pointer-events:none}
.sheet-title{
  margin:0;
  font-size:18px;
  font-weight:600;
  text-align:center;
  letter-spacing:-.3px;
}

/* =========================================== */
/* SCREEN 1 — Send to                          */
/* =========================================== */
.recipient-card{
  margin-top:20px;
}
.recipient-card-inner{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:22px;
  padding:18px 16px 14px;
  position:relative;
  min-height:150px;
  display:flex;
  flex-direction:column;

}

.address-scroll{
  flex:1;
  min-height:70px;
  overflow:hidden;
}
.address-text{
  width:100%;
  background:transparent;
  border:0;outline:0;resize:none;
  color:var(--text);
  font-size:18px;
  font-weight:500;
  letter-spacing:-.5px;
  font-family:inherit;
  padding:6px 0;
  line-height:1.35;
  word-break:break-all;
  overflow-wrap:break-word;
  white-space:pre-wrap;
}
.address-text::placeholder{
  color:#6a6e85;
  opacity:1;
}
.recipient-card-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
}

.network-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--pill);
  color:var(--text);
  border-radius:999px;
  padding:8px 12px 8px 7px;
  height:40px;
  cursor:pointer;
  border:0;
  font-size:14px;
  font-weight:600;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  flex-wrap: wrap;
    flex-direction: column;
    align-content: center;
    justify-content: center;
}
.network-pill .chevron{color:#9ea2b8;font-size:14px;display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;}
.network-pill .chevron img{width:100%;height:100%;display:block;object-fit:contain;}
.network-icon{
  width:22px;height:22px;
  border-radius:50%;
  background-size:cover;background-repeat:no-repeat;background-position:center;
  flex-shrink:0;
  display:block;
}
.network-icon-square{
  width:44px;height:44px;
  border-radius:16px;
}
.network-icon-bnb{background-image:url("./smartchain.png")}
.network-icon-eth{background-image:url("./ethereum.png")}
.network-icon-arbitrum{background-image:url("./arbitrum.png")}
.network-icon-avax{background-image:url("./avalanchec.png")}
.network-icon-op{background-image:url("./optimism.png")}
.network-icon-polygon{background-image:url("./polygon.png")}

.paste-btn-solid{
  background:var(--accent);
  color:#fff;
  border:0;
  border-radius:999px;
  height:40px;
  padding:0 26px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  letter-spacing:-.2px;
}
.paste-btn-solid:active{transform:scale(.98)}
.paste-btn-solid[data-action="clear"]{
  background:#1e2233;
  color:var(--text);
  cursor:default;
  box-shadow:none;
}

/* =========================================== */
/* SCREEN 2 — Amount                           */
/* =========================================== */
.to-banner{
  margin:20px 0 0px;
  padding:18px 4px;
  border-top:1px solid #24283a;
  border-bottom:1px solid #24283a;
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:4px;
}
.to-label{
  color:var(--muted);
  font-size:17px;
  font-weight:500;
  flex-shrink:0;
  line-height:1.3;
}
.to-address{
  color:var(--text);
  font-size:16px;
  font-weight:600;
  letter-spacing:-.3px;
  line-height:1.35;
  word-break:break-all;
  overflow-wrap:break-word;
  width:100%;
}

.amount-display-area{
  padding:12px 0 14px;
  min-height:132px;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.amount-bottom-group{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding-bottom:0;
}
.amount-bottom-group > .keypad{
  margin-bottom:0;
}
.amount-bottom-group > .cta{
  margin-top:0;
}
.amount-big{
  font-size:52px;
  font-weight:500;
  letter-spacing:-2px;
  color:#3b4164;
  line-height:1.05;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  flex-wrap:wrap;
  gap:0;
  transition:none;
  opacity:1;
  transform:translateY(0);
}
.amount-main{
  color:inherit;
}
.amount-main-muted{
  color:#3b4164;
}
.amount-fraction-placeholder{
  color:#6a6e85;
}
.fiat-line{
  color:rgb(255, 255, 255);
  font-size:17px;
  font-weight:500;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  user-select:none;
  -webkit-user-select:none;
  padding:6px 10px;
  border-radius:999px;
  -webkit-tap-highlight-color:transparent;
  line-height:1.2;
  transition:opacity .18s ease-out;
  opacity:1;
  transform:translateY(0);
}
.fiat-line:active{background:transparent;opacity:.45}
.fiat-value{
  display:inline-flex;
  align-items:baseline;
  gap:0;
  letter-spacing:-.2px;
}
.fiat-unit{
  margin-left:4px;
  letter-spacing:-.2px;
}
.swap-svg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  color:#fff;
  cursor:pointer;
  flex-shrink:0;
  font-size:19px;
  line-height:1;
  align-self:center;
  transform:translateY(0.5px);
  margin-left: -4px;
}
.swap-svg img{width:100%;height:100%;display:block;object-fit:contain;filter:brightness(0) invert(1);}

.balance-row{
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:13px;
  margin-top:0;
  padding:9px 4px;
  background:transparent;
}
.balance-row--flush{
  margin-left:-20px;
  margin-right:-20px;
  padding-left:22px;
  padding-right:22px;
  padding-top:3px;
  padding-bottom:3px;
  border-radius:0;
}
.balance-left{
  display:flex;align-items:center;gap:13px;min-width:0;flex:1;
}
.usdt-token-icon{
  position:relative;
  width:44px;height:44px;
  flex-shrink:0;
  display:flex;align-items:center;
}
.usdt-token-icon svg{width:44px;height:44px;display:block;flex-shrink:0}
.usdt-token-icon .usdt-icon-img{
  width:44px;height:44px;display:block;flex-shrink:0;border-radius:50%;object-fit:cover;
}
.usdt-token-icon .usdt-icon-img-fallback{
background-image:url("./thether.png")}
.usdt-token-icon .network-icon-mini{
  position:absolute;
  right:-6px;bottom:-2px;
  width:18px;height:18px;
  border:2px solid #10131c;
}
.balance-text{
  display:flex;flex-direction:column;gap:3px;min-width:0
}
.balance-text #balance{
  color:var(--text);
  font-size:18px;
  font-weight:600;
  letter-spacing:-.4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.balance-usd{
  color:var(--muted);
  font-size:14px;
  font-weight:500;
}
.max-btn-pill{
  background:#1e2233;
  color:var(--text);
  border:0;
  border-radius:999px;
  height:42px;
  padding:0 24px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  flex-shrink:0;
}
.max-btn-pill:active{transform:scale(.98)}

.balance-error{
  display:block;
  visibility:hidden;
  opacity:0;
  margin:0 auto;
  color:#ff453a;
  font-size:14px;
  font-weight:600;
  text-align:center;
  padding:4px 0 0;
  letter-spacing:-.2px;
  min-height:22px;
  height:22px;
  line-height:22px;
  flex-shrink:0;
}
.balance-error.show{
  visibility:visible;
  opacity:1;
}

/* =========================================== */
/* Keypad                                       */
/* =========================================== */
.keypad{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px 12px;
  margin-top:0;
  flex:0 0 auto;
  align-content:start;
  touch-action:manipulation;
}
.key{
  background:transparent;
  border:0;
  color:var(--text);
  font-size:22px;
  font-weight:500;
  letter-spacing:-.6px;
  height:54px;
  border-radius:14px;
  cursor:pointer;
  display:grid;place-items:center;
  -webkit-tap-highlight-color:transparent;
  transition:opacity .15s ease-out, transform .15s ease-out;
  opacity:1;
  touch-action:manipulation;
  user-select:none;
  -webkit-user-select:none;
}
.key:active{background:transparent;transform:scale(.96);opacity:.45}
.key-dot{font-size:40px;line-height:.7}
.key-back svg{width:24px;height:24px}

/* =========================================== */
/* CTA buttons — Continue / Review             */
/* =========================================== */
.cta{
  width:100%;
  height:55px;
  margin-top:auto;
  border:0;
  border-radius:28px;
  background:#1e2233;
  color:#535776;
  font-size:22px;
  font-weight:600;
  letter-spacing:-.3px;
  cursor:not-allowed;
  transition:none;
  font-family:inherit;
  -webkit-tap-highlight-color:transparent;
  margin-bottom:0;
}
.cta-review{
  margin-top:0;
  margin-bottom:0;
}
.cta-continue{
  position:relative;
  
}
.cta-continue::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:-12px;
  height:1px;
  background:#24283a;
  display:block;
}
.cta:not(.disabled):not([disabled]){
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(97,88,255,.28);
  margin-bottom:0;
}
.cta:not(.disabled):not([disabled]):active{transform:scale(.99)}
.cta.disabled,.cta[disabled]{
  opacity:1;
  background:#1e2233;
  color:#535776;
  margin-bottom: 0;
}

/* =========================================== */
/* Network overlay + full-screen modal sheet   */
/* =========================================== */
.network-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.65);
  opacity:0;
  pointer-events:none;
  transition:opacity .42s ease;
  z-index:50;
}
.network-overlay.open{opacity:1;pointer-events:auto}

.network-sheet{
  position:fixed;
  left:0;right:0;bottom:0;top:0;
  margin:0 auto;
  width:100%;
  max-width:480px;
  background:#0b0e18;
  transform:translateX(100%);
  transition:transform .56s cubic-bezier(.22,.78,.2,1);
  z-index:60;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.network-sheet.open{transform:translateX(0)}

.network-sheet-handle{display:none}

.network-sheet-header{
  display:grid;
  grid-template-columns:48px 1fr 48px;
  align-items:center;
  padding:18px 14px 14px;
  gap:8px;
  position:relative;
}
.network-sheet-back{
  width:48px;height:48px;border-radius:50%;
  background:#1a1e30;border:0;color:#e0e3f5;font-size:22px;
  cursor:pointer;display:grid;place-items:center;
  -webkit-tap-highlight-color:transparent;
  padding:0;
}
.network-sheet-back svg{width:26px;height:26px}
.network-sheet-back:active{transform:scale(.96)}
.network-sheet-spacer{display:block}
.network-sheet-header h2{
  margin:0;font-size: 18px;
    font-weight: 600;color:#ffffff;
  text-align:center;letter-spacing:-.5px;
  grid-column:2/3;
}

.network-sheet-list{
  padding:8px 10px calc(30px + env(safe-area-inset-bottom,0px));
  flex:1;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  display:flex;flex-direction:column;gap:6px;
}
.network-option{
  display:flex;align-items:center;gap:16px;
  padding:14px 12px;
  cursor:pointer;
  border-radius:16px;
  transition:background .14s ease;
  -webkit-tap-highlight-color:transparent;
}
.network-option:hover,.network-option:active{background:#161a2b}
.network-option[data-disabled="true"]{cursor:pointer;opacity:1}
.network-option[data-disabled="true"]:hover{background:#161a2b}
.network-option-name{
  font-size:18px;font-weight:600;flex:1;color:#ffffff;letter-spacing:-.4px;
}
.network-check{
  width:28px;height:28px;
  color:transparent;
  flex-shrink:0;display:grid;place-items:center;position:relative;
}
.network-check svg{width:28px;height:28px}
.network-check.selected{color:#6158ff}
.network-icon-mini{
  width:18px;height:18px;
  border:2px solid #151928;
  margin-left:-10px;
}

/* =========================================== */
/* Status / misc                               */
/* =========================================== */
.status{
  margin:14px 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(97,88,255,.1);
  color:#a09cff;
  font-size:13px;
  font-weight:500;
  line-height:1.5;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  display:none;
}
.connected-info{display:none}

@media(max-width:420px){
  .amount-big{font-size: 52px;font-weight: 500;}
  .to-address{font-size:16px}
  .address-text{font-size:16px}
  .key{font-size:22px;height:52px}
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --sheet: #ffffff;
    --card: #ffffff;
    --card-border: #e4e6ef;
    --text: #1a1d2e;
    --muted: #6b7194;
    --muted2: #4a4f6b;
    --input: #f2f3f8;
    --accent: #6158ff;
    --accent-2: #5b53f2;
    --accent-text: #ffffff;
    --danger: #ff3b30;
    --key-bg: #f2f3f8;
    --balance-card: #f7f8fc;
    --pill: #f0f1f7;
  }
  html,body{background:var(--bg);color:var(--text)}
  body{background:var(--bg)}
  .app{background:var(--bg)}
  .icon-btn-round{background:#eef0f7;color:var(--text)}
  .icon-btn-round.placeholder{background:transparent}
  .icon-btn-round svg{color:var(--text)}
  .address-text::placeholder{color:#9098b8;opacity:1}
  .network-pill{background:var(--pill);color:var(--text)}
  .network-pill .chevron{color:#6b7194}
  .paste-btn-solid[data-action="clear"]{background:#eef0f7;color:var(--text)}
  .to-banner{border-top:1px solid #e4e6ef;border-bottom:1px solid #e4e6ef}
  .to-label{color:var(--muted)}
  .amount-big{color:#c8cce0}
  .amount-main{color:#000}
  .amount-main-muted{color:#c8cce0}
  .amount-fraction-placeholder{color:#b0b5d0}
  .fiat-line{color:#1a1d2e}
  .fiat-line:active{background:transparent;opacity:.45}
  .swap-svg{color:#1a1d2e}
  .swap-svg img{filter:brightness(0) saturate(100%);}
  .max-btn-pill{background:#eef0f7;color:var(--text)}
  .balance-error{color:#ff3b30}
  .key{color:var(--text)}
  .key:active{background:transparent;opacity:.45}
  .cta{background:#eef0f7;color:#a0a5c2}
  .cta-continue::before{background:#e4e6ef}
  .cta.disabled,.cta[disabled]{background:#eef0f7;color:#a0a5c2}
  .network-overlay{background:rgba(0,0,0,.45)}
  .network-sheet{background:#f5f6fa}
  .network-sheet-back{background:#eef0f7;color:#1a1d2e}
  .network-sheet-back:active{transform:scale(.96)}
  .network-sheet-header h2{color:#1a1d2e}
  .network-option:hover,.network-option:active{background:#eef0f7}
  .network-option[data-disabled="true"]:hover{background:#eef0f7}
  .network-option-name{color:#1a1d2e}
  .status{background:rgba(97,88,255,.08);color:#6158ff}
  .usdt-token-icon .network-icon-mini{border-color:#f5f6fa}
  .paste-btn-solid[data-action="clear"]{background:#eef0f7}
}
