:root {
  --bg: #07090f;
  --card: rgba(17, 24, 39, 0.78);
  --border: rgba(255, 255, 255, 0.11);
  --text: #f8fafc;
  --muted: #94a3b8;
  --green: #22c55e;
  --amber: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Roboto', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 10%, rgba(34, 197, 94, 0.16), transparent 55%),
    radial-gradient(circle at 80% 85%, rgba(56, 189, 248, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.is-hidden {
  display: none !important;
}

/* STAGE 1: Lockscreen & Native Push */
.lockscreen-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 26px;
  gap: 28px;
}

.lock-clock-wrap {
  text-align: center;
}

.lock-time {
  font-size: 62px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.94);
  font-variant-numeric: tabular-nums;
}

.lock-date {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* Native Push Banner */
.native-push {
  appearance: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  background: rgba(30, 41, 59, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow:
    0 24px 48px -12px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  cursor: pointer;

  /* Initial hidden state before 0.4s drop */
  opacity: 0;
  transform: translateY(-48px) scale(0.96);
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.22, 1.28, 0.36, 1), opacity 0.35s ease;
}

.native-push.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.native-push:active {
  transform: scale(0.98);
}

.native-push.is-nudge {
  animation: pushNudge 0.55s ease;
}

@keyframes pushNudge {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-4px) scale(1.015); }
  50% { transform: translateY(2px) scale(0.995); }
  75% { transform: translateY(-2px) scale(1.008); }
}

.push-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.push-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.push-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #052e16;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.push-app-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.75);
}

.push-time {
  font-size: 11px;
  color: var(--muted);
}

.push-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.push-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.push-text {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.35;
}

.push-action-hint {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
}

.tap-prompt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.4s ease 0.45s;
}

.tap-prompt.is-visible {
  opacity: 1;
}

.tap-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: tapPulse 1.6s infinite;
}

@keyframes tapPulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* STAGE 2: Transfer Confirmation Screen */
.transfer-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: expandIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px;
}

.tx-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.tx-shield {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tx-id {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tx-card {
  background: var(--card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 22px 44px -16px rgba(0, 0, 0, 0.75);
}

.tx-amount-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tx-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.tx-amount {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.tx-amount span {
  font-size: 21px;
  color: #4ade80;
}

.tx-rate-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
}

/* Status Line */
.tx-status-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  animation: blinkDot 1.1s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #fde68a;
}

.status-bar-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.status-bar-fill {
  position: absolute;
  top: 0;
  left: -40%;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--amber), #fde68a, transparent);
  animation: statusSlide 1.5s ease-in-out infinite;
}

@keyframes statusSlide {
  0% { left: -45%; }
  100% { left: 105%; }
}

.tx-details {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 4px;
}

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tx-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tx-k {
  color: var(--muted);
}

.tx-v {
  font-weight: 700;
}

.tx-v.is-pending {
  color: #e2e8f0;
}

.tx-v.is-ok {
  color: #4ade80;
}

/* Marquee Ticker */
.ticker-wrap {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.ticker-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4ade80;
}

.ticker-viewport {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 24px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  animation: marqueeScroll 22s linear infinite;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Bank Quick Select */
.bank-pick {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bank-pick-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.bank-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.bank-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  border-radius: 11px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.bank-tab:active {
  transform: scale(0.96);
}

.bank-tab.is-active {
  background: rgba(34, 197, 94, 0.16);
  border-color: var(--green);
  color: #ffffff;
}

/* CTA Button */
.cta-btn {
  position: relative;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #052e16;
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  box-shadow: 0 14px 28px -6px rgba(34, 197, 94, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s ease;
}

.cta-btn:active {
  transform: scale(0.98);
}

.cta-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 2.6s infinite;
}

@keyframes shineSweep {
  0% { left: -100%; }
  38%, 100% { left: 160%; }
}

/* Footer */
.footer {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.terms div {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.terms strong {
  color: var(--text);
}

.legal {
  font-size: 10.5px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.72);
  text-align: center;
}
