/* Symphony — Telegram-style mockup */

:root {
  --bot-name: "Symphony";
  --bg-page: #07090d;
  --bg-chat: #0e1621;
  --bg-header: #17212b;
  --bg-kb: #17212b;
  --bg-bubble: #182533;
  --bg-bubble-out: #2b5278;
  --bg-btn: #253545;
  --bg-btn-hover: #2e4052;
  --bg-composer: #17212b;
  --bg-input: #242f3d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef4;
  --text-dim: #8b9aab;
  --text-faint: #6a7a8c;
  --accent: #6ab3f3;
  --accent-2: #8ad4ff;
  --gold: #e2b86a;
  --green: #5ad67d;
  --green-dim: #3d9a58;
  --red: #f07171;
  --warn: #f0c36a;
  --shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "ui-monospace", "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
  --r-phone: 52px;
  --r-btn: 11px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(80, 150, 200, 0.16), transparent 55%),
    radial-gradient(800px 500px at 80% 110%, rgba(226, 184, 106, 0.08), transparent 50%),
    var(--bg-page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  padding: 32px 20px 40px;
  gap: 22px;
}

.brand {
  text-align: center;
  user-select: none;
}
.brand h1 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c9d4de;
}
.brand p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}
.brand .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 7px;
  vertical-align: 1px;
  box-shadow: 0 0 0 4px rgba(226, 184, 106, 0.15);
}

.jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-content: start;
  align-self: start;
  max-width: 420px;
  height: auto;
}
.jumps button, .jumps a {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text-dim);
  font: 500 12px/1 var(--font);
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.jumps button:hover, .jumps a:hover { color: var(--text); border-color: rgba(106,179,243,0.4); }

.stage { display: flex; flex-direction: column; align-items: center; }

.phone {
  width: 390px;
  height: 844px;
  background: #000;
  border-radius: var(--r-phone);
  padding: 11px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.08), inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-chat);
  border-radius: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}
.phone-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(rgba(255,255,255,0.03) 0.5px, transparent 0.6px);
  background-size: 3px 3px;
  z-index: 0;
}

.status-bar {
  position: relative;
  z-index: 3;
  height: 54px;
  padding: 14px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(to bottom, var(--bg-header), var(--bg-header));
  flex-shrink: 0;
}
.status-bar .icons { display: flex; gap: 6px; align-items: center; }
.status-bar svg { display: block; }

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 30px;
  background: #000;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
}

.tg-header {
  position: relative;
  z-index: 3;
  background: var(--bg-header);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 10px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon-btn:hover { background: rgba(106,179,243,0.08); }
.icon-btn svg { width: 22px; height: 22px; }

.peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.peer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.peer-avatar img { width: 100%; height: 100%; display: block; }
.peer-meta { min-width: 0; }
.peer-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.peer-name .check {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.peer-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 1px;
}

.chat {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(42, 90, 130, 0.12), transparent 50%),
    var(--bg-chat);
}
.chat::-webkit-scrollbar { width: 0; }

.day-chip {
  align-self: center;
  background: rgba(24, 37, 51, 0.92);
  color: #9bb0c2;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 10px;
  margin: 4px 0 2px;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 92%;
  animation: rise 0.28s ease both;
}
.msg.bot { align-self: flex-start; }
.msg.me { align-self: flex-end; }
.msg.system { align-self: center; max-width: 86%; animation: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bubble {
  background: var(--bg-bubble);
  color: var(--text);
  padding: 8px 10px 6px;
  border-radius: 16px 16px 16px 5px;
  position: relative;
  font-size: 14.5px;
  line-height: 1.42;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.msg.me .bubble {
  background: var(--bg-bubble-out);
  border-radius: 16px 16px 5px 16px;
}
.bubble .time {
  float: right;
  margin: 6px 0 -1px 10px;
  font-size: 11px;
  color: #7f93a6;
  font-weight: 450;
}
.msg.me .bubble .time { color: #9dc0dd; }
.bubble .time.ticks { display: inline-flex; align-items: center; gap: 2px; }
.bubble strong { font-weight: 600; }
.bubble p + p { margin-top: 8px; }

.sys {
  background: rgba(24, 37, 51, 0.9);
  color: #9bb0c2;
  font-size: 12.5px;
  padding: 6px 11px;
  border-radius: 12px;
  text-align: center;
}

.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(226, 184, 106, 0.12);
  border: 1px solid rgba(226, 184, 106, 0.25);
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: 1px;
}

.card {
  margin-top: 8px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 11px;
}
.card.flush { margin-top: 6px; }
.card-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card-hd h3 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.card-hd h3 span.sym { color: var(--accent-2); }
.card-hd .sub, .muted { color: var(--text-dim); font-size: 12.5px; font-weight: 450; }

.kvs { display: grid; gap: 5px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.kv {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13.5px;
}
.kv .k { color: var(--text-dim); }
.kv .v { font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kv .v.mono, .mono { font-family: var(--mono); font-size: 12.5px; font-weight: 500; }
.sep { height: 1px; background: var(--line); margin: 8px 0; }

.pnl.up, .pos { color: var(--green); font-weight: 600; }
.pnl.down, .neg { color: var(--red); font-weight: 600; }
.gold { color: var(--gold); }

.hero-bal { text-align: left; padding: 4px 0 2px; }
.hero-bal .amt {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hero-bal .usd {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 8px 8px 10px;
  margin-top: 8px;
}
.addr-row code {
  flex: 1;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #d5e2ee;
  word-break: break-all;
  line-height: 1.35;
}
.copy-btn, .mini-btn {
  appearance: none;
  border: 0;
  background: rgba(106,179,243,0.12);
  color: var(--accent);
  font: 600 11.5px/1 var(--font);
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:hover, .mini-btn:hover { background: rgba(106,179,243,0.2); }

.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 10px 0 4px;
}
.qr-tile {
  width: 168px;
  height: 168px;
  background: #f4f7fb;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.qr-tile img { width: 100%; height: 100%; display: block; }

.wallet-row, .pos-row, .mkt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.wallet-row:first-of-type, .pos-row:first-of-type, .mkt-row:first-of-type { border-top: 0; }
.wallet-row .nm, .pos-row .nm, .mkt-row .nm {
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wallet-row .meta, .pos-row .meta, .mkt-row .meta {
  grid-column: 1;
  font-size: 12px;
  color: var(--text-dim);
}
.wallet-row .bal, .pos-row .bal, .mkt-row .price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  text-align: right;
}
.mark {
  font-size: 12px;
  opacity: 0.95;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
}
.toggle-row .lab { font-size: 13.5px; font-weight: 550; }
.toggle-row .hint { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.switch {
  --w: 42px;
  width: var(--w);
  height: 26px;
  border-radius: 99px;
  background: #3a4a5a;
  border: 0;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.switch.on { background: #3d9aed; }
.switch.on::after { transform: translateX(16px); }

.seg {
  display: flex;
  background: rgba(0,0,0,0.28);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  margin: 8px 0 2px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: 600 12px/1 var(--font);
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
}
.seg button.on { background: #2c3f52; color: var(--text); }

.note, .warn-box, .ok-box {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-dim);
  margin-top: 8px;
}
.warn-box {
  color: #f3d7a0;
  background: rgba(240, 195, 106, 0.1);
  border: 1px solid rgba(240, 195, 106, 0.22);
  padding: 8px 10px;
  border-radius: 10px;
}
.ok-box {
  color: #b8f0c7;
  background: rgba(90, 214, 125, 0.1);
  border: 1px solid rgba(90, 214, 125, 0.22);
  padding: 8px 10px;
  border-radius: 10px;
}
.fee-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  font-size: 13px;
}

.progress {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 2px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ab3f3, #e2b86a);
  border-radius: 99px;
}

.inline-kb {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  width: min(320px, 92vw);
  align-self: flex-start;
}
.ik-row { display: flex; gap: 5px; }
.ik-btn {
  flex: 1;
  appearance: none;
  border: 0;
  background: var(--bg-btn);
  color: var(--accent);
  font: 575 13.5px/1.2 var(--font);
  padding: 9px 8px;
  border-radius: var(--r-btn);
  cursor: pointer;
  text-align: center;
  transition: background 0.12s ease, transform 0.08s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}
.ik-btn:hover { background: var(--bg-btn-hover); }
.ik-btn:active { transform: scale(0.98); }
.ik-btn.primary { color: #d8f0ff; background: #1e4d75; }
.ik-btn.primary:hover { background: #245a86; }
.ik-btn.danger { color: #ffb3b3; }
.ik-btn.gold { color: var(--gold); }
.ik-btn:disabled { opacity: 0.45; cursor: default; }

.composer-wrap {
  position: relative;
  z-index: 2;
  background: var(--bg-composer);
  border-top: 1px solid rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.rkb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px 8px 4px;
}
.rkb.hidden { display: none; }
.rkb button {
  appearance: none;
  border: 0;
  background: #23303e;
  color: var(--text);
  font: 550 14.5px/1 var(--font);
  padding: 11px 8px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
.rkb button:hover { background: #2b3a4a; }
.rkb button:active { transform: scale(0.985); }

.composer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 8px;
}
.composer .round {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
}
.composer .field {
  flex: 1;
  background: var(--bg-input);
  border-radius: 18px;
  padding: 0 14px;
  height: 36px;
  display: flex;
  align-items: center;
  min-width: 0;
}
.composer .field input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 450 15px/1 var(--font);
  outline: none;
}
.composer .field input::placeholder { color: #6e7f90; }

.home-ind {
  height: 18px;
  background: var(--bg-composer);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-shrink: 0;
}
.home-ind span {
  width: 128px;
  height: 5px;
  border-radius: 99px;
  background: #fff;
  opacity: 0.85;
  margin-top: 4px;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  background: var(--bg-bubble);
  padding: 10px 14px;
  border-radius: 14px;
  margin-top: 2px;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7f93a6;
  animation: blink 1.1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 28, 38, 0.96);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 8;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.help-list { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.help-list h4 { font-size: 13.5px; font-weight: 650; }
.help-list p { font-size: 13px; color: #c5d0da; }

.num-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.num-pad button, .amt-grid button {
  appearance: none;
  border: 0;
  background: #223140;
  color: var(--text);
  font: 600 14px/1 var(--font);
  padding: 10px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.amt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.custom-amt {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.custom-amt .val { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; }
.custom-amt button.step {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #223140;
  color: var(--text);
  font: 600 18px/1 var(--font);
  cursor: pointer;
}

.foot-note {
  margin-top: 28px;
  max-width: 390px;
  text-align: center;
  font-size: 12px;
  color: #6a7684;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .page { padding: 0; gap: 0; }
  .brand, .jumps, .foot-note { display: none; }
  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .phone-screen { border-radius: 0; }
}
