:root{
  --primary:#f0b90b;
  --secondary:#0ecb81;
  --danger:#f6465d;
  --bg:#f5f7fa;
  --white:#fff;
  --muted:#6b7280;
  --border:#e5e7eb;
  --text:#111827;
  --shadow: 0 12px 30px rgba(17,24,39,.06);
  --radius: 16px;
  --radius2: 22px;
  --max: 1200px;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Arial;
  background:
    radial-gradient(1200px 600px at 70% -50%, rgba(240,185,11,.18), transparent 55%),
    radial-gradient(900px 450px at 10% -40%, rgba(14,203,129,.12), transparent 50%),
    var(--bg);
  color:var(--text);
  padding-bottom: 86px;
}
a{color:inherit;text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:0 16px;}

.header{
  position:sticky; top:0; z-index:100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(229,231,235,.8);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; padding:12px 0;
}
.brand{display:flex; align-items:center; gap:10px; font-weight:950;}
.brand-badge{
  width:34px;height:34px;border-radius:12px;
  background: linear-gradient(135deg, rgba(240,185,11,1), rgba(240,185,11,.65));
  display:grid; place-items:center; color:#111; font-weight:950;
  box-shadow: 0 10px 18px rgba(240,185,11,.25);
}
.top-actions{display:flex; align-items:center; gap:10px; white-space:nowrap;}
.btn{
  border:0; cursor:pointer;
  padding:10px 14px; border-radius:12px;
  font-weight:900; display:inline-flex; align-items:center; gap:8px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:hover{transform: translateY(-1px); box-shadow: var(--shadow)}
.btn:active{transform: translateY(0); opacity:.95}
.btn-login{background:#111827; color:#fff;}
.btn-signup{background:var(--primary); color:#111;}
@media (max-width: 520px){ .btn{padding:8px 12px; border-radius:10px; font-size:13px} }

.chip{
  display:none;
  padding:8px 10px; border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.75);
  color: var(--muted);
  font-weight:900; font-size:12px;
  align-items:center; gap:8px;
}
.dot{width:8px;height:8px;border-radius:999px;background:var(--secondary);box-shadow:0 0 0 6px rgba(14,203,129,.10)}
@media (min-width: 860px){ .chip{display:inline-flex;} }

.hero{padding: 18px 0 10px;}
.hero-grid{display:grid; grid-template-columns:1fr; gap:14px;}
@media (min-width: 980px){ .hero-grid{grid-template-columns: 1.25fr .75fr;} }
.card{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(229,231,235,.95);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.hero-main{padding:18px;}
.hero-title{margin:0 0 6px; font-size:22px; font-weight:950; letter-spacing:-.2px;}
.hero-sub{margin:0 0 14px; color:var(--muted); line-height:1.55; max-width:62ch;}
.hero-cta{display:flex; flex-wrap:wrap; gap:10px;}
.btn-primary{
  background: linear-gradient(135deg, rgba(240,185,11,1), rgba(240,185,11,.78));
  color:#111; box-shadow: 0 12px 22px rgba(240,185,11,.18);
}
.btn-secondary{background: rgba(17,24,39,.06); color:#111827; border:1px solid rgba(229,231,235,.9);}

.metrics{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:0 18px 18px;}
.metric{
  background: rgba(255,255,255,.7);
  border:1px solid rgba(229,231,235,.85);
  border-radius: 16px; padding:12px;
}
.metric small{display:block; color:var(--muted); font-weight:900}
.metric b{display:block; margin-top:6px; font-size:16px}
.metric .hint{margin-top:2px; font-size:12px; color:var(--muted); font-weight:900}
@media(max-width: 620px){ .metrics{grid-template-columns:1fr;} }

.statusbar{
  display:none;
  margin:12px 18px 0;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(229,231,235,.9);
  background: rgba(255,255,255,.9);
  color:var(--muted);
  font-weight:900;
  box-shadow: var(--shadow);
}
.statusbar.show{display:block;}

.section{padding: 10px 0 0;}
.section-head{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 10px;}
.section-title{margin:0; font-size:16px; font-weight:950;}
.tools{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.search{
  display:flex; align-items:center; gap:10px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(229,231,235,.95);
  border-radius:999px;
  padding:10px 12px;
  min-width:220px;
  box-shadow: 0 6px 18px rgba(17,24,39,.05);
}
.search i{color:var(--muted)}
.search input{border:0; outline:0; background:transparent; width:100%; font-weight:900; color:#111827;}

.market-wrap{
  background: rgba(255,255,255,.92);
  border:1px solid rgba(229,231,235,.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.market-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px; border-bottom:1px solid var(--border);
  transition:background .25s ease;
}
.market-row:last-child{border-bottom:none;}
.market-left{display:flex; gap:12px; align-items:center; min-width:0;}
.coin-badge{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  background: rgba(17,24,39,.06);
  border:1px solid rgba(229,231,235,.9);
  font-weight:950;
  flex:0 0 auto;
}
.market-symbol{font-weight:950; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.market-pair{font-size:12px;color:var(--muted);margin-top:2px;font-weight:900;}
.market-right{text-align:right; flex:0 0 auto;}
.market-price{font-weight:950;}
.market-change{font-size:12px;font-weight:950;margin-top:3px;}
.positive{color:var(--secondary);}
.negative{color:var(--danger);}
.loading{opacity:.6;}

.flash-up{background:#ecfdf5;}
.flash-down{background:#fef2f2;}

.market-foot{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:12px 14px;
  border-top:1px solid rgba(229,231,235,.95);
  background: rgba(17,24,39,.02);
  color:var(--muted);
  font-weight:900;
  font-size:12px;
}
.link{color:var(--primary); font-weight:950;}

.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:200;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-top:1px solid rgba(229,231,235,.9);
  display:flex; justify-content:space-around;
  padding:10px 6px;
}
.bottom-nav a{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  font-size:12px; color:var(--muted); font-weight:950;
  min-width:56px; padding:8px 10px; border-radius:14px;
}
.bottom-nav i{font-size:16px}
.bottom-nav a.active{
  color:#111827;
  background: rgba(240,185,11,.16);
  border:1px solid rgba(240,185,11,.28);
}

.small-note{font-size:12px;color:var(--muted);font-weight:900;line-height:1.5}

.pwa-install-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(135deg, rgba(0,210,255,.95), rgba(0,132,255,.95));
  color:#081018;
  box-shadow:0 12px 30px rgba(0,140,255,.35);
}

.pwa-install-btn:active{ transform: translateY(1px); }

.pwa-install-hint{
  display:block;
  margin-top:8px;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  font-size:12px;
  opacity:.78;
}

  /* Telegram floating contact */
  .tg-contact{
    position: fixed;
    right: 16px;
    bottom: 88px; /* adjust if you have a bottom menu */
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .tg-contact .tg-badge{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(10, 18, 35, .78);
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    box-shadow:
      0 10px 30px rgba(0,0,0,.35),
      0 0 0 rgba(0, 200, 255, 0);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  }

  .tg-contact:hover .tg-badge{
    transform: translateY(-2px);
    border-color: rgba(0, 200, 255, .35);
    box-shadow:
      0 12px 34px rgba(0,0,0,.42),
      0 0 18px rgba(0, 200, 255, .35);
  }

  .tg-contact .tg-icon{
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 30%, rgba(0,200,255,.45), rgba(0,200,255,.10) 45%, rgba(0,0,0,0) 70%),
                rgba(0, 136, 204, .20);
    border: 1px solid rgba(0, 200, 255, .28);
    box-shadow:
      0 0 0 0 rgba(0,200,255,.45),
      0 10px 24px rgba(0,0,0,.35);
    animation: tgPulse 1.6s infinite;
  }

  @keyframes tgPulse{
    0%   { box-shadow: 0 0 0 0 rgba(0,200,255,.45), 0 10px 24px rgba(0,0,0,.35); }
    70%  { box-shadow: 0 0 0 14px rgba(0,200,255,0), 0 10px 24px rgba(0,0,0,.35); }
    100% { box-shadow: 0 0 0 0 rgba(0,200,255,0), 0 10px 24px rgba(0,0,0,.35); }
  }

  .tg-contact .tg-text{
    display: flex;
    flex-direction: column;
    line-height: 1.05;
  }

  .tg-contact .tg-title{
    font-weight: 900;
    letter-spacing: .2px;
    color: #e9f7ff;
    text-shadow: 0 0 10px rgba(0,200,255,.35);
    font-size: 13px;
    margin-bottom: 2px;
  }

  .tg-contact .tg-sub{
    font-size: 11px;
    color: rgba(233,247,255,.72);
  }

  /* On small screens, show only icon */
  @media (max-width: 520px){
    .tg-contact .tg-badge{ padding: 0; background: transparent; border: 0; backdrop-filter: none; box-shadow:none; }
    .tg-contact .tg-text{ display: none; }
  }
  
  .app-download-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:16px 0;
  padding:16px;
  border-radius:22px;
  background:
    radial-gradient(circle at top left,rgba(240,185,11,.24),transparent 35%),
    linear-gradient(135deg,#111827,#0b0e11);
  border:1px solid rgba(240,185,11,.25);
  box-shadow:0 18px 45px rgba(0,0,0,.28);
}

.app-download-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.app-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  background:linear-gradient(135deg,#f0b90b,#e6ad06);
  color:#111;
  font-size:24px;
  font-weight:1000;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 26px rgba(240,185,11,.35);
  flex-shrink:0;
}

.app-download-banner h3{
  margin:0 0 5px;
  color:#fff;
  font-size:18px;
  font-weight:900;
}

.app-download-banner p{
  margin:0;
  color:#b7bdc6;
  font-size:13px;
  line-height:1.5;
}

.app-download-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  padding:12px 16px;
  border-radius:999px;
  background:linear-gradient(135deg,#f0b90b,#e6ad06);
  color:#111;
  font-weight:900;
  text-decoration:none;
  box-shadow:0 12px 30px rgba(240,185,11,.25);
  animation:appGlow 1.8s infinite;
}

@keyframes appGlow{
  0%,100%{
    box-shadow:0 0 0 rgba(240,185,11,0),0 12px 30px rgba(240,185,11,.25);
  }
  50%{
    box-shadow:0 0 28px rgba(240,185,11,.55),0 12px 30px rgba(240,185,11,.25);
  }
}

@media(max-width:700px){
  .app-download-banner{
    align-items:flex-start;
    flex-direction:column;
  }

  .app-download-btn{
    width:100%;
  }

  .app-download-banner h3{
    font-size:16px;
  }
}

/* Optional: prevent selection/drag (comment out if it breaks forms/copy) */
  html.protect-noselect, html.protect-noselect body{
    -webkit-user-select:none;
    -moz-user-select:none;
    user-select:none;
    -webkit-touch-callout:none;
  }
  html.protect-noselect img{ -webkit-user-drag:none; user-drag:none; pointer-events:none; }

  /* Overlay shown when DevTools is detected */
  #protectOverlay{
    position:fixed; inset:0;
    display:none;
    place-items:center;
    background:rgba(10,12,18,.88);
    backdrop-filter: blur(10px);
    z-index:2147483647;
    padding:20px;
  }
  #protectOverlay .box{
    max-width:560px;
    width:min(92vw,560px);
    border-radius:18px;
    border:1px solid rgba(255,255,255,.14);
    background:rgba(20,24,35,.80);
    box-shadow:0 18px 50px rgba(0,0,0,.55);
    padding:18px 16px;
    font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color:#fff;
    text-align:center;
  }
  #protectOverlay .title{
    font-weight:900;
    font-size:18px;
    letter-spacing:.2px;
    margin:0 0 8px;
  }
  #protectOverlay .sub{
    opacity:.85;
    font-size:13px;
    margin:0 0 14px;
    line-height:1.35;
  }
  #protectOverlay .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    border:0;
    border-radius:999px;
    padding:10px 14px;
    background:linear-gradient(135deg, rgba(0,210,255,.95), rgba(0,132,255,.95));
    color:#081018;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 12px 30px rgba(0,140,255,.35);
    text-decoration:none;
  }
  #protectOverlay .hint{
    margin-top:10px;
    font-size:12px;
    opacity:.75;
  }

:root{
  --bi-bottom-nav-height: 92px;
  --bi-float-right: 14px;
  --bi-gold: #f0b90b;
  --bi-gold-dark: #e6ad06;
  --bi-dark: #0b1220;
  --bi-blue: #18c8ff;
}

.bi-floating-actions{
  position: fixed;
  right: var(--bi-float-right);
  bottom: calc(var(--bi-bottom-nav-height) + 18px + env(safe-area-inset-bottom, 0px));
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.bi-float-btn{
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  max-width: min(88vw, 330px);
  padding: 8px 13px 8px 8px;
  border-radius: 999px;
  text-decoration: none;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  transition: transform .18s ease, box-shadow .18s ease;
}

.bi-float-btn::before{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius: inherit;
  opacity:.55;
  animation: biPulse 1.9s infinite;
}

.bi-float-btn:hover{
  transform: translateY(-2px);
}

.bi-float-btn:active{
  transform: scale(.98);
}

.bi-telegram{
  background: rgba(12,18,35,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color:#eaf8ff;
}

.bi-telegram::before{
  background: rgba(24,200,255,.22);
}

.bi-chat{
  background: linear-gradient(135deg,var(--bi-gold),var(--bi-gold-dark));
  color:#111827;
}

.bi-chat::before{
  background: rgba(240,185,11,.25);
}

.bi-float-icon{
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.bi-telegram .bi-float-icon{
  background: rgba(0,136,204,.28);
  border: 1px solid rgba(24,200,255,.38);
  box-shadow: 0 0 18px rgba(24,200,255,.24);
}

.bi-chat .bi-float-icon{
  background:#111827;
  color:var(--bi-gold);
  font-size:20px;
}

.bi-float-text{
  position: relative;
  z-index: 2;
  display:flex;
  flex-direction:column;
  line-height:1.1;
  min-width:0;
  white-space:nowrap;
}

.bi-float-text strong{
  font-size:13px;
  font-weight:900;
}

.bi-float-text small{
  margin-top:2px;
  font-size:11px;
  font-weight:700;
  opacity:.78;
}

@keyframes biPulse{
  0%{ transform:scale(.96); opacity:.75; }
  70%{ transform:scale(1.12); opacity:0; }
  100%{ transform:scale(.96); opacity:0; }
}

@media(max-width:600px){
  :root{
    --bi-bottom-nav-height: 96px;
    --bi-float-right: 10px;
  }

  .bi-floating-actions{
    bottom: calc(var(--bi-bottom-nav-height) + 14px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .bi-float-btn{
    min-height: 52px;
    padding: 7px 10px 7px 7px;
    gap: 8px;
    max-width: 86vw;
  }

  .bi-float-icon{
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .bi-float-text strong{
    font-size:12px;
  }

  .bi-float-text small{
    font-size:10px;
  }
}

@media(max-width:380px){
  .bi-float-text small{
    display:none;
  }

  .bi-float-btn{
    max-width: 82vw;
  }
}

@media(prefers-reduced-motion: reduce){
  .bi-float-btn,
  .bi-float-btn::before{
    animation:none;
    transition:none;
  }
}

/* ===== Clean upgrade additions ===== */
.header-actions,
.top-actions{min-width:0;}
.top-download-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#f0b90b,#e6ad06);
  color:#111;
  font-size:13px;
  font-weight:950;
  text-decoration:none;
  box-shadow:0 0 0 rgba(240,185,11,0),0 10px 24px rgba(240,185,11,.28);
  animation:topDownloadGlow 1.8s infinite;
  white-space:nowrap;
}
.top-download-btn:hover{transform:translateY(-1px)}
@keyframes topDownloadGlow{
  0%,100%{box-shadow:0 0 0 rgba(240,185,11,0),0 10px 24px rgba(240,185,11,.28)}
  50%{box-shadow:0 0 24px rgba(240,185,11,.75),0 10px 24px rgba(240,185,11,.28)}
}
@media(max-width:720px){
  .top-actions{gap:8px;}
  .btn-login,.btn-signup{padding:9px 10px;font-size:12px;}
  .btn-login i,.btn-signup i{display:none;}
  .top-download-btn{padding:9px 11px;font-size:12px;}
  .brand{font-size:15px;}
}
@media(max-width:430px){
  .top-actions{gap:7px;}
  .btn-login,.btn-signup{padding:8px 9px;}
  .top-download-btn span{display:none;}
  .top-download-btn{width:39px;height:39px;padding:0;border-radius:14px;}
}
.app-download-banner{max-width:var(--max);margin:16px auto;padding:16px;}
@media(max-width:700px){.app-download-banner{margin:14px 16px;}}
