:root{
  --blue: #0052FF;
  --blue-2: #2A6CFF;
  --ink: #0B1220;
  --card: rgba(255,255,255,0.9);
  --line: rgba(17,27,46,0.12);
  --muted: rgba(11,18,32,0.65);
  --shadow: 0 18px 60px rgba(0, 82, 255, 0.16);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

[hidden]{ display:none !important; }

body{
  margin:0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: transparent;
  overflow-x:hidden;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(0,82,255,0.18), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(42,108,255,0.16), transparent 55%),
    linear-gradient(180deg, #F4F8FF 0%, #F7FAFF 55%, #FFFFFF 100%);
  background-attachment: fixed;
}

.container{
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.bg-orb{
  position: fixed;
  width: 560px;
  height: 560px;
  filter: blur(70px);
  opacity: 0.50;
  z-index: -1;
  pointer-events:none;
  transform: translateZ(0);
}
.orb-1{ left:-220px; top:140px; background: radial-gradient(circle at 30% 30%, rgba(0,82,255,0.35), transparent 60%); }
.orb-2{ right:-260px; top:-120px; background: radial-gradient(circle at 40% 40%, rgba(42,108,255,0.30), transparent 60%); }

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand__mark{
  width: 44px;
  height: 44px;
  display:grid;
  place-items:center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color:white;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.brand__title{ font-weight: 800; letter-spacing: -0.02em; }
.brand__sub{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.wallet{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}
.pill{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.pill--addr{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  padding: 22px 0 28px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 45px rgba(11,18,32,0.08);
}

.hero{
  grid-column: 1 / -1;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  padding: 22px;
  overflow:hidden;
  position: relative;
}
.hero:before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(800px 240px at 20% 0%, rgba(0,82,255,0.18), transparent 65%);
  pointer-events:none;
}
.hero__right{ display:flex; justify-content:flex-end; }

h1{
  margin: 0 0 10px;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2{
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.chip{
  display:inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,82,255,0.28);
  background: rgba(0,82,255,0.10);
  color: var(--blue);
  font-weight: 700;
}

.hero__stats{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stat{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.7);
}
.stat__num{ font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.stat__label{ font-size: 12px; color: var(--muted); margin-top: 4px; }

.notice{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(0,82,255,0.35);
  background: rgba(0,82,255,0.06);
}
.notice__badge{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  font-weight: 800;
  color:white;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.glow-card{
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0,82,255,0.10), rgba(255,255,255,0.75));
  border: 1px solid rgba(0,82,255,0.22);
  padding: 14px;
}
.glow-card__title{ font-weight: 800; letter-spacing:-0.02em; }
.glow-card__list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}
.glow-card__hint{
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0,82,255,0.85);
  font-weight: 700;
}

.form{ padding: 18px; }
.form__header{ display:flex; align-items:baseline; justify-content:space-between; gap: 12px; margin-bottom: 12px; }

.form__grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.field{ display:flex; flex-direction:column; gap: 6px; font-size: 12px; color: var(--muted); }
.field--full{ grid-column: 1 / -1; }

input, select, textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255,255,255,0.95);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
textarea{ resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus{
  border-color: rgba(0,82,255,0.45);
  box-shadow: 0 0 0 4px rgba(0,82,255,0.10);
}

.actions{
  display:flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn{
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: 0.55; cursor: not-allowed; }

.btn--primary{
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: white;
  box-shadow: var(--shadow);
}
.btn--primary:hover{ box-shadow: 0 22px 70px rgba(0,82,255,0.22); }

.btn--secondary{
  background: rgba(0,82,255,0.10);
  color: var(--blue);
  border-color: rgba(0,82,255,0.20);
}
.btn--secondary:hover{
  background: rgba(0,82,255,0.14);
  border-color: rgba(0,82,255,0.28);
}

.btn--ghost{
  background: rgba(255,255,255,0.8);
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover{ background: rgba(255,255,255,0.95); }

.status{
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.feed{ padding: 18px; }
.feed__header{ display:flex; align-items:baseline; justify-content:space-between; gap: 12px; margin-bottom: 12px; }
.feed__list{ display:grid; gap: 10px; }
.item{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.85);
}
.item__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
}
.item__title{ font-weight: 900; letter-spacing:-0.02em; }
.item__meta{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.badge{
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,82,255,0.20);
  background: rgba(0,82,255,0.08);
  color: rgba(0,82,255,0.95);
  font-weight: 800;
}
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ai{
  grid-column: 1 / -1;
  padding: 18px;
}

.ai__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ai__headerLeft{ display:flex; flex-direction:column; gap: 6px; }
.ai__actions{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}
.ai__body{ display:grid; gap: 12px; }

.ai-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ai-grid .ai-block:nth-child(1),
.ai-grid .ai-block:nth-child(2),
.ai-grid .ai-block:nth-child(3),
.ai-grid .ai-split{
  grid-column: 1 / -1;
}

.ai-block{
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,82,255,0.16);
  border-radius: 14px;
  padding: 12px;
}
.ai-block__title{
  font-weight: 900;
  font-size: 12px;
  color: rgba(0,82,255,0.95);
  margin-bottom: 6px;
}
.ai-block__content{
  color: rgba(11,18,32,0.90);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ai-list{
  margin: 0;
  padding-left: 18px;
  color: rgba(11,18,32,0.80);
  font-size: 14px;
  line-height: 1.55;
}

.ai-loader{
  display:flex;
  align-items:center;
  gap: 10px;
}
.spinner{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(0,82,255,0.18);
  border-top-color: rgba(0,82,255,0.90);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ai-thinking{
  display:flex;
  align-items:baseline;
  gap: 6px;
  font-size: 13px;
  color: rgba(0,82,255,0.92);
  font-weight: 800;
}
.dots::after{
  content:"";
  display:inline-block;
  width: 18px;
  text-align:left;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots{
  0% { content:""; }
  25% { content:"."; }
  50% { content:".."; }
  75% { content:"..."; }
  100% { content:""; }
}


.skeleton{ position: relative; overflow: hidden; }
.skeleton::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.10) 0%,
    rgba(0,82,255,0.10) 45%,
    rgba(255,255,255,0.10) 100%);
  transform: translateX(-60%);
  animation: shimmer 1.25s ease-in-out infinite;
}
@keyframes shimmer{
  0% { transform: translateX(-60%); }
  100% { transform: translateX(60%); }
}
.skeleton-line{
  height: 12px;
  border-radius: 10px;
  background: rgba(17,27,46,0.10);
  margin: 10px 0;
}
.w-60{ width: 60%; }
.w-65{ width: 65%; }
.w-68{ width: 68%; }
.w-70{ width: 70%; }
.w-75{ width: 75%; }
.w-76{ width: 76%; }
.w-80{ width: 80%; }
.w-82{ width: 82%; }
.w-88{ width: 88%; }
.w-90{ width: 90%; }
.w-92{ width: 92%; }
.w-95{ width: 95%; }
.w-96{ width: 96%; }

.footer{ padding: 12px 0 26px; }

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .hero{ grid-template-columns: 1fr; }
  h1{ font-size: 34px; }
  .hero__stats{ grid-template-columns: 1fr; }
  .ai-split{ grid-template-columns: 1fr; }
  .ai-grid{ grid-template-columns: 1fr; }
}

.wallet{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
  position: relative;
}

.walletMenu{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 260px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,27,46,0.14);
  box-shadow: 0 18px 60px rgba(11,18,32,0.14);
  z-index: 50;
}

.walletMenu__row{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.walletMenu__addr{
  font-size: 13px;
  color: rgba(11,18,32,0.90);
  word-break: break-all;
}

.walletMenu__actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand__logo{
  height: 38px;
  width: auto;
  display:block;
  border-radius: 12px;
}

@media (max-width: 1024px){
  .grid{
    grid-template-columns: 1fr !important;
  }

  .hero{
    flex-direction: column;
  }

  .hero__stats{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px){


  .container{
    padding-left: 16px;
    padding-right: 16px;
  }


  .grid{
    display: flex;
    flex-direction: column;
    gap: 18px;
  }


  .card{
    border-radius: 18px;
    padding: 18px;
  }

  .hero{
    flex-direction: column;
    gap: 20px;
  }

  .hero__stats{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form__grid{
    grid-template-columns: 1fr !important;
  }

  .field--full{
    grid-column: auto !important;
  }

  input,
  select,
  textarea{
    width: 100%;
    font-size: 16px; 
  }

  textarea{
    resize: vertical;
  }

  .actions{
    flex-direction: column;
    gap: 12px;
  }

  .btn{
    width: 100%;
    justify-content: center;
  }

  .wallet{
    width: 100%;
    justify-content: space-between;
  }

  .walletMenu{
    position: fixed;
    right: 16px;
    left: 16px;
    top: 70px;
    width: auto;
  }

  .ai{
    padding: 18px;
  }

  .ai-grid{
    grid-template-columns: 1fr !important;
  }

  .ai-split{
    grid-template-columns: 1fr !important;
  }

  .item{
    padding: 14px;
  }

  .item__top{
    flex-direction: column;
    gap: 6px;
  }

  *{
    max-width: 100%;
    box-sizing: border-box;
  }

  body{
    overflow-x: hidden;
  }
}

#connectBtn{
  padding: 6px 14px;  
  font-size: 14px;  
  border-radius: 999px;  
  width: auto;
  min-width: unset;
}

@media (max-width: 768px){

  .topbar__inner{
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .wallet{
    width: auto !important;
    justify-content: flex-end;
    margin-left: auto;
  }

  #connectBtn{
    width: auto !important;
    padding: 6px 12px;
    font-size: 13px;
  }

}