/* CSS 3D device frames and compact in-phone UIs */

.stage {
  position: relative;
  width: 680px;
  height: 620px;
  perspective: 1800px;
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 620px;
  height: 420px;
  transform: translate(-50%, -50%) rotateX(62deg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.orbit-2 {
  width: 780px;
  height: 520px;
  border-color: rgba(255,255,255,0.04);
}

.stage-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 520px;
  height: 360px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(110, 126, 210, 0.22), rgba(110,126,210,0.04) 42%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.stage-floor {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 460px;
  height: 80px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,0.7), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
}

.device {
  position: absolute;
  transform-style: preserve-3d;
  --rx: 8deg;
  --ry: -18deg;
  --rz: -4deg;
  --tx: 0px;
  --ty: 0px;
  --tz: 0px;
  transform: translate3d(var(--tx), var(--ty), var(--tz)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)) scale(var(--sc, 1));
}

.device-body {
  width: 236px;
  height: 492px;
  border-radius: 40px;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03) 28%, #0a0a0c 52%, #050506);
  box-shadow:
    0 50px 70px -24px rgba(0,0,0,0.9),
    0 18px 30px -16px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(0,0,0,0.55);
  position: relative;
}
.device-body::before,
.device-body::after {
  content: "";
  position: absolute;
  right: -2px;
  width: 2px;
  border-radius: 1px;
  background: #1c1c20;
}
.device-body::before { top: 112px; height: 42px; }
.device-body::after { top: 162px; height: 64px; }
.device-silent {
  position: absolute;
  left: -2px;
  top: 96px;
  width: 2px;
  height: 22px;
  border-radius: 1px;
  background: #1c1c20;
}

.device-glow-edge {
  position: absolute;
  inset: -1px;
  border-radius: 41px;
  pointer-events: none;
  box-shadow:
    0 0 40px rgba(160, 176, 255, 0.14),
    0 0 80px rgba(160, 176, 255, 0.06);
}

.device-inner {
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: #07070b;
  position: relative;
  display: flex;
  flex-direction: column;
}

.island {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 6;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

.sb {
  height: 38px;
  padding: 12px 16px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  position: relative;
  z-index: 5;
  flex: none;
}
.sb-ico { display: flex; gap: 4px; align-items: center; padding-top: 1px; }

.app { flex: 1; padding: 6px 12px 14px; display: flex; flex-direction: column; min-height: 0; color: #ecece8; }

/* --- Trojan trading --- */
.app-trade { background: radial-gradient(ellipse at 50% 0%, #12181c, #07090b 55%); }
.trade-top { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.trade-pair { font-size: 12px; font-weight: 560; letter-spacing: -0.02em; }
.trade-pair span { color: #8d97a0; font-weight: 450; }
.trade-chip { font-size: 9px; color: #8fbf9a; background: rgba(80,160,110,0.12); padding: 2px 6px; border-radius: 999px; }
.trade-price { font-size: 28px; font-weight: 520; letter-spacing: -0.05em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.trade-chg { font-size: 11px; color: #7dca9a; margin-top: 2px; }
.tfs { display: flex; gap: 4px; margin: 10px 0 8px; }
.tfs b {
  font-weight: 500; font-size: 9.5px; color: #8d97a0;
  padding: 3px 7px; border-radius: 6px;
}
.tfs b.on { background: rgba(255,255,255,0.07); color: #fff; }
.candles { display: flex; align-items: flex-end; gap: 3.5px; height: 132px; padding: 4px 0 2px; }
.candles i {
  position: relative;
  width: 7px;
  height: calc(var(--h) * 1px);
  background: #3e9a72;
  border-radius: 1px;
  flex: none;
}
.candles i.dn { background: #b15a5a; }
.candles i::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: currentColor;
  color: inherit;
  height: calc(var(--w) * 1px);
  top: calc(var(--o, -8) * 1px);
  transform: translateX(-50%);
  opacity: 0.7;
}
.candles i.dn::before { color: #b15a5a; }
.candles i.up::before { color: #3e9a72; }
.book-mini { display:none; }
.book-mini .row { display: flex; justify-content: space-between; font-size: 9px; color: #8d97a0; font-variant-numeric: tabular-nums; font-family: "Geist Mono", ui-monospace, monospace; }
.book-mini .g { color: #7dca9a; }
.book-mini .r { color: #e07a7a; }
.trade-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: auto; }
.trade-cta b {
  display: grid; place-items: center; height: 32px; border-radius: 9px;
  font-size: 11.5px; font-weight: 560;
}
.trade-cta .buy { background: #1f6b4a; color: #d9ffe9; }
.trade-cta .sell { background: #6b2a2a; color: #ffd9d9; }

/* --- Wallet --- */
.app-wallet { background: radial-gradient(ellipse at 50% 0%, #16131c, #08070b 58%); }
.wal-label { font-size: 10.5px; color: #9a93a8; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; margin-top: 6px; }
.wal-total { font-size: 26px; font-weight: 520; letter-spacing: -0.05em; text-align: center; margin-top: 4px; }
.wal-sub { text-align: center; font-size: 11px; color: #8fbf9a; margin-top: 2px; }
.wal-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 8px 14px; }
.wal-acts i {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-style: normal; font-size: 9.5px; color: #c9c4d4;
}
.wal-acts i::before {
  content: "";
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  background-repeat: no-repeat;
  background-position: center;
}
.wal-acts i.send::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23eee' stroke-width='1.6'><path d='M7 11V3M3.5 6.5 7 3l3.5 3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255,255,255,0.06);
}
.wal-acts i.recv::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23eee' stroke-width='1.6'><path d='M7 3v8M3.5 7.5 7 11l3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255,255,255,0.06);
}
.wal-acts i.swap::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23eee' stroke-width='1.6'><path d='M3 6h8M8 3l3 3-3 3M11 9H3M6 12 3 9l3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255,255,255,0.06);
}
.asset {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 4px; border-top: 1px solid rgba(255,255,255,0.06);
}
.asset .ic {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 650; color: #0b0b0c;
}
.asset .nm { flex: 1; }
.asset .nm b { display: block; font-size: 11.5px; font-weight: 540; }
.asset .nm span { font-size: 9.5px; color: #8b8498; }
.asset .am { text-align: right; font-size: 11px; font-weight: 500; white-space: nowrap; }
.asset .am span { display: block; font-size: 9.5px; color: #8b8498; font-weight: 400; }

/* --- Pulse --- */
.app-pulse { background: radial-gradient(ellipse at 50% 0%, #161016, #0a0709 58%); }
.pulse-head { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.pulse-logo { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; }
.pulse-logo em { font-style: normal; color: #e39a8a; }
.pulse-card {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(227,154,138,0.08), rgba(255,255,255,0.03));
  box-shadow: inset 0 0 0 1px rgba(227,154,138,0.16);
}
.pulse-card .t { font-size: 10px; color: #b9a6a0; letter-spacing: 0.08em; text-transform: uppercase; }
.pulse-card .v { font-size: 22px; font-weight: 520; letter-spacing: -0.04em; margin: 4px 0 10px; }
.wave { width: 100%; height: 54px; }
.sig { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-top: 1px solid rgba(255,255,255,0.06); }
.sig .dotp { width: 6px; height: 6px; border-radius: 50%; background: #e39a8a; flex: none; }
.sig b { font-size: 11.5px; font-weight: 520; display: block; }
.sig span { font-size: 10px; color: #9a8b86; }

.device.lg .device-body { width: 270px; height: 560px; border-radius: 44px; padding: 9px; }
.device.lg .device-inner { border-radius: 36px; }
.device.lg .trade-price { font-size: 32px; }
.device.lg .candles { height: 168px; }

@media (max-width: 860px) {
  .stage { width: 100%; height: 420px; }
  .device-body { width: 180px; height: 376px; border-radius: 30px; }
  .device-inner { border-radius: 24px; }
}
