:root {
  --bg: #05070d;
  --glass: rgba(16, 19, 30, 0.62);
  --glass-2: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f1e8;
  --muted: #9aa0ae;
  --gold: #f5c542;
  --gold-2: #d4a017;
  --bull: #16c784;
  --bear: #ea3943;
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; overflow-x: hidden; }
[hidden] { display: none !important; }

/* --- Fon: rasm + effektlar --------------------------------------------- */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #05070d; transition: filter 1s ease, opacity 1s ease; }
.stage::before { content: ""; position: absolute; inset: -40px; background: url(assets/intro.jpg) center / cover; filter: blur(28px) brightness(.45); }
.art { position: absolute; left: 50%; top: 50%; width: max(100vw, 100vh); aspect-ratio: 1; transform: translate(-50%, -47%); }
.art-inner { position: absolute; inset: 0; animation: kenburns 22s ease-in-out infinite alternate;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.04); }
.art img { width: 100%; height: 100%; display: block; }
.eye { position: absolute; left: 49.3%; top: 36.6%; width: 13%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(220,250,255,.95) 0%, rgba(120,220,255,.55) 18%, rgba(80,170,255,0) 62%);
  mix-blend-mode: screen; animation: eye 2.6s ease-in-out infinite; }
.sweep { position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(255,214,120,.16) 47%, rgba(120,240,255,.12) 52%, transparent 64%) no-repeat;
  background-size: 250% 100%; animation: sweep 7s ease-in-out infinite; }
#fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 80% at 50% 38%, transparent 45%, rgba(4,6,11,.55) 100%),
    linear-gradient(180deg, rgba(4,6,11,.35) 0%, transparent 18%, transparent 52%, rgba(4,6,11,.88) 80%, #04060b 100%); }
.stage.dim { filter: blur(6px) saturate(.8); opacity: .28; }
@keyframes kenburns { from { scale: 1; } to { scale: 1.08; } }
@keyframes eye { 0%, 100% { opacity: .55; scale: .85; } 50% { opacity: 1; scale: 1.15; } }
@keyframes sweep { 0% { background-position: 130% 0; } 60%, 100% { background-position: -30% 0; } }
/* Telefon: rasm butun eni bilan yuqorida, ikkala hayvon ham ko'rinadi */
@media (max-aspect-ratio: 9/10) {
  .art { width: 122vw; top: 0; transform: translate(-50%, max(2vh, calc(38vh - 61vw)));
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 78%, transparent 100%); }
}

/* --- Kirish ---------------------------------------------------- */
.intro { position: fixed; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 16px calc(36px + env(safe-area-inset-bottom)); text-align: center; }
.intro-text { max-width: 560px; display: flex; flex-direction: column; align-items: center; gap: 22px;
  opacity: 0; transform: translateY(24px); transition: all 1.1s cubic-bezier(.2,.8,.2,1); }
.intro.show .intro-text { opacity: 1; transform: none; }
.intro.leave { opacity: 0; transition: opacity .6s; pointer-events: none; }
.brand { margin: 0; font-family: Unbounded, Inter, system-ui, sans-serif; font-weight: 800; letter-spacing: .04em; line-height: 1.05;
  font-size: clamp(34px, 8.6vw, 64px); text-wrap: balance;
  background-image: linear-gradient(180deg, #fff8dc 0%, #ffd66b 45%, #c8901f 100%),
    linear-gradient(110deg, transparent 40%, rgba(255,255,255,.95) 50%, transparent 60%);
  background-size: 100% 100%, 250% 100%; background-blend-mode: overlay;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90,60,10,.6)) drop-shadow(0 10px 40px rgba(245,197,66,.45));
  animation: shine 6s ease-in-out infinite; }
.fine { color: #a7adbb; font-size: 12px; margin: 0; letter-spacing: .02em; }

/* --- Ilova ------------------------------------------------------ */
.app { position: relative; z-index: 2; max-width: 560px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); animation: rise .6s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hello { color: var(--muted); font-size: 13px; }
.brand-sm { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--gold); }
.plan-pill { padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid rgba(245,197,66,.4); color: var(--gold); background: rgba(245,197,66,.08); }
.plan-pill.pro { color: #8fd3ff; border-color: rgba(143,211,255,.4); background: rgba(143,211,255,.08); }
.plan-pill.max { color: #1a1300; background: linear-gradient(135deg, #fff1b8, var(--gold)); border: 0; }
.demo { font-size: 12px; color: #ffd98a; background: rgba(245,197,66,.08); border: 1px dashed rgba(245,197,66,.35);
  padding: 8px 12px; border-radius: 12px; margin-bottom: 12px; }

h2 { font-size: 15px; margin: 22px 2px 10px; color: #e8e3d3; font-weight: 700; }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); margin-bottom: 12px; }
.card-h { font-weight: 700; margin-bottom: 10px; }
.card-h.row { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 16px; }

.btn { appearance: none; border: 1px solid var(--line); background: var(--glass-2); color: var(--text); font: inherit; font-weight: 600;
  padding: 10px 14px; border-radius: 12px; cursor: pointer; transition: transform .12s, filter .2s; }
.btn:active { transform: scale(.97); }
.btn.gold { background: linear-gradient(135deg, #ffe58f, var(--gold) 45%, var(--gold-2)); color: #1a1300; border: 0;
  box-shadow: 0 8px 28px rgba(245,197,66,.28); }
.btn.big { padding: 15px 44px; font-size: 17px; border-radius: 16px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { filter: grayscale(1) brightness(.7); }

/* hero */
.hero { display: flex; gap: 16px; align-items: center; }
.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: rgba(255,255,255,.08); }
.ring .bar { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1s ease; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 24px; }
.ring-text span { font-size: 11px; color: var(--muted); }
.hero-side { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.big-num { font-size: 28px; font-weight: 800; }
.pos { color: var(--bull); } .neg { color: var(--bear); }

.tf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tf { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 12px; backdrop-filter: blur(12px); }
.tf .h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.tf p { margin: 6px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.chip { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; letter-spacing: .04em; }
.chip.BUY { background: rgba(22,199,132,.15); color: var(--bull); }
.chip.SELL { background: rgba(234,57,67,.15); color: var(--bear); }
.chip.NO_TRADE { background: rgba(255,255,255,.08); color: #c9c9c9; }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(12px);
  display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.item .l { min-width: 0; }
.item .t { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item .s { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.item .r { text-align: right; font-weight: 700; white-space: nowrap; }
.empty { color: var(--muted); font-size: 13px; padding: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 12px; backdrop-filter: blur(12px); }
.tile span { display: block; color: var(--muted); font-size: 12px; }
.tile b { font-size: 22px; }
#equity { width: 100%; display: block; }

.seg { display: flex; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 8px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: rgba(245,197,66,.14); color: var(--gold); }

/* referal */
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 14px; }
.ref-stats b { display: block; font-size: 24px; color: var(--gold); }
.ref-stats span { font-size: 11px; color: var(--muted); }
.link-box { display: flex; gap: 8px; }
.link-box input { flex: 1; min-width: 0; }
input, select { background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 10px 12px; font: inherit; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 10px; }
.pod { text-align: center; border-radius: 16px 16px 8px 8px; padding: 12px 6px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); }
.pod .medal { font-size: 28px; }
.pod .n { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .c { color: var(--gold); font-weight: 800; }
.pod.p1 { padding-top: 22px; border-color: rgba(245,197,66,.5); box-shadow: 0 0 30px rgba(245,197,66,.15) inset; }
.pod.p2 { padding-top: 16px; }
.rank { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); font-weight: 700; font-size: 13px; }
.me { border-color: rgba(245,197,66,.5); }

/* panel */
.profile { display: flex; align-items: center; gap: 12px; }
.profile > div:nth-child(2) { flex: 1; min-width: 0; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 22px;
  background: linear-gradient(135deg, var(--bull), var(--gold) 50%, var(--bear)); color: #111; }
.p-name { font-weight: 800; font-size: 17px; }
.plans { display: grid; gap: 10px; margin-bottom: 12px; }
.plan { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(14px);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan.max { border-color: rgba(245,197,66,.55); box-shadow: 0 0 40px rgba(245,197,66,.12) inset; }
.plan .name { font-weight: 800; font-size: 18px; }
.plan .lim { color: var(--muted); font-size: 13px; }
.plan .price { text-align: right; }
.plan .price b { font-size: 20px; display: block; }
.plan .price s { color: var(--muted); font-size: 12px; }
.plan .off { color: var(--bull); font-size: 12px; font-weight: 700; }
.plan .tag { position: absolute; top: -9px; left: 14px; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 99px;
  background: var(--gold); color: #1a1300; letter-spacing: .05em; }
.form { display: grid; gap: 8px; margin-top: 10px; }
.sym-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sym-chips button { appearance: none; border: 1px solid var(--line); background: var(--glass-2); color: var(--muted);
  font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.sym-chips button.on { border-color: var(--gold); color: var(--text); background: rgba(245, 197, 66, .14); }
.durations { margin: 0 0 12px; }
.durations button { flex: 1; text-align: center; }
.plan .lim.pos { color: var(--bull); font-weight: 700; }
.challenge .count { font-size: 22px; font-weight: 800; color: var(--gold); letter-spacing: .02em; }
.challenge .wins { display: flex; gap: 6px; margin-top: 8px; font-size: 22px; }
.challenge .wins span { opacity: .25; }
.challenge .wins span.on { opacity: 1; }
.broker-links { display: grid; gap: 8px; margin: 10px 0; }
.broker-links .btn { width: 100%; }
.toggle { width: 48px; height: 28px; border-radius: 99px; border: 0; background: rgba(255,255,255,.15); position: relative; cursor: pointer; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle[aria-pressed="true"] { background: var(--bull); }
.toggle[aria-pressed="true"]::after { left: 23px; }
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; display: flex; flex-direction: column; gap: 10px; }
.timeline div { font-size: 13px; position: relative; }
.timeline div::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline small { color: var(--muted); display: block; }

/* pastki menyu */
.tabs { position: fixed; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(540px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(12, 14, 22, .78); border: 1px solid var(--line); border-radius: 20px; padding: 6px; backdrop-filter: blur(18px); }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px 2px; border-radius: 14px; cursor: pointer; }
.tabs button i { display: block; width: 22px; height: 22px; }
.tabs button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--gold); background: rgba(245,197,66,.1); }
.tabs button.ai-tab i { width: 26px; height: 26px; }
.tabs button.ai-tab:not(.on) { color: var(--text); }

/* sarlavha: avatar, qo'ng'iroq */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mini-avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(135deg, var(--bull), var(--gold) 50%, var(--bear)); color: #111; overflow: hidden; }
.mini-avatar img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar { overflow: hidden; }
.top-r { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-2);
  color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--bear); }

/* Copy trading */
.copy-entry { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; color: var(--text);
  font: inherit; border-color: rgba(245,197,66,.45); }
.copy-entry .ce-ico { font-size: 26px; }
.copy-entry small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.copy-entry .ce-arrow { margin-left: auto; font-size: 26px; color: var(--gold); }
.trader { display: grid; gap: 10px; }
.trader .head { display: flex; gap: 12px; align-items: center; }
.trader .head .mini-avatar { width: 46px; height: 46px; }
.trader .name { font-weight: 800; font-size: 16px; }
.trader .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.trader .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.trader .stats div { background: var(--glass-2); border-radius: 10px; padding: 7px 8px; }
.trader .stats span { display: block; color: var(--muted); font-size: 11px; }
.trader .stats b { font-size: 14px; }
.trader .rating { margin-left: auto; text-align: right; font-weight: 800; color: var(--gold); font-size: 20px; }
.trader .rating small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.trader .acts { display: flex; gap: 8px; }
.trader .acts .btn { flex: 1; margin: 0; }
.trader .hist { display: grid; gap: 6px; }

/* AI */
.upload { display: grid; place-items: center; min-height: 140px; margin-top: 10px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  cursor: pointer; color: var(--muted); overflow: hidden; text-align: center; padding: 10px; }
.upload img { max-width: 100%; max-height: 260px; border-radius: 10px; }
.wide-input { width: 100%; margin-top: 10px; box-sizing: border-box; }
.ai-result { white-space: pre-wrap; line-height: 1.55; font-size: 14px; }

/* yangiliklar */
.news-day { color: var(--muted); font-size: 12px; font-weight: 700; margin: 12px 2px 4px; text-transform: uppercase; letter-spacing: .04em; }
.news .imp { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; }
.news .imp.High { background: var(--bear); } .news .imp.Medium { background: #f0a020; }
.news.mine { border-color: rgba(245,197,66,.45); }
.news .note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.tabs button:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.toast { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: 100px; background: #1d2130; border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); }

@media (min-width: 520px) { .tf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

@keyframes shine { 0%, 60% { background-position: 0 0, 150% 0; } 100% { background-position: 0 0, -50% 0; } }

/* --- Sayqal: signal kartasi, darajalar, podium, tariflar ------------------- */
body { font-variant-numeric: tabular-nums; }
.sig { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; backdrop-filter: blur(12px);
  display: grid; gap: 8px; }
.sig-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sig-h .sym { font-weight: 700; }
.sig-h .tf { font-size: 12px; color: var(--muted); padding: 2px 7px; border: 1px solid var(--line); border-radius: 7px; }
.sig-r { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.st { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: #c9cdd6; }
.st-win { background: rgba(22,199,132,.14); color: var(--bull); }
.st-loss { background: rgba(234,57,67,.14); color: var(--bear); }
.st-open { background: rgba(245,197,66,.13); color: var(--gold); }
.sig-m { font-size: 12px; color: var(--muted); }
.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lv { background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.lv span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lv b { font-size: 13px; font-weight: 600; }
.lv.pos b { color: var(--bull); } .lv.neg b { color: var(--bear); }
.pod .medal { width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #1a1300; background: linear-gradient(135deg, #fff1b8, #f5c542 50%, #b8860b);
  box-shadow: 0 0 18px rgba(245,197,66,.35); }
.pod.p2 .medal { background: linear-gradient(135deg, #ffffff, #c9ced8 50%, #8a909c); box-shadow: 0 0 14px rgba(200,206,216,.25); }
.pod.p3 .medal { background: linear-gradient(135deg, #ffd7b0, #cd7f32 50%, #8a4f1c); box-shadow: 0 0 14px rgba(205,127,50,.3); }
.ok { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--bull); background: rgba(22,199,132,.14);
  padding: 2px 8px; border-radius: 99px; vertical-align: 1px; }
.plan .price { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.plan .was { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.plan .was s { color: var(--muted); }
.plan .now { font-size: 22px; font-weight: 800; line-height: 1; }
.plan .now small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan .cur { font-size: 11px; font-weight: 700; color: var(--gold); border: 1px solid rgba(245,197,66,.4); padding: 3px 9px; border-radius: 99px; }
.btn.sm { padding: 7px 16px; font-size: 14px; border-radius: 10px; }
.state { font-size: 12.5px; color: var(--muted); }
.state.on { color: var(--bull); } .state.off { color: #c9a24a; }
