@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;650;700;750;800&display=swap');

:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f6f7f8;
  background: #000;
  font-synthesis: none;
  --muted: #b1b6c0;
  --cyan: #02bcf3;
  --blue: #0084ff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .42; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
button { border: 0; background: none; }
[hidden] { display: none !important; }
p, h1, h2, h3 { margin: 0; }
svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.app { max-width: 520px; min-height: 100dvh; margin: auto; padding: max(22px, env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom)); }
.header { display: flex; justify-content: space-between; align-items: center; padding: 8px 5px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 29px; font-weight: 800; font-style: italic; letter-spacing: -.8px; padding: 0; }
.brand-blue { color: #008eff; }
.brand-mark { width: 49px; height: 44px; background: linear-gradient(150deg, #03ddfc 20%, #0083f5 85%); clip-path: polygon(99% 0, 32% 45%, 79% 43%, 69% 65%, 0 100%, 49% 56%, 4% 59%, 14% 35%); }
.profile-shortcut { border: 1px solid #30343a; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; }
.profile-shortcut svg { width: 29px; height: 29px; }
.muted { color: var(--muted); }
.balance-block { text-align: center; margin: 7px 0 24px; }
.balance-block > .muted { font-size: 16px; margin-bottom: 7px; }
.balance-number { display: flex; align-items: baseline; justify-content: center; gap: 8px; font-size: clamp(32px, 10vw, 44px); font-weight: 750; letter-spacing: -1.5px; overflow-wrap: anywhere; }
.balance-currency { font-size: 25px; font-weight: 650; letter-spacing: -.6px; }
.balance-equivalent { color: #c7ccd4; margin-top: 8px; font-size: 17px; font-weight: 500; }
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.button { display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 49px; padding: 12px 15px; border-radius: 40px; font-size: 18px; font-weight: 650; transition: filter .15s, transform .15s; }
.button:active { transform: scale(.98); }
.primary { background: linear-gradient(110deg, #0078ff, #008aff); color: #fff; }
.primary:hover:not(:disabled) { filter: brightness(1.12); }
.secondary { background: linear-gradient(135deg, #11151a, #050708); border: 1px solid #373d46; }
.button svg { width: 27px; height: 27px; flex: none; }
.exchange-card { margin-top: 28px; padding: 23px 14px 16px; border: 1px solid #42464b; border-radius: 28px; }
.exchange-card-top { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 25px; gap: 8px; }
.exchange-card-top p { font-size: 15px; margin-bottom: 15px; }
.exchange-card-top h1 { font-size: clamp(18px, 5.4vw, 26px); font-weight: 700; letter-spacing: -.5px; }
.exchange-art { color: #009cff; width: 70px; height: 70px; stroke-width: 2; flex: none; transform: rotate(-10deg); }
.operations-header { margin: 27px 3px 0; display: flex; justify-content: space-between; align-items: center; }
.operations-header h2 { font-size: 18px; font-weight: 650; }
.operations-header button { font-size: 17px; color: var(--cyan); padding: 6px 0 6px 15px; }
.operations-header button span { font-size: 26px; vertical-align: -1px; }
.empty-state { text-align: center; padding: 36px 0 20px; }
.layers-icon { width: 61px; height: 61px; margin-bottom: 20px; stroke-width: 1.5; }
.empty-state h3 { font-size: 17px; font-weight: 650; margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.bottom-nav { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 28px), 492px); display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #33363b; border-radius: 38px; background: #060809ed; backdrop-filter: blur(18px); padding: 11px 10px 10px; z-index: 10; }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 5px; font-size: 12px; }
.bottom-nav svg { width: 27px; height: 27px; }
.bottom-nav button.active { color: var(--cyan); }
.bottom-nav button.active svg { filter: drop-shadow(0 0 6px #00afff40); }
.bottom-nav button.active [href="#i-home"] { fill: #00b9f0; }
.exchange-title { text-align: center; font-size: clamp(25px, 7vw, 32px); letter-spacing: -.8px; margin: 10px 0 23px; font-weight: 750; }
.balance-pill, .rate-pill { width: fit-content; margin-left: auto; margin-right: auto; background: #11171d; color: #bfc6d2; padding: 10px 17px; border-radius: 40px; font-size: 16px; }
.balance-pill strong { font-weight: 600; color: #e8ecf1; }
.amounts { position: relative; margin-top: 44px; }
.amount-card { padding: 13px 18px 24px; border: 1px solid #444b55; border-radius: 26px; background: linear-gradient(125deg, #0b0f14, #070a0d); }
.amount-card-top { display: flex; align-items: center; justify-content: space-between; min-height: 33px; margin-bottom: 9px; }
.amount-card label, .amount-card > p { color: #b7bdc8; font-size: 17px; font-weight: 500; }
#max-amount { background: #0c2547; border-radius: 30px; padding: 6px 17px; color: #00b8f4; font-size: 15px; font-weight: 600; }
.amount-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#amount, #rub-amount { background: transparent; color: #fff; border: 0; width: 100%; min-width: 0; font-size: clamp(27px, 8vw, 35px); font-weight: 700; letter-spacing: -.6px; padding: 0; }
#amount { caret-color: var(--cyan); border-radius: 3px; }
#amount::placeholder { color: #fff; }
#rub-amount { overflow-wrap: anywhere; }
.currency-label { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; flex: none; }
.coin { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; font-size: 24px; font-weight: 500; }
.tether { background: #00a98b; color: #e6fffa; }
.ruble { background: #004db7; color: #fff; font-size: 22px; }
.receive-card { margin-top: 23px; padding-top: 24px; }
.receive-card > p { margin-bottom: 12px; }
.direction-arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 42px; width: 42px; border: 1px solid #343a43; border-radius: 50%; background: #090d12; display: grid; place-items: center; box-shadow: 0 0 0 3px #000; }
.direction-arrow svg { width: 26px; height: 26px; }
.rate-pill { margin-top: 21px; text-align: center; }
.rate-pill strong { color: #f6f7f8; font-weight: 600; }
.minimum { text-align: center; color: #aeb5c0; font-size: 13px; margin-top: 16px; }
.exchange-error { text-align: center; color: #ff9d9d; min-height: 20px; font-size: 13px; line-height: 1.4; margin-top: 8px; }
.continue-button { margin-top: 5px; min-height: 53px; font-size: 20px; }
.status { color: var(--muted); text-align: center; margin: 100px 15px 18px; line-height: 1.6; }
.retry { display: block; color: var(--cyan); margin: 0 auto; }
#preview-note { color: #a9c7dd; font-size: 11px; text-align: center; padding-bottom: 14px; }
.profile-card { border: 1px solid #333b45; border-radius: 26px; background: #090d12; padding: 25px; margin: 30px 0 24px; text-align: center; }
.profile-avatar { color: var(--cyan); border-radius: 50%; border: 1px solid #263c4e; margin: 0 auto 15px; width: 64px; height: 64px; display: grid; place-items: center; }
.profile-card h2 { overflow-wrap: anywhere; font-size: 22px; }
.profile-card > p { margin-top: 8px; }
dl { margin: 30px 0 0; text-align: left; font-size: 14px; }
dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 17px 0; border-top: 1px solid #242c34; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
dialog { color: #f6f7f8; background: #10151c; border: 1px solid #35404d; border-radius: 26px; padding: 27px; width: min(90vw, 400px); }
dialog::backdrop { background: #000b; backdrop-filter: blur(5px); }
dialog h2 { font-size: 22px; }
dialog p { color: #bec6d1; line-height: 1.6; margin: 17px 0 23px; white-space: pre-line; }
@media (min-width: 600px) { .app { padding-top: 32px; } }
@media (max-height: 850px) {
  .empty-state { padding-top: 22px; }
  .layers-icon { width: 49px; height: 49px; margin-bottom: 14px; }
  .operations-header { margin-top: 20px; }
  .header { padding-bottom: 18px; }
}
@media (max-height: 760px) {
  .exchange-title { margin-top: 5px; margin-bottom: 16px; }
  .amounts { margin-top: 28px; }
  .amount-card { padding-bottom: 18px; }
  .receive-card { padding-top: 18px; margin-top: 20px; }
  .rate-pill { margin-top: 15px; }
  .minimum { margin-top: 12px; }
}
@media (max-width: 350px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 25px; }
  .button { font-size: 16px; gap: 7px; }
  .currency-label { font-size: 15px; gap: 5px; }
  .coin { width: 24px; height: 24px; }
  .amount-card { padding-left: 13px; padding-right: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
