@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root{
  --bg:#080b11;
  --panel:#0f141d;
  --panel-2:#141b27;
  --line:#232c3a;
  --text:#e9edf4;
  --text-dim:#8a94a6;
  --text-faint:#5a6376;
  --rise:#19e88f;
  --rise-dim:#0f5c3c;
  --fall:#ff3b5c;
  --fall-dim:#5c1626;
  --gold:#ffcc4d;
  --disc:#5865f2;
  --disc-hover:#6f77f5;
  --radius:14px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Sora',sans-serif;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
body::before{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 12% 8%, rgba(25,232,143,0.07), transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(255,59,92,0.06), transparent 45%);
  z-index:0;
}
a{color:inherit;text-decoration:none;}
.mono{font-family:'JetBrains Mono',monospace;}

/* ---------- Nav ---------- */
.nav{
  position:sticky; top:0; z-index:40;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 6vw;
  background:rgba(8,11,17,0.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px; letter-spacing:0.2px;}
.brand-mark{
  width:30px;height:30px;border-radius:8px;
  background:linear-gradient(135deg, var(--rise), var(--disc));
  display:flex;align-items:center;justify-content:center;
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:14px; color:#04140d;
}
.brand-logo{
  width:32px;height:32px;border-radius:9px;object-fit:cover;
  border:1px solid var(--line);
  box-shadow:0 0 0 3px rgba(25,232,143,0.08);
}
.nav-links{display:flex; align-items:center; gap:28px;}
.nav-links a{color:var(--text-dim); font-size:14px; font-weight:500; transition:color .15s ease;}
.nav-links a:hover, .nav-links a.active{color:var(--text);}

.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 20px; border-radius:999px;
  font-weight:600; font-size:14px; cursor:pointer;
  border:1px solid var(--line); background:var(--panel-2); color:var(--text);
  transition:transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  position:relative; overflow:hidden; -webkit-tap-highlight-color:transparent; user-select:none;
}
.btn:hover{border-color:#39445a; transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,0.28);}
.btn:active{transform:translateY(0) scale(.96); transition:transform .06s ease;}
.btn::after{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:radial-gradient(circle, rgba(255,255,255,0.35) 0%, transparent 60%);
  opacity:0; transform:scale(0.4);
  transition:opacity .5s ease, transform .5s ease;
  pointer-events:none;
}
.btn:active::after{opacity:1; transform:scale(1.6); transition:opacity 0s, transform 0s;}
.btn-discord{
  background:var(--disc); border-color:var(--disc); color:#fff;
  box-shadow:0 0 0 0 rgba(88,101,242,0.5);
}
.btn-discord:hover{background:var(--disc-hover); border-color:var(--disc-hover); box-shadow:0 6px 24px rgba(88,101,242,0.4);}
.btn-ghost{background:transparent;}
.btn-rise{background:var(--rise); border-color:var(--rise); color:#04140d;}
.btn-rise:hover{background:#22ffa5; border-color:#22ffa5; box-shadow:0 6px 24px rgba(25,232,143,0.35);}
.btn:disabled{opacity:.5; cursor:not-allowed; transform:none; box-shadow:none;}
.btn:disabled::after{display:none;}
.btn-sm{padding:8px 14px; font-size:13px;}

/* ---------- Layout helpers ---------- */
.wrap{max-width:1180px; margin:0 auto; padding:0 6vw; position:relative; z-index:1;}
section{position:relative; z-index:1;}
.eyebrow{font-size:13px; color:var(--text-faint); font-weight:500;}
.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 12px; border-radius:999px; font-size:12px; font-weight:600;
  background:var(--panel-2); border:1px solid var(--line); color:var(--text-dim);
}
.pill-dot{width:6px;height:6px;border-radius:50%;background:var(--rise); box-shadow:0 0 8px var(--rise);}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
}

footer{
  border-top:1px solid var(--line);
  padding:32px 6vw 48px;
  color:var(--text-faint);
  font-size:13px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
}

/* ---------- Hero ---------- */
.hero{
  padding:64px 0 40px;
  display:grid; grid-template-columns:1.1fr 1fr; gap:40px; align-items:center;
}
.hero h1{
  font-size:clamp(34px, 4.4vw, 56px);
  line-height:1.08;
  margin:18px 0 18px;
  font-weight:700;
  letter-spacing:-0.5px;
}
.hero p.lead{font-size:17px; color:var(--text-dim); max-width:46ch; margin:0 0 28px;}
.hero-actions{display:flex; gap:14px; align-items:center; flex-wrap:wrap;}
.hero-note{margin-top:14px; font-size:13px; color:var(--text-faint);}
.hero-canvas-wrap{
  position:relative;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg, #0b111a, #080b11);
  overflow:hidden;
  aspect-ratio:4/3;
}
.hero-canvas-wrap canvas{display:block; width:100%; height:100%;}
.hero-multiplier{
  position:absolute; top:18px; left:18px;
  font-family:'JetBrains Mono',monospace;
  font-size:34px; font-weight:700; color:var(--rise);
  text-shadow:0 0 18px rgba(25,232,143,0.5);
}
.hero-tag{position:absolute; bottom:16px; left:18px; font-size:12px; color:var(--text-faint);}

/* ---------- Feature grid ---------- */
.grid3{display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin:20px 0 64px;}
.feature h3{font-size:16px; margin:14px 0 8px;}
.feature p{color:var(--text-dim); font-size:14px; margin:0;}
.feature{transition:transform .18s ease, border-color .18s ease;}
.feature:hover{transform:translateY(-3px); border-color:#39445a;}
.feature .icon{
  width:42px;height:42px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  background:var(--panel-2); border:1px solid var(--line);
  font-size:20px; line-height:1;
}

/* ---------- Section heading ---------- */
.section-head{margin:0 0 28px;}
.section-head h2{font-size:clamp(24px,2.6vw,32px); margin:8px 0 8px; font-weight:700;}
.section-head p{color:var(--text-dim); margin:0; max-width:56ch;}

/* ---------- Auth gate ---------- */
.gate{
  display:flex; flex-direction:column; align-items:flex-start; gap:16px;
  padding:48px; margin:24px 0 64px;
}
.gate .icon-lock{
  width:46px;height:46px;border-radius:12px;
  background:var(--panel-2); border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center; color:var(--gold);
  font-size:20px;
}
.member-badge{display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-dim);}
.member-badge img{width:28px;height:28px;border-radius:50%;}

/* ---------- Forex terminal ---------- */
.terminal{
  display:grid; grid-template-columns:2fr 1fr; gap:18px; margin:24px 0 64px;
}
.ticker-row{
  display:flex; gap:10px; overflow-x:auto; padding-bottom:14px; margin-bottom:8px;
}
.ticker-pill{
  flex:0 0 auto;
  padding:10px 14px; border-radius:10px;
  background:var(--panel-2); border:1px solid var(--line);
  font-family:'JetBrains Mono',monospace; font-size:13px;
  display:flex; flex-direction:column; gap:4px; min-width:120px;
}
.ticker-pill .sym{color:var(--text-dim); font-size:11px; letter-spacing:.5px;}
.ticker-pill .px{font-size:15px; font-weight:700;}
.up{color:var(--rise);} .down{color:var(--fall);}

.game-panel{position:relative; overflow:hidden;}
.game-canvas-wrap{
  position:relative; border-radius:12px; overflow:hidden;
  background:radial-gradient(120% 100% at 0% 100%, #0d1c17 0%, #0a0e14 60%);
  border:1px solid var(--line);
  aspect-ratio:16/9;
}
.game-canvas-wrap canvas{display:block; width:100%; height:100%;}
.game-multiplier{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:clamp(38px,5vw,64px);
  pointer-events:none;
}
.game-phase{
  position:absolute; top:14px; left:14px; font-size:12px; color:var(--text-dim);
  font-family:'JetBrains Mono',monospace;
}
.game-controls{display:flex; gap:12px; margin-top:16px; align-items:center; flex-wrap:wrap;}
.stake-input{
  background:var(--panel-2); border:1px solid var(--line); color:var(--text);
  border-radius:10px; padding:11px 14px; font-family:'JetBrains Mono',monospace; font-size:14px;
  width:130px;
}
.stake-input:focus{outline:none; border-color:var(--rise);}
.game-tabs{display:flex; gap:8px; margin-bottom:14px;}
.game-tab{
  padding:8px 14px; border-radius:8px; font-size:13px; font-weight:600;
  background:var(--panel-2); border:1px solid var(--line); color:var(--text-dim); cursor:pointer;
}
.game-tab.active{color:var(--text); border-color:var(--rise); background:rgba(25,232,143,0.08);}

.side-stack{display:flex; flex-direction:column; gap:18px;}
.history-list{display:flex; flex-direction:column; gap:8px; max-height:220px; overflow-y:auto;}
.history-row{
  display:flex; justify-content:space-between; align-items:center;
  font-family:'JetBrains Mono',monospace; font-size:13px;
  padding:8px 10px; border-radius:8px; background:var(--panel-2);
}

/* ---------- Log / changelog page ---------- */
.log-hero{padding:56px 0 20px;}
.version{
  display:grid; grid-template-columns:150px 1fr; gap:24px;
  padding:28px 0; border-top:1px solid var(--line);
}
.version:first-of-type{border-top:none;}
.version .vtag{
  font-family:'JetBrains Mono',monospace; font-weight:700; font-size:20px;
  position:sticky; top:80px; align-self:start;
}
.version .vdate{display:block; font-size:12px; color:var(--text-faint); font-weight:400; margin-top:6px;}
.version h3{margin:0 0 4px; font-size:19px;}
.version .vsub{color:var(--text-dim); font-size:13px; margin:0 0 16px;}
.change-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px;}
.change-list li{
  display:flex; gap:10px; align-items:flex-start; font-size:14.5px; color:var(--text);
}
.tag{
  flex:0 0 auto; margin-top:2px;
  font-family:'JetBrains Mono',monospace; font-size:10px; font-weight:700;
  padding:2px 7px; border-radius:5px; text-transform:uppercase; letter-spacing:.4px;
}
.tag-new{background:rgba(25,232,143,0.12); color:var(--rise);}
.tag-fix{background:rgba(255,59,92,0.12); color:var(--fall);}
.tag-imp{background:rgba(255,204,77,0.12); color:var(--gold);}

/* ---------- Hero showcase (replaces the old crash-curve preview) ---------- */
.hero-showcase{
  position:relative; border:1px solid var(--line); border-radius:18px;
  background:linear-gradient(180deg, #0b111a, #080b11);
  overflow:hidden; aspect-ratio:4/3; display:flex; flex-direction:column;
  padding:20px; gap:12px;
}
.hero-showcase-head{display:flex; align-items:center; gap:10px; color:var(--text-dim); font-size:13px;}
.hero-showcase-head img{width:26px;height:26px;border-radius:8px;}
.hero-chat-log{flex:1; display:flex; flex-direction:column; gap:10px; justify-content:flex-end; overflow:hidden;}
.hero-bubble{
  max-width:82%; padding:10px 14px; border-radius:14px; font-size:13.5px; line-height:1.4;
  opacity:0; transform:translateY(6px); animation:bubbleIn .45s ease forwards;
}
.hero-bubble.them{align-self:flex-start; background:var(--panel-2); border:1px solid var(--line); border-bottom-left-radius:4px;}
.hero-bubble.me{align-self:flex-end; background:var(--disc); color:#fff; border-bottom-right-radius:4px;}
@keyframes bubbleIn{ to{opacity:1; transform:translateY(0);} }
.hero-showcase-tag{font-size:12px; color:var(--text-faint);}

/* ---------- Wallet widget (StarRex Exchange) ---------- */
.wallet-widget{
  display:flex; align-items:center; gap:24px; flex-wrap:wrap;
  padding:20px 24px; margin:0 0 20px;
}
.wallet-stat{display:flex; flex-direction:column; gap:2px;}
.wallet-stat .label{font-size:11.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.5px;}
.wallet-stat .value{font-family:'JetBrains Mono',monospace; font-size:20px; font-weight:700; color:var(--gold);}
.wallet-stat .value.bank{color:var(--rise);}
.wallet-actions{display:flex; gap:10px; margin-left:auto; flex-wrap:wrap;}
.wallet-widget.compact{padding:14px 18px; gap:16px;}
.wallet-widget.compact .value{font-size:16px;}
.wallet-note{font-size:12px; color:var(--text-faint); width:100%;}

/* Deposit/withdraw inline form */
.wallet-form{display:flex; gap:8px; align-items:center;}
.wallet-form input{
  background:var(--panel-2); border:1px solid var(--line); color:var(--text);
  border-radius:10px; padding:9px 12px; font-family:'JetBrains Mono',monospace; font-size:13px;
  width:110px;
}
.wallet-form input:focus{outline:none; border-color:var(--rise);}
.wallet-msg{font-size:12.5px; margin-top:8px;}
.wallet-msg.ok{color:var(--rise);}
.wallet-msg.err{color:var(--fall);}

/* ---------- Economy overview section ---------- */
.economy-grid{display:grid; grid-template-columns:1.2fr 1fr; gap:18px; margin:0 0 40px;}
.xp-bar-wrap{margin-top:10px;}
.xp-bar{height:10px; border-radius:99px; background:var(--panel-2); border:1px solid var(--line); overflow:hidden;}
.xp-bar-fill{height:100%; background:linear-gradient(90deg, var(--rise), #22ffa5); border-radius:99px; transition:width .4s ease;}
.xp-label{display:flex; justify-content:space-between; font-size:12px; color:var(--text-dim); margin-top:6px;}
.stat-row{display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid var(--line); font-size:14px;}
.stat-row:last-child{border-bottom:none;}
.stat-row .k{color:var(--text-dim);}
.achv-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(46px,1fr)); gap:8px; margin-top:10px;}
.achv-badge{
  aspect-ratio:1; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background:var(--panel-2); border:1px solid var(--line); font-size:18px; opacity:.25;
}
.achv-badge.unlocked{opacity:1; border-color:var(--gold); box-shadow:0 0 12px rgba(255,204,77,0.25);}
.cmd-links{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;}
.cmd-links code{
  background:var(--panel-2); border:1px solid var(--line); border-radius:8px;
  padding:5px 9px; font-size:12.5px; font-family:'JetBrains Mono',monospace; color:var(--rise);
}

/* ---------- AI chat page ---------- */
.chat-shell{
  display:flex; flex-direction:column; height:min(70vh, 620px);
  border:1px solid var(--line); border-radius:16px; background:var(--panel);
  margin:24px 0 64px; overflow:hidden;
}
.chat-messages{flex:1; overflow-y:auto; padding:22px 24px; display:flex; flex-direction:column; gap:14px;}
.chat-bubble{
  max-width:74%; padding:12px 16px; border-radius:16px; font-size:14.5px; line-height:1.5;
  opacity:0; transform:translateY(6px); animation:bubbleIn .3s ease forwards; white-space:pre-wrap;
}
.chat-bubble.user{align-self:flex-end; background:var(--disc); color:#fff; border-bottom-right-radius:4px;}
.chat-bubble.bot{align-self:flex-start; background:var(--panel-2); border:1px solid var(--line); border-bottom-left-radius:4px;}
.chat-bubble.typing{display:flex; gap:4px; align-items:center; padding:14px 16px;}
.chat-dot{width:6px;height:6px;border-radius:50%;background:var(--text-dim); animation:typingBounce 1s ease infinite;}
.chat-dot:nth-child(2){animation-delay:.15s;} .chat-dot:nth-child(3){animation-delay:.3s;}
@keyframes typingBounce{ 0%,60%,100%{transform:translateY(0); opacity:.4;} 30%{transform:translateY(-4px); opacity:1;} }
.chat-input-row{
  display:flex; gap:10px; padding:16px; border-top:1px solid var(--line); background:var(--panel-2);
}
.chat-input-row input{
  flex:1; background:var(--bg); border:1px solid var(--line); color:var(--text);
  border-radius:12px; padding:12px 16px; font-size:14px;
}
.chat-input-row input:focus{outline:none; border-color:var(--disc);}
.chat-hero{padding:56px 0 12px;}

@media (max-width:860px){
  .hero{grid-template-columns:1fr;}
  .grid3{grid-template-columns:1fr;}
  .terminal{grid-template-columns:1fr;}
  .version{grid-template-columns:1fr;}
  .version .vtag{position:static;}
  .economy-grid{grid-template-columns:1fr;}
  .wallet-actions{margin-left:0;}
}
