:root {
  --bg: #000000;
  --panel: #0C0C0E;
  --panel-2: #141416;
  --paper: #E6E6E6;
  --white: #FFFFFF;
  --dust: #8A8A90;
  --soft: #B9B7B2;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #00AEEF;
  --accent-2: #1E90FF;
  --accent-deep: #0077B6;
  --gold: #D4AF37;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Bebas Neue', 'Oswald', var(--sans);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --metal: linear-gradient(180deg, #ffffff 0%, #dcdcdc 32%, #8c8c8c 54%, #f4f4f4 72%, #a9a9a9 100%);
  --glow: 0 0 20px rgba(0, 174, 239, .55), inset 0 0 12px rgba(0, 174, 239, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  position: relative;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--paper);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* виньетка и «дым» на фоне */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -12%, #1a1a1e 0%, rgba(12,12,14,.5) 42%, transparent 72%),
    radial-gradient(90% 55% at 82% 108%, rgba(0, 119, 182, .16) 0%, transparent 60%),
    radial-gradient(80% 50% at 12% 108%, rgba(30, 144, 255, .10) 0%, transparent 60%);
}
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: #00131c; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.page {
  position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 0 auto; overflow-x: hidden;
  padding: 16px 16px calc(112px + env(safe-area-inset-bottom));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.label { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dust); }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 10px; z-index: 20; display: flex; align-items: center;
  min-height: 56px; padding: 0 20px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.5);
  animation: fadeUp .5s cubic-bezier(.22,1,.36,1) backwards;
}
.brand { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 23px; letter-spacing: .06em; line-height: 1; }
.brand i { font-style: normal; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand b { color: var(--accent); text-shadow: 0 0 14px rgba(0,174,239,.65); }

/* ---------- герой ---------- */
.hero {
  position: relative; margin-top: 2px; min-height: 290px; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); border-radius: 26px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255,255,255,.06) 0%, transparent 55%),
    linear-gradient(180deg, #0d0d10 0%, #050506 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  animation: fadeScale .6s cubic-bezier(.22,1,.36,1) .06s backwards;
}
.tank { position: absolute; left: 0; right: 0; bottom: 0; display: block; width: 100%; height: 60%; opacity: .9; }
.hero-text { position: relative; z-index: 1; padding: 40px 22px 0; text-align: center; }
.hero-text .label { color: #b9c4cc; }
.big {
  margin: 14px 0 10px; font-family: var(--display); font-size: clamp(58px, 20vw, 108px);
  font-weight: 400; line-height: .9; letter-spacing: .02em;
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255,255,255,.10));
}
.exact { font: 13px/1.5 var(--sans); color: var(--paper); letter-spacing: .02em; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.05); color: var(--paper); font-size: 14.5px; font-weight: 600;
  transition: transform .2s, box-shadow .25s, background .25s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(180deg, #3cc8ff 0%, #0090d4 100%);
  color: #00131c; border-color: #5fd8ff; font-weight: 700;
  box-shadow: var(--glow);
}
.btn.primary:active { box-shadow: 0 0 28px rgba(0,174,239,.85), inset 0 0 16px rgba(0,174,239,.5); }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .45; box-shadow: none; }
.btn.soft { background: rgba(0, 174, 239, .12); border-color: rgba(0, 174, 239, .38); color: #cfeeff; }
.btn.soft:active { background: rgba(0, 174, 239, .2); }

.avatar-lg {
  width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, #1c3f57, #0a1a26);
  border: 1px solid rgba(0, 174, 239, .35);
  box-shadow: 0 0 24px rgba(0, 174, 239, .22), inset 0 1px 0 rgba(255,255,255,.12);
  font-family: var(--display); font-size: 40px; color: var(--white);
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 15px;
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; color: var(--paper);
  background: rgba(255,255,255,.04);
}
.link-btn:active { transform: scale(.97); }

/* ---------- поиск ---------- */
.search {
  position: sticky; top: 10px; z-index: 15;
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 18px;
  height: 44px; min-height: 44px; max-height: 44px; overflow: hidden; flex: 0 0 auto;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(10, 11, 13, .82);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 8px 24px rgba(0,0,0,.45);
}
.search:focus-within { border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.09); }
.search input:focus::placeholder { color: transparent; }
.search svg { width: 18px; height: 18px; color: var(--dust); flex: 0 0 auto; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--paper); font-size: 15px; font-family: var(--sans); }
.search input::placeholder { color: var(--dust); }
.search .tgs { width: 18px; height: 18px; }

/* ---------- два блока: баланс / поддержка (aurora-карточки) ---------- */
.tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; margin-bottom: 4px; align-items: stretch; }
.tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 124px; padding: 18px; text-align: left; font-family: var(--sans);
  border: 1px solid rgba(255, 255, 255, .10); border-radius: 22px;
  background: linear-gradient(180deg, #0c0d12 0%, #08090c 100%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-clip-path: inset(0 round 22px); clip-path: inset(0 round 22px);
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .3s, border-color .3s;
}
/* мягкое цветное «северное сияние» внутри карточки */
.tile::before {
  content: ""; position: absolute; z-index: 0; inset: -12%;
  background:
    radial-gradient(58% 55% at 50% 2%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%),
    radial-gradient(62% 66% at 84% 100%, rgba(0, 174, 239, .68), rgba(122, 92, 255, .40) 48%, rgba(0, 0, 0, 0) 76%);
  filter: blur(22px);
  opacity: .9;
  transition: opacity .35s, transform .5s cubic-bezier(.22,1,.36,1);
}
/* стеклянный блик сверху */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 42%);
}
.tile.support::before {
  background:
    radial-gradient(58% 55% at 50% 2%, rgba(255, 255, 255, .60), rgba(255, 255, 255, 0) 70%),
    radial-gradient(62% 66% at 84% 100%, rgba(255, 196, 84, .72), rgba(255, 110, 60, .42) 48%, rgba(0, 0, 0, 0) 76%);
}
.tile:active { transform: scale(.975); border-color: rgba(255,255,255,.16); }
.tile:active::before { opacity: 1; transform: scale(1.06); }
.tile .cap { position: relative; z-index: 1; font-family: var(--sans); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.72); }
.tile .val { position: relative; z-index: 1; font-family: var(--sans); font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.01em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

/* нижний ряд: значение + кнопка «+» (без наложения) */
.tile .row { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.tile .plus {
  position: relative; flex: 0 0 auto; width: 46px; height: 46px;
  display: grid; place-items: center; overflow: visible;
  background: none; border: 0; box-shadow: none; padding: 0;
  transform: translate(4px, 6px);
  transition: transform .15s;
}
.tile .plus:active { transform: translate(4px, 6px) scale(.9); }
.tile .plus .plus-anim { display: block; width: 40px; height: 40px; font-size: 26px; font-weight: 700; color: #fff; text-align: center; line-height: 40px; }
.tile .plus .plus-anim svg { display: block; width: 100%; height: 100%; filter: brightness(0) invert(1); }

/* ---------- фильтры (чипы) ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .link-btn { flex: 0 0 auto; }

/* анимированные эмодзи (.tgs) */
.tgs { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.tgs svg { display: block; width: 100%; height: 100%; }
.tgs-ui { width: 18px; height: 18px; }
.tgs-flag { width: 20px; height: 20px; }
.ico .tgs { width: 26px; height: 26px; }
.tgs-fb { font-size: 16px; line-height: 20px; text-align: center; }

/* ---------- заголовки секций ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 24px 4px 10px; }
.sec-head .idx { font-family: var(--mono); font-size: 11px; color: var(--dust); }

/* ---------- карточка-строка ---------- */
.stack { display: grid; gap: 9px; }
.svc {
  display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; box-sizing: border-box; padding: 14px 16px; text-align: left;
  border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .25s, transform .12s, box-shadow .25s, background .25s;
}
.svc:active { transform: scale(.99); border-color: rgba(0,174,239,.5); box-shadow: 0 0 18px rgba(0,174,239,.22), inset 0 1px 0 rgba(255,255,255,.05); }
.svc .ico {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.svc .txt { min-width: 0; flex: 1; }
.svc .txt b { display: block; font-size: 14px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc .txt span { display: block; margin-top: 3px; font-size: 12px; color: var(--dust); }
.svc .right { text-align: right; flex: 0 1 auto; min-width: 0; }
.svc .pr { font-family: var(--mono); font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--white); }
.svc .pr.win { color: var(--accent); text-shadow: 0 0 14px rgba(0,174,239,.5); }
.svc .prov { margin-top: 3px; font-size: 10.5px; color: var(--gold); }
.svc.compact { padding: 12px 15px; border-radius: 16px; }
.svc.compact .ico { width: 40px; height: 40px; flex-basis: 40px; font-size: 18px; }

/* ---------- заказ ---------- */
.card {
  border: 1px solid var(--line); border-radius: 22px; padding: 20px;
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  animation: fadeUp .5s cubic-bezier(.22,1,.36,1) backwards;
}
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-of-type { border-bottom: 0; }
.kv .k { color: var(--dust); }
.kv .v { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.code-big {
  margin: 16px 0 4px; padding: 18px; border-radius: 16px; text-align: center;
  background: rgba(0, 174, 239, .06); border: 1px solid rgba(0,174,239,.28);
  box-shadow: inset 0 0 24px rgba(0,174,239,.10);
}
.code-big .cap { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--dust); }
.code-big .num { margin-top: 6px; font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--white); }
.code-big .sms { margin-top: 10px; font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--accent); letter-spacing: .12em; text-shadow: 0 0 18px rgba(0,174,239,.7); }
.waiting { margin-top: 10px; font-size: 12.5px; color: var(--dust); text-align: center; }

/* ---------- таббар ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.7) 45%, #000 100%);
  pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto; display: flex; gap: 4px; padding: 7px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.55);
}
.tab { position: relative; display: flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--dust); transition: color .25s; }
.tab .tgs { transition: transform .35s cubic-bezier(.22,1,.36,1); }
.tab.on { color: var(--white); }
.tab.on .tgs { animation: tabPop .55s cubic-bezier(.22,1,.36,1) both; }
@keyframes tabPop {
  0% { transform: scale(.7); }
  55% { transform: scale(1.5); }
  78% { transform: scale(1.22); }
  100% { transform: scale(1.32); }
}

/* ---------- разное ---------- */
.empty { padding: 46px 12px; text-align: center; color: var(--dust); font-size: 13.5px; }
.screen { animation: fadeUp .32s cubic-bezier(.22,1,.36,1); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeScale { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}