/* =============================================
   CRYPTOBOT STYLE — CLEAN & MINIMAL
   ============================================= */

:root {
  --bg: #0e0e0e;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  
  --text: #ffffff;
  --text-secondary: #8e8e93;
  --text-tertiary: #636366;
  
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  
  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.12);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.12);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.12);
  
  --border: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.05);
  
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-full: 100px;
  
  --nav-height: 60px;
  --header-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 0; }
input, button { font-family: inherit; outline: none; border: none; }

/* === SPLASH === */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.4s, visibility 0.4s;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
}
.splash-icon {
  font-size: 64px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.splash-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.splash-loader {
  width: 120px;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.splash-loader::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 10px;
  animation: loading 1s ease-in-out infinite;
}
@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* === APP === */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app.hidden { display: none; }
.hidden { display: none !important; }

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-inline: 16px;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-name {
  font-size: 16px;
  font-weight: 600;
}
.header-right {
  display: flex;
  gap: 8px;
}
.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.header-btn:active {
  transform: scale(0.92);
  background: var(--bg-tertiary);
}
.header-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* === PAGES === */
.pages {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  overflow-y: auto;
}
.page {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(14, 14, 14, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color 0.2s;
}
.nav-item.active {
  color: var(--accent);
}
.nav-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.nav-item span {
  font-size: 10px;
  font-weight: 500;
}

/* === BALANCE CARD === */
.balance-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-l);
  padding: 24px;
  margin-bottom: 20px;
}
.balance-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.balance-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.balance-change {
  font-size: 14px;
  color: var(--text-secondary);
}
.balance-change.up { color: var(--green); }
.balance-change.down { color: var(--red); }

/* === ACTIONS === */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  padding: 0 4px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  border: 1px solid var(--border);
}

.action-btn:active {
  transform: scale(0.94);
  background: var(--bg-tertiary);
}

.action-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.action-btn.primary .action-icon {
  background: rgba(255,255,255,0.2);
}

.action-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* === SECTION === */
.section {
  margin-bottom: 24px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
}
.section-link {
  font-size: 14px;
  color: var(--accent);
  background: none;
  cursor: pointer;
}

/* === COIN LIST === */
.coin-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.coin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: background 0.15s;
}
.coin-item:active {
  background: var(--bg-tertiary);
}
.coin-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coin-info {
  flex: 1;
  min-width: 0;
}
.coin-name {
  font-size: 15px;
  font-weight: 600;
}
.coin-ticker {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.coin-balance {
  text-align: right;
}
.coin-amount {
  font-size: 15px;
  font-weight: 600;
}
.coin-value {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* === INPUTS === */
.input-group {
  margin-bottom: 16px;
}
.input-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--text);
  font-size: 16px;
  transition: border-color 0.2s;
}
.input:focus {
  border-color: var(--accent);
}
.input::placeholder {
  color: var(--text-tertiary);
}
.input-big {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  background: transparent;
  border: none;
  padding: 20px;
}

/* === BUTTONS === */
.btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-m);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
}
.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn-success {
  background: var(--green-soft);
  color: var(--green);
}

/* === CARDS === */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  padding: 16px;
  margin-bottom: 10px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-amount {
  font-size: 18px;
  font-weight: 700;
}
.card-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.card-status.active { background: var(--green-soft); color: var(--green); }
.card-status.pending { background: var(--orange-soft); color: var(--orange); }
.card-status.expired { background: var(--red-soft); color: var(--red); }
.card-meta {
  font-size: 13px;
  color: var(--text-secondary);
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.card-actions .btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

/* === TRANSACTION LIST === */
.tx-list {
  display: flex;
  flex-direction: column;
}
.tx-date-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.tx-item:last-child {
  border-bottom: none;
}
.tx-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tx-icon.in { background: var(--green-soft); }
.tx-icon.out { background: var(--red-soft); }
.tx-info {
  flex: 1;
  min-width: 0;
}
.tx-title {
  font-size: 15px;
  font-weight: 600;
}
.tx-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-amount {
  text-align: right;
}
.tx-value {
  font-size: 15px;
  font-weight: 600;
}
.tx-value.in { color: var(--green); }
.tx-value.out { color: var(--red); }
.tx-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* === QR === */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.qr-box {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-m);
  margin-bottom: 20px;
}
.address-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  margin-bottom: 12px;
}
.address-text {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.5;
}
.copy-btn {
  padding: 10px 16px;
  background: var(--accent);
  border-radius: var(--radius-s);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}
.copy-btn:active {
  transform: scale(0.95);
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.25s, visibility 0.25s;
}
.modal.hidden {
  opacity: 0;
  visibility: hidden;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  padding: 12px 20px 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
}
.modal:not(.hidden) .modal-sheet {
  transform: translateY(0);
}
.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

/* === TOAST === */
.toasts {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 14px 16px;
  border-radius: var(--radius-m);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--accent); color: #fff; }
.toast.hide { animation: toastOut 0.25s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-20px); }
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* === SETTINGS === */
.settings-group {
  margin-bottom: 24px;
}
.settings-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-left: 4px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.settings-item:first-of-type {
  border-radius: var(--radius-m) var(--radius-m) 0 0;
}
.settings-item:last-of-type {
  border-radius: 0 0 var(--radius-m) var(--radius-m);
}
.settings-item:only-of-type {
  border-radius: var(--radius-m);
}
.settings-item + .settings-item {
  border-top: 1px solid var(--divider);
}
.settings-item:active {
  background: var(--bg-tertiary);
}
.settings-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.settings-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}
.settings-value {
  font-size: 14px;
  color: var(--text-secondary);
}
.settings-arrow {
  color: var(--text-tertiary);
}

/* === TOGGLE === */
.toggle {
  width: 50px;
  height: 30px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}
.toggle.on {
  background: var(--green);
}
.toggle.on::after {
  transform: translateX(20px);
}

/* === TABS === */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  margin-bottom: 16px;
}
.tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.tab.active {
  background: var(--bg-tertiary);
  color: var(--text);
}

/* === CHIPS === */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* === SKELETON === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-s);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === RESPONSIVE === */
@media (min-width: 440px) {
  .pages {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* === NAVBAR CENTER BUTTON === */
.nav-center {
  margin-top: -24px;
}
.nav-center-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.4);
  border: 4px solid var(--bg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-center:active .nav-center-btn {
  transform: scale(0.9);
  box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}
.nav-center-btn svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
}
.nav-center span {
  display: none;
}

/* === TX CARD === */
.tx-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  margin-bottom: 8px;
  transition: transform 0.15s, background 0.15s;
}
.tx-card.clickable {
  cursor: pointer;
}
.tx-card.clickable:active {
  transform: scale(0.98);
  background: var(--bg-tertiary);
}
.tx-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tx-card-icon.in { background: var(--green-soft); color: var(--green); }
.tx-card-icon.out { background: var(--red-soft); color: var(--red); }
.tx-card-icon.swap { background: var(--accent-soft); color: var(--accent); }
.tx-card-icon.check { background: var(--orange-soft); color: var(--orange); }
.tx-card-icon.invoice { background: var(--accent-soft); color: var(--accent); }
.tx-card-info {
  flex: 1;
  min-width: 0;
}
.tx-card-title {
  font-size: 15px;
  font-weight: 600;
}
.tx-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-card-right {
  text-align: right;
  flex-shrink: 0;
}
.tx-card-amount {
  font-size: 15px;
  font-weight: 600;
}
.tx-card-amount.in { color: var(--green); }
.tx-card-amount.out { color: var(--red); }
.tx-card-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* === TX DETAILS === */
.tx-details-header {
  text-align: center;
  padding: 20px 0;
}
.tx-details-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.tx-details-amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}
.tx-details-amount.in { color: var(--green); }
.tx-details-amount.out { color: var(--red); }
.tx-details-usd {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.tx-details-status {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}
.tx-details-status.completed { background: var(--green-soft); color: var(--green); }
.tx-details-status.pending { background: var(--orange-soft); color: var(--orange); }
.tx-details-status.failed { background: var(--red-soft); color: var(--red); }
.tx-details-list {
  background: var(--bg-tertiary);
  border-radius: var(--radius-m);
  padding: 4px 16px;
  margin: 20px 0;
}
.tx-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.tx-details-row:last-child {
  border-bottom: none;
}
.tx-details-row span:first-child {
  color: var(--text-secondary);
  font-size: 14px;
}
.tx-details-row span:last-child {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}
.tx-details-row .mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
}
.tx-details-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* === INVOICE STYLES === */
.invoice-header {
  text-align: center;
  padding: 30px 0;
}
.invoice-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.invoice-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.invoice-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}
.invoice-usd {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.invoice-comment {
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-m);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invoice-details {
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  padding: 4px 16px;
  margin-bottom: 20px;
}
.invoice-success {
  text-align: center;
  padding: 20px 0;
}
.invoice-success .success-icon {
  width: 72px;
  height: 72px;
  background: var(--green-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  color: var(--green);
}
.invoice-success .success-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.invoice-amount-display {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.invoice-link-box {
  margin: 20px 0;
}
.invoice-link-box .input {
  text-align: center;
  font-size: 12px;
  font-family: monospace;
}
.invoice-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* === SUCCESS ANIMATION === */
.success-animation {
  text-align: center;
  padding: 30px 0;
}
.success-animation .success-check {
  width: 80px;
  height: 80px;
  background: var(--green-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
  color: var(--green);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.success-animation .success-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.success-animation .success-details {
  margin-bottom: 24px;
}

/* === INFO BOX === */
.info-box {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.info-box.warn {
  background: var(--orange-soft);
  color: var(--orange);
}
.info-box b {
  color: var(--accent);
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s, background 0.15s;
}
.back-btn:active {
  transform: scale(0.9);
  background: var(--bg-tertiary);
}
.page-header .page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* === DETAIL ROW === */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-row span:first-child {
  color: var(--text-secondary);
}

/* === LOADING SPINNER IN BUTTON === */
.btn .loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === SETTINGS PAGE === */
.settings-page {
  padding-bottom: 40px;
}

/* Profile Card Large */
.profile-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-l);
  margin-bottom: 24px;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-size: 32px;
  font-weight: 700;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-username {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
}

.profile-id {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: monospace;
}

/* Language Grid */
.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.language-btn {
  padding: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.language-btn:active {
  transform: scale(0.96);
}

.language-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.language-flag {
  font-size: 32px;
  margin-bottom: 8px;
}

.language-name {
  font-size: 14px;
  font-weight: 600;
}

/* Currency List */
.currency-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.currency-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.currency-btn:active {
  transform: scale(0.98);
}

.currency-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.currency-symbol {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

.currency-info {
  flex: 1;
  text-align: left;
}

.currency-code {
  font-size: 16px;
  font-weight: 700;
}

.currency-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.currency-check {
  color: var(--accent);
  font-size: 20px;
}

/* Seed Display */
.seed-display {
  padding: 8px 0;
}

.seed-warning {
  padding: 12px;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: var(--radius-m);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
}

.seed-words {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.seed-word {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-s);
}

.seed-word-num {
  font-size: 11px;
  color: var(--text-tertiary);
  min-width: 20px;
}

.seed-word-text {
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
}

.settings-footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.8;
}

/* === PIN OVERLAY === */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pin-overlay.visible {
  opacity: 1;
}

.pin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.pin-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 24px 20px;
  padding-bottom: calc(24px + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.pin-overlay.visible .pin-sheet {
  transform: translateY(0);
}

.pin-header {
  text-align: center;
  margin-bottom: 32px;
}

.pin-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 12px var(--accent-glow);
}

.pin-dot.error {
  background: var(--red);
  border-color: var(--red);
  animation: shakeDot 0.4s ease;
}

@keyframes shakeDot {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.pin-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.pin-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.pin-btn:active {
  transform: scale(0.9);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.pin-btn-empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

.pin-btn-del {
  background: transparent;
  color: var(--text-secondary);
}

.pin-btn-del:active {
  background: var(--red-soft);
  color: var(--red);
}

.pin-cancel-btn {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pin-cancel-btn:active {
  opacity: 0.6;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #0e0e0e);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-bolt {
  animation: boltPulse 1.5s ease-in-out infinite;
}

.loading-bolt svg {
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.6));
}

@keyframes boltPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.loading-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #c4b5fd, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* === THEMES IN SETTINGS === */
:root {
  --radius-2xl: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --accent-glow: rgba(0, 122, 255, 0.4);
  --bg-primary: var(--bg);
  --bg-card: var(--bg-secondary);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.theme-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform 0.15s;
}

.theme-card:active { transform: scale(0.95); }

.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.theme-card-bg {
  width: 100%;
  height: 100%;
}

.theme-card-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.theme-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}

.theme-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 4px 5px;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

.theme-card-price {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 4px;
  background: rgba(0,0,0,0.65);
  border-radius: 5px;
  font-size: 7px;
  font-weight: 700;
  color: #fbbf24;
}

.theme-category {
  margin-top: 16px;
  margin-bottom: 4px;
}

.theme-category-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-preview-modal {
  text-align: center;
  padding: 8px 0;
}

.theme-preview-large {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.theme-preview-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.theme-preview-price {
  font-size: 15px;
  color: #fbbf24;
  font-weight: 600;
  margin-bottom: 16px;
}

.theme-preview-free { color: var(--green); }

.theme-preview-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Wallpaper overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--wallpaper, none);
  opacity: var(--wallpaper-opacity, 0);
  transition: opacity 0.3s ease;
}

#app {
  position: relative;
  z-index: 1;
}