:root { --green: #30a46c; --red: #e54d2e; }

/* ===== RESET ===== */
* {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
input, textarea {
  -webkit-user-select: text !important;
  user-select: text !important;
}

body, html {
  margin: 0;
  min-width: 360px;
  min-height: 600px;
  background-color: #111;
  font-family: Inter, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  color: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
img { border: 0; display: block; }
button { overflow: visible; cursor: pointer; border: none; background: none; color: inherit; font-family: inherit; padding: 0; }
button, select { text-transform: none; }
input, select, textarea { color: inherit; font: inherit; margin: 0; font-family: inherit; }
input { line-height: normal; }

/* ===== APP SHELL ===== */
#root {
  max-width: 500px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  height: 59px;
  flex-shrink: 0;
  gap: 10px;
  background: #111;
  z-index: 10;
}

.profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.profile-emoji {
  font-size: 28px;
  display: block;
  line-height: 1;
}

.header-center {
  flex: 1;
  min-width: 0;
}
.header-username {
  font-size: 13px;
  color: #b4b4b4;
  line-height: 1.2;
}
.header-accountname {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== MAIN SCROLL ===== */
.main-scroll {
  flex: 1;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#content-wrapper {
  transition: transform 0.3s ease;
  will-change: transform;
}

/* ===== BALANCE SECTION ===== */
.balance-section {
  padding: 16px 16px 8px;
}
.balance-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.balance-amount {
  font-size: 38px;
  line-height: 42px;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.balance-sub {
  display: flex;
  align-items: center;
  gap: 8px;
}
.balance-pnl {
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.balance-change {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ===== MAIN BUTTONS ===== */
.main-btns {
  display: flex;
  gap: 8px;
  padding: 12px 16px 8px;
}

.main-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #232323;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  padding: 14px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition-property: background-color;
  transition-duration: .15s;
  transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}
.main-btn:hover { background-color: #2a2a2a; }
.main-btn:active { transform: scale(0.96); }
.main-btn svg { color: #ab9ff2; }

/* ===== CASH BALANCE ===== */
.cash-balance-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 16px;
  background-color: #232323;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  padding: 16px;
  gap: 12px;
}
.cash-info { flex: 1; min-width: 0; }
.cash-label { font-size: 13px; color: #b4b4b4; margin-bottom: 2px; }
.cash-value { font-size: 18px; font-weight: 600; color: #fff; }
.cash-add-btn {
  background-color: #ab9ff2;
  color: #111;
  border: none;
  border-radius: 48px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

/* ===== TOKENS HEADER ===== */
.tokens-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

/* ===== COIN ROWS ===== */
#coin-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 12px;
}

/* The outer wrapper per coin (built by JS) */
.coin-row {
  display: flex;
  align-items: center;
  background-color: #232323;
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  padding: 16px;
  gap: 12px;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
  transition-property: background-color;
  transition-duration: .15s;
  transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}
.coin-row:hover { background-color: #2a2a2a; }
.coin-row:active { background-color: #2a2a2a; }

/* Icon wrap */
.coin-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coin-icon-wrap img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
}

/* Info column */
.coin-row-info {
  flex: 1;
  min-width: 0;
}
.coin-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.coin-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.coin-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.coin-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.coin-badge svg { flex-shrink: 0; }
.coin-value {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.coin-amount {
  font-size: 14px;
  color: #b4b4b4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.coin-pnl {
  font-size: 14px;
  white-space: nowrap;
}

/* Coin row template (hidden) */
#coin-row-template { display: none; }

/* ===== LEGAL ===== */
.legal-btn-wrap { padding: 8px 16px 80px; }
.legal-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6e6e6e;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
}

/* ===== SETTINGS OVERLAY ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.overlay.active {
  opacity: 1;
  pointer-events: all;
}

#settingsOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#settingsOverlay.active {
  opacity: 1;
  pointer-events: all;
}
#settingsPanel {
  background: #1e1e1e;
  border-radius: 20px;
  width: 340px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  transform: translateY(30px);
  transition: transform .3s cubic-bezier(.25, 1, .5, 1);
}
#settingsOverlay.active #settingsPanel { transform: translateY(0); }

.panel {
  background: #1e1e1e;
  border-radius: 20px;
  width: 340px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  transform: translateY(30px);
  transition: transform .3s cubic-bezier(.25, 1, .5, 1);
}
.overlay.active .panel { transform: translateY(0); }

.panel-header, .settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.panel-header h2, .settings-header h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.close-btn {
  background: 0 0;
  border: none;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.panel-body { display: flex; flex-direction: column; gap: 0; }

.settings-section { margin-bottom: 16px; }
.settings-section-title {
  color: #ab9ff2;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.settings-row label {
  color: #999;
  font-size: 13px;
  min-width: 54px;
  flex-shrink: 0;
}
.s-input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  outline: 0;
  font-family: inherit;
}
.s-input:focus { border-color: #ab9ff2; }
.s-select {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
  outline: 0;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.confirm-btn, #settingsConfirm {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #ab9ff2;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 6px;
  font-family: inherit;
  transition: background .15s;
}
.confirm-btn:active, #settingsConfirm:active { background: #8f80e0; }

.danger-btn {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: 1px solid #e54d2e;
  border-radius: 10px;
  color: #e54d2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.add-token-btn {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: #1a1a1a;
  color: #999;
  border: 1px dashed #333;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.add-token-btn:active { background: #222; }

.unit-label { color: #999; font-size: 13px; flex-shrink: 0; }
.progress-badge { color: #ab9ff2; font-size: 13px; }
.status-badge { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: #1a1a1a; }
.status-badge.active { color: #30a46c; }
.status-val { font-size: 13px; color: #fff; }

/* Toggle */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .25s; border-radius: 24px; }
.toggle-slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: #999; transition: .25s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background-color: #ab9ff2; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background-color: #111; }
.toggle-label { font-size: 12px; color: #999; }

/* Custom tokens */
.custom-token-entry { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.custom-token-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.custom-token-label { font-size: 13px; color: #888; font-family: monospace; }
.remove-token-btn { background: 0 0; border: none; color: #f83b17; font-size: 20px; cursor: pointer; padding: 0 4px; line-height: 1; }
#addCustomToken { width: 100%; padding: 10px; margin-top: 8px; background: #1a1a1a; color: #999; border: 1px dashed #333; border-radius: 10px; font-size: 14px; cursor: pointer; }

/* ===== TX OVERLAY ===== */
#txOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(0,0,0,.85);
  display: none;
  align-items: flex-end;
}
#txOverlay.active { display: flex; }

.tx-menu {
  background: #111;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tx-field { display: flex; flex-direction: column; gap: 6px; }
.tx-label { font-size: 12px; color: #ab9ff2; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.tx-type-toggle { display: flex; gap: 0; border-radius: 12px; overflow: hidden; border: 1px solid #333; }
.tx-type-btn { flex: 1; padding: 12px; background: #1a1a1a; color: #888; border: none; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .15s, color .15s; }
.tx-type-btn.active { background: #ab9ff2; color: #111; }
.tx-type-btn:first-child { border-right: 1px solid #333; }
.tx-addr-row { display: flex; gap: 8px; }
.tx-addr-row .s-input { flex: 1; }
.rand-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid #333; background: #2a2a2a; color: #ab9ff2; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.rand-btn:active { background: #333; }

/* TX View */
#txView { position: fixed; inset: 0; z-index: 10000; background: #000; display: none; }
.tx-view-wrap { max-width: 500px; margin: 0 auto; padding: 20px; }
.grey-notch { position: absolute; height: 10px; width: 90dvw; background-color: #202022; border-top-left-radius: 22px; border-top-right-radius: 22px; top: 0; left: 50%; transform: translateX(-50%); }
.tx-view-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-top: 20px; }
.tx-view-title { font-size: 20px; font-weight: 700; color: #fff; }
.tx-view-coin-icon { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; }
.tx-view-coin-icon img { width: 72px; height: 72px; object-fit: cover; }
.tx-view-amount { font-size: 32px; font-weight: 700; text-align: center; margin-bottom: 24px; }
.tx-detail-rows { background: #1a1a1a; border-radius: 16px; overflow: hidden; margin-bottom: 16px; }
.tx-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #222; }
.tx-detail-row:last-child { border-bottom: none; }
.tx-dr-label { color: #888; font-size: 14px; }
.tx-dr-val { color: #fff; font-size: 14px; font-weight: 500; }
.tx-dr-val.success { color: #30a46c; }
.tx-dr-val.addr { font-family: monospace; font-size: 13px; color: #ab9ff2; }
.scan-btn { width: 100%; padding: 14px; border: none; border-radius: 14px; background: #ab9ff2; color: #111; font-size: 16px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ===== NOTIF ===== */
#notifOverlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#notifOverlay.active { opacity: 1; pointer-events: all; }
#notifPanel { background: #1e1e1e; border-radius: 20px; width: 340px; max-height: 85vh; overflow-y: auto; padding: 24px 20px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.5); transform: translateY(30px); transition: transform .3s cubic-bezier(.25,1,.5,1); }
#notifOverlay.active #notifPanel { transform: translateY(0); }
#enableNotifs { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #333; background: #1a1a1a; color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; }
#notifSend, #notifStart { width: 100%; padding: 12px; border: none; border-radius: 12px; background: #ab9ff2; color: #111; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 6px; font-family: inherit; }
#notifStart.running { background: #f83b17; color: #fff; }
.notif-mode-row { display: flex; gap: 8px; margin-bottom: 10px; }
.notif-chip { display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; border-radius: 8px; border: 1px solid #333; background: #1a1a1a; color: #999; font-size: 13px; font-weight: 600; cursor: pointer; }
.notif-chip.active { border-color: #ab9ff2; color: #ab9ff2; background: rgba(171,159,242,.1); }
.notif-coin-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #222; cursor: pointer; }
.notif-coin-toggle:last-child { border-bottom: none; }
.notif-coin-toggle input[type=checkbox] { width: 16px; height: 16px; accent-color: #ab9ff2; flex-shrink: 0; }
.notif-coin-toggle > span:first-of-type { font-size: 13px; font-weight: 600; color: #999; min-width: 40px; }
.notif-coin-toggle:has(input:checked) > span:first-of-type { color: #ab9ff2; }
.notif-range { display: none; align-items: center; gap: 4px; margin-left: auto; }
.notif-coin-toggle:has(input:checked) .notif-range { display: flex; }
.notif-range span { color: #555; font-size: 12px; }
.notif-coin-max, .notif-coin-min { width: 60px; background: #111; border: 1px solid #333; border-radius: 6px; color: #fff; padding: 5px 6px; font-size: 12px; font-family: inherit; text-align: center; }
.notif-unit-select { background: #111; border: 1px solid #333; border-radius: 6px; color: #fff; padding: 6px 8px; font-size: 13px; font-family: inherit; width: 56px; }

/* ===== LICENSE ===== */
#licenseOverlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#licenseOverlay.active { opacity: 1; pointer-events: all; }
#licensePanel { background: #1e1e1e; border-radius: 20px; width: 320px; padding: 24px 20px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.5); transform: translateY(30px); transition: transform .3s cubic-bezier(.25,1,.5,1); }
#licenseOverlay.active #licensePanel { transform: translateY(0); }

/* ===== COIN POPUP ===== */
.coin-popup {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: #111;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.coin-popup.active { transform: translateX(0); }
.coin-popup-inner { display: flex; flex-direction: column; height: 100%; }

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #111;
}
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 8px;
}
.popup-header-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.popup-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.popup-coin-icon { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.popup-coin-icon img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; }
.popup-coin-info { flex: 1; min-width: 0; }
.popup-coin-name-row { display: flex; align-items: center; gap: 4px; }
.popup-coin-name { font-size: 16px; font-weight: 700; color: #fff; }
.popup-online-row { display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: #30a46c; flex-shrink: 0; }
.online-text { font-size: 12px; color: #6e6e6e; }
.follow-btn { background: #212121; border: 1px solid #333; border-radius: 20px; padding: 6px 14px; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0; }

.popup-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.popup-price-section { padding: 12px 16px 0; }
.popup-price-row { display: flex; align-items: flex-start; justify-content: space-between; }
.popup-price { font-size: 32px; font-weight: 700; color: #fff; }
.popup-pnl-col { text-align: right; }
.popup-pnl { font-size: 16px; font-weight: 500; color: #b4b4b4; }
.popup-change-badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-top: 2px; color: #111; }

.chart-timeframes { display: flex; justify-content: space-around; padding: 8px 0 4px; }
.tf-btn { background: none; border: none; font-size: 13px; font-weight: 700; color: #b4b4b4; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-family: inherit; }
.tf-btn.active { color: #ab9ff2; background: rgba(171,159,242,.12); }

.popup-actions { display: flex; gap: 8px; padding: 12px 16px; }
.popup-action-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #1e1e1e; border: none; border-radius: 14px; padding: 12px 6px; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; font-family: inherit; }
.popup-action-btn svg { color: #ab9ff2; }

.popup-section { padding: 12px 16px; }
.section-title { font-size: 14px; font-weight: 700; color: #b4b4b4; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.info-card { background: #1e1e1e; border-radius: 12px; padding: 12px; }
.info-card.full-width { grid-column: 1 / -1; }
.info-label { font-size: 12px; color: #6e6e6e; margin-bottom: 4px; }
.info-value { font-size: 16px; font-weight: 600; color: #fff; }

.info-rows { display: flex; flex-direction: column; gap: 0; background: #1e1e1e; border-radius: 14px; overflow: hidden; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #2a2a2a; }
.info-row:last-child { border-bottom: none; }
.ir-label { font-size: 14px; color: #999; }
.ir-value { font-size: 14px; font-weight: 500; color: #fff; text-align: right; }

.coin-about { font-size: 14px; color: #b4b4b4; line-height: 1.5; margin-top: 4px; }

/* SOL Stake section */
#solStake { padding: 0 16px 12px; }
.stake-row { display: flex; gap: 8px; }
.stake-btn { flex: 1; background: #1e1e1e; border: none; border-radius: 14px; padding: 14px; font-size: 14px; font-weight: 600; color: #ab9ff2; cursor: pointer; font-family: inherit; }
.stake-btn:active { background: #2a2a2a; }

/* ===== SEND FLOW ===== */
#sendOverlay { position: fixed; inset: 0; z-index: 9998; display: none; flex-direction: column; background: #000; }
#sendOverlay.active { display: flex; animation: overlaySlideUp .42s cubic-bezier(.25,1,.5,1) forwards; }
#sendOverlay.closing { display: flex; animation: overlaySlideDown .32s cubic-bezier(.4,0,1,1) forwards; }
@keyframes overlaySlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes overlaySlideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }

.send-screen { position: absolute; inset: 0; background: #111; display: none; flex-direction: column; overflow: hidden; }
.send-screen.active { display: flex; }
.send-screen.slide-in-right { animation: sendSlideInRight .35s cubic-bezier(.25,1,.5,1) forwards; z-index: 1; }
.send-screen.slide-out-left { animation: sendSlideOutLeft .35s cubic-bezier(.25,1,.5,1) forwards; }
.send-screen.slide-in-left { animation: sendSlideInLeft .35s cubic-bezier(.25,1,.5,1) forwards; z-index: 1; }
.send-screen.slide-out-right { animation: sendSlideOutRight .35s cubic-bezier(.25,1,.5,1) forwards; }
@keyframes sendSlideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes sendSlideOutLeft { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-30%); opacity: .5; } }
@keyframes sendSlideInLeft { from { transform: translateX(-30%); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
@keyframes sendSlideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

.send-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px; flex-shrink: 0; background: #111; z-index: 2; position: relative; }
.send-topbar--stacked { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 12px; }
.send-topbar-row { display: flex; align-items: center; justify-content: space-between; position: relative; }
.send-topbar-title { color: #fff; font-size: 17px; font-weight: 600; position: absolute; left: 50%; transform: translateX(-50%); }
.send-topbar-btn { background: 0 0; border: none; color: #fff; font-size: 17px; font-weight: 500; cursor: pointer; padding: 4px; font-family: inherit; z-index: 1; }
.send-topbar-btn.disabled { opacity: .35; pointer-events: none; }
.send-topbar-right { color: #ab9ff2; font-weight: 600; }
.send-search-wrap { padding: 0 16px 12px; flex-shrink: 0; }
.send-search-input { width: 100%; box-sizing: border-box; background: #2a2a2a; border: 1px solid #333; border-radius: 10px; padding: 10px 12px 10px 36px; color: #fff; font-size: 15px; font-family: inherit; outline: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; }
.send-search-input::placeholder { color: #666; }
.send-search-input:focus { border-color: #ab9ff2; }
.send-token-list { flex: 1; overflow-y: auto; padding: 0 12px 40px; }
.send-token-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 14px; background: #1a1a1a; margin-bottom: 8px; cursor: pointer; transition: background .15s; border: none; width: 100%; text-align: left; font-family: inherit; }
.send-token-item:active { background: #252525; }
.send-token-icon { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.send-token-info { flex: 1; min-width: 0; }
.send-token-name { color: #fff; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.send-token-bal { color: #999; font-size: 14px; margin-top: 2px; }
.send-addr-wrap { padding: 0 16px; flex-shrink: 0; }
.send-addr-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #222; padding: 14px 0; }
.send-addr-input { flex: 1; background: 0 0; border: none; color: #fff; font-size: 15px; font-family: inherit; outline: 0; min-width: 0; }
.send-addr-input::placeholder { color: #666; }
.send-addr-label { color: #888; font-size: 15px; flex-shrink: 0; }
.send-addr-body { flex: 1; display: flex; align-items: center; justify-content: center; }
.send-addr-empty { color: #555; font-size: 14px; text-align: center; padding: 60px 20px; }
.send-scan-btn { background: 0 0; border: none; padding: 6px; cursor: pointer; flex-shrink: 0; }
.send-amount-to { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #222; flex-shrink: 0; }
.send-amount-to-label { color: #888; font-size: 15px; }
.send-amount-to-addr { color: #fff; font-size: 15px; font-weight: 500; }
.send-amount-to-edit { background: 0 0; border: none; padding: 4px; cursor: pointer; }
.send-amount-display-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; }
.send-amount-input-row { display: flex; align-items: baseline; gap: 10px; }
.send-amount-input { background: 0 0; border: none; outline: 0; color: #fff; font-size: 52px; font-weight: 700; letter-spacing: -.02em; width: 100%; min-width: 0; text-align: right; font-family: inherit; caret-color: #ab9ff2; }
.send-amount-input::placeholder { color: #555; }
.amt-sym { color: #fff; font-size: 44px; font-weight: 700; }
.send-amount-usd { color: #888; font-size: 16px; }
.send-available { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; flex-shrink: 0; }
.send-available-left { display: flex; flex-direction: column; gap: 2px; }
.send-available-label { color: #888; font-size: 13px; }
.send-available-val { color: #fff; font-size: 16px; font-weight: 600; }
.send-max-btn { background: #2a2a2a; border: 1px solid #444; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 600; padding: 8px 18px; cursor: pointer; font-family: inherit; }
.send-confirm-wrap { padding: 16px 20px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0)); flex-shrink: 0; }
.send-confirm-btn { width: 100%; padding: 16px; border: none; border-radius: 14px; background: #ab9ff2; color: #111; font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; }
.send-confirm-btn:active { background: #8f80e0; }
.send-summary-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 40px 20px 20px; overflow-y: auto; }
.send-summary-amount { font-size: 42px; font-weight: 700; color: #fff; text-align: center; letter-spacing: -.02em; }
.send-summary-usd { color: #888; font-size: 16px; margin-top: 4px; margin-bottom: 30px; }
.send-summary-details { width: 100%; background: #1a1a1a; border-radius: 16px; overflow: hidden; }
.send-summary-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #222; }
.send-summary-row:last-child { border-bottom: none; }
.send-summary-row-label { color: #888; font-size: 15px; }
.send-summary-row-value { color: #fff; font-size: 15px; font-weight: 500; }
.send-success-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 40px 20px; }
.send-success-check { width: 80px; height: 80px; border-radius: 50%; background: #30a46c; display: flex; align-items: center; justify-content: center; animation: sendSuccessPop .4s cubic-bezier(.25,1,.5,1); }
@keyframes sendSuccessPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.send-success-title { color: #fff; font-size: 22px; font-weight: 700; }
.send-success-sub { color: #888; font-size: 15px; text-align: center; }
.send-done-btn { width: calc(100% - 40px); padding: 16px; border: none; border-radius: 14px; background: #ab9ff2; color: #111; font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0)); left: 20px; }
.send-done-btn:active { background: #8f80e0; }
#sendSelectToken { background: #111; }

/* QR */
#sendQRScreen { background: #000; z-index: 10; }
.qr-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: rgba(0,0,0,.85); position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.qr-topbar-title { color: #fff; font-size: 18px; font-weight: 600; }
.qr-close-btn { background: 0 0; border: none; color: #fff; font-size: 28px; cursor: pointer; padding: 0 4px; line-height: 1; }
.qr-video-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.qr-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.qr-viewfinder { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 220px; height: 220px; pointer-events: none; }
.qr-corner { position: absolute; width: 36px; height: 36px; border-color: #fff; border-style: solid; border-width: 0; }
.qr-corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 12px; }
.qr-corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 12px; }
.qr-corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 12px; }
.qr-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 12px; }
.qr-error-msg { color: #f83b17; font-size: 14px; text-align: center; position: absolute; bottom: 100px; left: 20px; right: 20px; z-index: 6; }

/* Buy/sell popup buttons */
.bsbuttons { gap: .5rem; bottom: 5rem; position: sticky; left: 0; padding: 0 24px 26px; box-sizing: border-box; display: flex; background: linear-gradient(to bottom, rgba(17,17,17,0) 0, rgba(17,17,17,.7) 35%, #111 60%); }
.bsbuttons div { background-color: #ab9ff2; font-size: 1.15rem; padding: .8rem; width: 100%; border-radius: 16px; text-align: center; font-weight: 500; cursor: pointer; }

/* ===== SPINNER ===== */
.spinner { font-size: 36px; position: relative; display: inline-block; width: 1em; height: 1em; }
.spinner.center { position: fixed; left: 50%; top: 60px; transform: translate(-50%) scale(0); opacity: 0; z-index: 999; pointer-events: none; }
.spinner .spinner-blade { position: absolute; left: .43em; bottom: 0; width: .084em; height: .2777em; border-radius: .0655em; background-color: transparent; transform-origin: center -0.11em; animation: spinner-fade 1s infinite linear; }
.spinner .spinner-blade:first-child { transform: rotate(0); animation-delay: 0s; }
.spinner .spinner-blade:nth-child(2) { transform: rotate(45deg); animation-delay: 125ms; }
.spinner .spinner-blade:nth-child(3) { transform: rotate(90deg); animation-delay: .25s; }
.spinner .spinner-blade:nth-child(4) { transform: rotate(135deg); animation-delay: 375ms; }
.spinner .spinner-blade:nth-child(5) { transform: rotate(180deg); animation-delay: .5s; }
.spinner .spinner-blade:nth-child(6) { transform: rotate(225deg); animation-delay: 625ms; }
.spinner .spinner-blade:nth-child(7) { transform: rotate(270deg); animation-delay: .75s; }
.spinner .spinner-blade:nth-child(8) { transform: rotate(315deg); animation-delay: 875ms; }
@keyframes spinner-fade { 0% { background-color: #69717d; } 100% { background-color: transparent; } }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }


/* Settings coin icons */
.coin-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #fff; }
.coin-section-header img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ===== PULL TO REFRESH ===== */
html, body {
  overscroll-behavior-y: contain;
}
.app-shell {
  overscroll-behavior-y: contain;
}
