:root{
  --bnb:#f0b90b;
  --bg:#0b0e11;
  --card:#151a21;
  --border:#232a34;
  --text:#eaecef;
  --muted:#9aa4b2;
  --panel:#0e131a;
  --panel2:#0c1117;

  --shadow: 0 20px 60px rgba(0,0,0,0.45);
  --shadow2: 0 10px 30px rgba(0,0,0,0.35);
  --ring: 0 0 0 3px rgba(240,185,11,0.12);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(240,185,11,0.18), transparent),
    radial-gradient(700px 350px at 80% 10%, rgba(240,185,11,0.10), transparent),
    radial-gradient(500px 250px at 50% 90%, rgba(240,185,11,0.06), transparent),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 35%),
    var(--bg);
  color:var(--text);
}

#appLoader{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(240,185,11,0.18), transparent),
    radial-gradient(700px 350px at 80% 10%, rgba(240,185,11,0.10), transparent),
    radial-gradient(500px 250px at 50% 90%, rgba(240,185,11,0.06), transparent),
    var(--bg);
  transition: opacity .35s ease, transform .35s ease;
}

#appLoader.hide{
  opacity:0;
  transform: translateY(-6px);
  pointer-events:none;
}

.loaderCard{
  width:min(520px, 92vw);
  border:1px solid rgba(240,185,11,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border-radius:20px;
  padding:22px 20px;
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}

.loaderCard:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(500px 220px at 30% 0%, rgba(240,185,11,0.14), transparent 55%);
  pointer-events:none;
}

.loaderTop{
  display:flex;
  align-items:center;
  gap:14px;
  position:relative;
  z-index:1;
}

.loaderLogo{
  width:58px;
  height:58px;
  border-radius:16px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(240,185,11,0.28);
  padding:0;
  object-fit: cover;
  object-position: center;
  display:block;
  box-shadow: 0 0 0 4px rgba(240,185,11,0.08);
}

.loaderTitle{
  font-weight:850;
  letter-spacing:.2px;
  margin:0;
  font-size:16px;
}
.loaderSub{
  margin:4px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.scanLine{
  margin-top:16px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(240,185,11,0.18);
  background: rgba(0,0,0,0.25);
  overflow:hidden;
  position:relative;
  z-index:1;
}

.scanLine:after{
  content:"";
  position:absolute;
  top:0; left:-40%;
  height:100%;
  width:40%;
  background: linear-gradient(90deg, transparent, rgba(240,185,11,0.65), transparent);
  animation: scan 1.2s ease-in-out infinite;
}

@keyframes scan{
  0%{ left:-40%; opacity:.7; }
  50%{ opacity:1; }
  100%{ left:100%; opacity:.7; }
}

.loaderFacts{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
  position:relative;
  z-index:1;
}
@media(max-width:520px){ .loaderFacts{ grid-template-columns:1fr; } }

.fact{
  border:1px solid rgba(35,42,52,0.75);
  background: rgba(14,17,23,0.55);
  border-radius:14px;
  padding:10px 12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.fact b{ color:var(--bnb); font-weight:800; }

.hero{
  padding:42px 24px 34px;
  text-align:center;
  position:relative;
}

.hero:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(900px 450px at 50% 0%, rgba(240,185,11,0.10), transparent 60%);
  pointer-events:none;
}

.topbar{
  max-width:1150px;
  margin:0 auto 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  position:relative;
  z-index:1;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.brandLogoWrap{
  width:52px;
  height:52px;
  border-radius:16px;
  background: rgba(0,0,0,0.35);
  border:1px solid rgba(240,185,11,0.28);
  padding:0;
  overflow:hidden;
  box-shadow: 0 0 0 4px rgba(240,185,11,0.08), var(--shadow2);
}

.brandLogoWrap img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position:center;
  display:block;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.35));
}

.brandText{
  text-align:left;
}
.brandText .name{
  font-weight:900;
  letter-spacing:.2px;
  font-size:14px;
}
.brandText .sub{
  color:var(--muted);
  font-size:12px;
  margin-top:2px;
}

.hero h1{
  font-size:40px;
  margin:0 0 10px;
  letter-spacing:0.2px;
  position:relative;
  z-index:1;
}

.tagline{
  color:var(--muted);
  max-width:780px;
  margin:0 auto 26px;
  font-size:16px;
  line-height:1.5;
  position:relative;
  z-index:1;
}

.hero-stats{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  position:relative;
  z-index:1;
}
.hero-stats div{
  background: rgba(255,255,255,0.035);
  border:1px solid rgba(35,42,52,0.8);
  border-radius:16px;
  padding:14px 18px;
  min-width:190px;
  box-shadow: var(--shadow2);
}
.hero-stats strong{ display:block; color:var(--bnb); }
.hero-stats span{ font-size:12px; color:var(--muted); }

.tabs{
  display:flex;
  justify-content:center;
  gap:10px;
  padding:12px;
  position:sticky;
  top:0;
  z-index:10;
  background: rgba(11,14,17,0.62);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(35,42,52,0.6);
}

.tabs button{
  padding:10px 18px;
  border-radius:12px;
  border:1px solid rgba(35,42,52,0.9);
  background: rgba(14,17,23,0.8);
  color:var(--text);
  cursor:pointer;
  transition: transform .08s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.tabs button:hover{
  transform: translateY(-1px);
  border-color: rgba(240,185,11,0.55);
  box-shadow: 0 0 0 2px rgba(240,185,11,0.08);
}

.tabs button.active{
  border-color: rgba(240,185,11,0.85);
  box-shadow: var(--ring);
}

main{
  max-width:1150px;
  margin:auto;
  padding:24px;
}
.hidden{ display:none; }

.intro{ margin-bottom:16px; }
.intro h2{ margin:0 0 6px; }
.intro p{ margin:0; color:var(--muted); max-width:820px; line-height:1.55; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border:1px solid rgba(35,42,52,0.9);
  border-radius:18px;
  padding:18px;
  margin-bottom:18px;
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}

.card:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(520px 220px at 15% 0%, rgba(240,185,11,0.08), transparent 55%);
  pointer-events:none;
}

.row{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; position:relative; z-index:1; }
.between{ justify-content:space-between; align-items:center; }
.end{ justify-content:flex-end; }
.grow{ flex:1 1 240px; }
.grow2{ flex:2 1 420px; }
.btnCol{ display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.formGrid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; position:relative; z-index:1; }
@media(max-width: 900px){ .formGrid{ grid-template-columns:1fr; } }

.lbl{ font-size:12px; color:var(--muted); margin-bottom:6px; display:block; }
.hint{ font-size:12px; color:rgba(240,185,11,0.95); min-height:16px; }

input, select{
  width:100%;
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(35,42,52,0.95);
  background: rgba(14,17,23,0.9);
  color:var(--text);
  outline:none;
  transition: box-shadow .2s ease, border-color .2s ease, transform .08s ease;
}
input:focus, select:focus{
  border-color: rgba(240,185,11,0.9);
  box-shadow: 0 0 0 3px rgba(240,185,11,0.12);
}

button{
  padding:12px 18px;
  border-radius:12px;
  border:none;
  background: var(--bnb);
  color:#000;
  font-weight:750;
  cursor:pointer;
  transition: transform .08s ease, filter .2s ease, box-shadow .2s ease, background .2s ease;
}
button:hover{ filter:brightness(1.05); transform: translateY(-1px); }
button:active{ transform: translateY(0px); }

button.ghost{
  background: transparent;
  border: 1px solid rgba(35,42,52,0.95);
  color: var(--text);
}
button.ghost:hover{
  border-color: rgba(240,185,11,0.85);
  box-shadow: 0 0 0 2px rgba(240,185,11,0.08);
}

button.connected{
  background: rgba(240,185,11,0.14);
  color: var(--text);
  border: 1px solid rgba(240,185,11,0.35);
}
button.connected:hover{
  border-color: rgba(240,185,11,0.9);
  box-shadow: 0 0 0 2px rgba(240,185,11,0.08);
}

.panel-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:14px;
}
.panel{
  background: linear-gradient(180deg, rgba(14,19,26,1), rgba(12,17,23,1));
  border:1px solid rgba(35,42,52,0.95);
  border-radius:18px;
  padding:16px;
  white-space:pre-wrap;
  font-size:13px;
  line-height:1.55;
  box-shadow: var(--shadow2);
  position:relative;
  overflow:hidden;
}

.panel:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(420px 200px at 15% 0%, rgba(240,185,11,0.06), transparent 60%);
  pointer-events:none;
}

.panel strong{
  color: var(--bnb);
  display:block;
  margin-bottom:8px;
  font-size:13px;
  letter-spacing:0.2px;
}

.kv{ color:var(--muted); }

.badge{
  display:inline-block;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(240,185,11,0.25);
  background:rgba(240,185,11,0.08);
  color:var(--bnb);
  margin-top:10px;
}

.agentTypeBox{ margin-top:14px; position:relative; z-index:1; }
.agentTypeGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
  margin-top:10px;
}
@media(max-width: 900px){ .agentTypeGrid{ grid-template-columns:1fr; } }

.agentTypeBtn{
  background: rgba(14,17,23,0.9);
  color: var(--text);
  border:1px solid rgba(35,42,52,0.95);
  text-align:left;
  padding:14px;
}
.agentTypeBtn .t{ display:block; font-weight:850; }
.agentTypeBtn .d{ display:block; margin-top:4px; font-size:12px; color:var(--muted); line-height:1.45; }
.agentTypeBtn.selected{
  border-color: rgba(240,185,11,0.9);
  box-shadow: 0 0 0 3px rgba(240,185,11,0.12);
}

.agentList{ display:grid; gap:10px; }
.agentCard{
  border:1px solid rgba(35,42,52,0.95);
  background: rgba(14,17,23,0.85);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow2);
}
.agentTop{ display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.agentName{ font-weight:900; letter-spacing:.2px; }
.agentMeta{ color:var(--muted); font-size:12px; margin-top:6px; line-height:1.55; }
.agentActions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.small{ padding:10px 12px; font-size:12px; }

.hr{ height:1px; background:rgba(35,42,52,0.95); margin:14px 0; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.muted{ color: var(--muted); }

footer{
  text-align:center;
  padding:38px 20px;
  color:var(--muted);
  font-size:12px;
}

.xLink{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(35,42,52,0.95);
  background: rgba(14,17,23,0.8);
  color: var(--text);
  text-decoration:none;
  font-weight:750;
  font-size:13px;
  transition: transform .08s ease, border-color .2s ease, box-shadow .2s ease;
}
.xLink:hover{
  transform: translateY(-1px);
  border-color: rgba(240,185,11,0.85);
  box-shadow: 0 0 0 2px rgba(240,185,11,0.08);
}
.xDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--bnb);
  box-shadow: 0 0 0 4px rgba(240,185,11,0.12);
}

#btnConnectWallet.connected{
  background: rgba(240,185,11,0.15);
  color: var(--bnb);
  border: 1px solid rgba(240,185,11,0.55);
  font-weight: 750;
}

@media (max-width: 720px){
  main{ padding:16px; }
  .hero{ padding:26px 16px 18px; }
  .topbar{ margin-bottom:14px; }
  .brandLogoWrap{ width:46px; height:46px; border-radius:14px; padding:9px; }

  .hero h1{ font-size:28px; line-height:1.12; }
  .tagline{ font-size:14px; margin-bottom:18px; }
  .hero-stats div{ min-width: 0; width: 100%; }

  .tabs{
    gap:8px;
    padding:10px;
    overflow-x:auto;
    justify-content:flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .tabs button{
    flex:0 0 auto;
    padding:10px 14px;
    border-radius:12px;
    white-space:nowrap;
  }

  .card{ padding:14px; border-radius:16px; }
  .row{ align-items:stretch; }
  .grow, .grow2{ flex: 1 1 100%; }
  .btnCol{ width:100%; }
  .btnCol button{ width:100%; }

  input, select{ padding:12px; border-radius:12px; }


  .panel-grid{
    grid-template-columns: 1fr !important;
    gap:12px;
  }
  .panel{ border-radius:16px; padding:14px; }


  .agentTypeGrid{ grid-template-columns: 1fr !important; }

  .agentTop{ flex-direction:column; }
  .badge{ align-self:flex-start; }

  footer{ padding:26px 16px; }
}

@media (max-width: 980px){
  .panel-grid{ grid-template-columns: 1fr; }
}