:root{
  --bg: #0E1520;
  --bg-soft: #121A27;
  --panel: #151E2D;
  --panel-2: #182234;
  --border: #232E42;
  --text: #EAEEF6;
  --text-dim: #8B96AA;
  --text-faint: #5B6478;
  --blue: #4E8EFF;
  --blue-dim: #2C4A8C;
  --purple: #8A7BFF;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --maxw: 1180px;
}

*{ box-sizing: border-box; }

html,body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor:pointer; }

/* ---------- Top bar ---------- */
.topbar{
  padding: 24px 32px 0;
}
.topbar-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
}
.topbar-spacer{ flex:1; }
.topbar-actions{ display:flex; align-items:center; gap:10px; }

.icon-btn{
  width: 40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover{ color: var(--text); border-color:#33415c; background: var(--panel-2); }
.icon-btn svg{ width:18px; height:18px; }

.connect-btn{
  background: var(--text);
  color: #0E1520;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.connect-btn:hover{ opacity:.88; }
.connect-btn:active{ transform: scale(.98); }
.connect-btn:disabled{
  background: var(--surface-2, #1a2230);
  color: var(--text-faint, #8a93a6);
  cursor: default;
  opacity: 1;
}
.connect-btn:disabled:hover{ opacity: 1; }

/* ---------- Hero / search ---------- */
.hero{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 32px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* Brand / logo */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom: 36px;
}
.brand-mark{
  background: none;
  border: none;
  padding: 6px;
  margin: -6px;
  border-radius: 12px;
  display:flex;
  perspective: 260px;
  transition: background .15s ease;
}
.brand-mark:hover{ background: rgba(255,255,255,.05); }
.brand-mark:focus-visible{ outline: 2px solid var(--blue); outline-offset: 2px; }
.brand-mark svg{
  transform-style: preserve-3d;
  filter: drop-shadow(0 3px 8px rgba(78,142,255,.35));
}
.brand-mark.spinning svg{
  animation: gemSpin 0.9s cubic-bezier(.3,.1,.2,1);
}
@keyframes gemSpin{
  0%{ transform: rotateY(0) scale(1); }
  50%{ transform: rotateY(190deg) scale(1.08); }
  100%{ transform: rotateY(360deg) scale(1); }
}
.brand-text{ border-radius: 8px; }
.brand-text:hover{ opacity: .9; }
.brand h1{
  margin:0;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.brand-suffix{ color: var(--blue); }

.search-wrap{
  position:relative;
  width: 100%;
  max-width: 820px;
  display:flex;
  align-items:center;
}
.search-icon{
  position:absolute;
  left: 20px;
  width: 20px; height:20px;
  color: var(--text-faint);
  cursor: pointer;
}
#searchInput{
  width:100%;
  height: 60px;
  background: var(--panel);
  border: 1.5px solid #2C6BE0;
  box-shadow: 0 0 0 4px rgba(78,142,255,.12);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  padding: 0 56px;
  outline:none;
}
#searchInput::placeholder{ color: var(--text-faint); }
#searchInput:focus{ border-color: var(--blue); box-shadow: 0 0 0 5px rgba(78,142,255,.18); }

.paste-btn{
  position:absolute;
  right: 14px;
  width: 34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  background: transparent;
  border:none;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color .15s ease, background .15s ease;
}
.paste-btn:hover{ color: var(--text); background: var(--panel-2); }
.paste-btn svg{ width:18px; height:18px; }

/* ---------- Stats bar ---------- */
.stats-bar{
  width:100%;
  margin-top: 40px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display:grid;
  grid-template-columns: auto 1.3fr auto auto 1.3fr;
  align-items:center;
  column-gap: 32px;
}
.stat-cell{ min-width: 0; display:block; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; transition: background .15s ease; }
.stat-cell:hover{ background: rgba(255,255,255,.04); }
.stat-label{
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  white-space: nowrap;
}
.stat-value{
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.stat-chart{ height: 56px; }
.stat-chart svg{ width:100%; height:100%; display:block; }

@media (max-width: 900px){
  .stats-bar{ grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .stat-chart{ grid-column: span 2; }
}

/* ---------- Columns ---------- */
.columns{
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 0 32px 64px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
@media (max-width: 860px){
  .columns{ grid-template-columns: 1fr; }
}

.col-head{
  display:flex;
  align-items:center;
  gap:6px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}
.col-head--spaced{ margin-top: 32px; }
.chev{ color: var(--text-faint); font-weight:400; transition: transform .15s ease; }
.col-head:hover .chev{ transform: translateX(2px); }

.app-list, .token-list, .legend{
  list-style:none;
  margin:0; padding:0;
  display:flex;
  flex-direction:column;
  gap: 18px;
}

.app-row{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  padding: 6px;
  margin: -6px;
  border-radius: 12px;
  transition: background .15s ease;
}
.app-row:hover{ background: rgba(255,255,255,.04); }
.app-icon{
  width: 44px; height:44px;
  border-radius: 12px;
  flex: none;
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  overflow:hidden;
}
.app-icon svg{ width: 22px; height: 22px; }
.app-icon--img{ background: var(--panel-2); border: 1px solid var(--border); }
.app-icon--img img{ width:100%; height:100%; object-fit: cover; display:block; }
.app-text{ min-width:0; }
.app-name{ font-size:15px; font-weight:600; color: var(--text); margin-bottom:2px; }
.app-desc{ font-size:13px; color: var(--text-dim); line-height:1.4; }


/* Wallet addresses */
.addr-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
.addr-row{ display:block; padding:4px 6px; margin:-4px -6px; border-radius:10px; transition: background .15s ease; }
.addr-row:hover{ background: rgba(255,255,255,.04); }
.addr-label{ font-size:15px; font-weight:600; color: var(--text); margin-bottom:3px; }
.addr-sample{ font-size:13px; color: var(--text-dim); }

/* Auctions */
.auction-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.auction-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:6px; margin:-6px; border-radius:10px; transition: background .15s ease;
}
.auction-row:hover{ background: rgba(255,255,255,.04); }
.auction-name{ font-size:15px; font-weight:600; color: var(--text); margin-bottom:2px; }
.auction-meta{ font-size:12.5px; color: var(--text-faint); }
.auction-price{ font-size:14px; font-weight:600; color: var(--text); white-space:nowrap; }

/* News */
.news-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
.news-row{
  display:flex; gap:12px; align-items:center;
  padding:6px; margin:-6px; border-radius:12px; transition: background .15s ease;
}
.news-row:hover{ background: rgba(255,255,255,.04); }
.news-thumb{ width:56px; height:56px; border-radius:10px; flex:none; overflow:hidden; }
.news-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.news-title{ font-size:14px; font-weight:600; color: var(--text); line-height:1.35; margin-bottom:4px; }
.news-meta{ font-size:12.5px; color: var(--text-faint); }

.mini-head--spaced{ margin-top: 32px; }

/* Tokens block */
.token-group{ margin-bottom: 4px; }
.token-group-title{
  display:flex;
  align-items:center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.token-avatars{
  display:flex;
}
.token-avatars .mini-avatar{
  width: 26px; height:26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -8px;
  background-size: cover;
  background-position:center;
  display:flex; align-items:center; justify-content:center;
  font-size: 12px;
  color:#fff;
}
.token-avatars .mini-avatar:first-child{ margin-left:0; }

/* Stats column */
.stats-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.stats-grid-cell .stat-value{ font-size: 22px; }

.mini-head{
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.bar-split{
  display:flex;
  width:100%;
  height: 10px;
  border-radius: 999px;
  overflow:hidden;
  margin-bottom: 14px;
  background: var(--border);
}
.bar-split span{ height:100%; }

.legend{
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 30px;
}
.legend li{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 13px;
  color: var(--text-dim);
  width: calc(50% - 11px);
}
.legend .dot{
  width:8px; height:8px;
  border-radius:50%;
  flex:none;
}
.legend .pct{
  margin-left:auto;
  color: var(--text);
  font-weight:600;
}

/* ---------- Footer ---------- */
.footer{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px 48px;
  color: var(--text-faint);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.footer p{ margin: 0 0 6px; max-width: 640px; }

.footer-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: 22px;
  margin-bottom: 28px;
}
.footer-links a{
  font-size: 13px;
  color: var(--text-dim);
  transition: color .15s ease;
}
.footer-links a:hover{ color: var(--text); }

.footer-badge{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--text-dim);
  font-size: 11.5px;
  line-height:1.3;
  text-align:left;
  margin-bottom: 14px;
  transition: color .15s ease;
}
.footer-badge:hover{ color: var(--text); }
.footer-badge svg{ flex:none; }

.footer-copy{
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 20px;
  transition: color .15s ease;
}
.footer-copy:hover{ color: var(--text-dim); }
.footer-live{ display:flex; align-items:center; gap:6px; }
.live-dot{
  width:7px; height:7px;
  border-radius:50%;
  background:#3AC97A;
  display:inline-block;
  box-shadow: 0 0 0 0 rgba(58,201,122,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(58,201,122,.5); }
  70%{ box-shadow: 0 0 0 6px rgba(58,201,122,0); }
  100%{ box-shadow: 0 0 0 0 rgba(58,201,122,0); }
}

/* =====================================================
   Mobile version
   Tablet breakpoint: <=768px, Phone breakpoint: <=480px
===================================================== */
@media (max-width: 768px){
  .topbar{ padding: 16px 18px 0; }
  .icon-btn{ width:36px; height:36px; }
  .icon-btn svg{ width:16px; height:16px; }
  .connect-btn{ padding: 9px 16px; font-size: 13px; }

  .hero{ padding: 32px 18px 0; }
  .brand{ gap:10px; margin-bottom: 24px; }
  .brand-mark svg{ width:34px; height:34px; }
  .brand h1{ font-size: 30px; }

  #searchInput{ height: 52px; font-size: 15px; padding: 0 48px; }
  .search-icon{ left:16px; width:18px; height:18px; }
  .paste-btn{ right:10px; width:30px; height:30px; }

  .stats-bar{
    margin-top: 28px;
    padding: 18px 18px;
    grid-template-columns: 1fr 1fr;
    row-gap: 18px;
    column-gap: 18px;
  }
  .stat-value{ font-size: 20px; }
  .stat-chart{ grid-column: span 2; height: 44px; }

  .columns{ margin: 40px auto 0; padding: 0 18px 48px; gap: 36px; }
  .col-head{ font-size: 18px; margin-bottom: 14px; }
  .col-head--spaced{ margin-top: 26px; }

  .app-icon{ width:40px; height:40px; }
  .app-icon svg{ width:20px; height:20px; }

  .footer{ padding: 0 18px 36px; padding-top: 24px; }
  .footer-links{ gap: 14px 18px; margin-bottom: 22px; }
}

@media (max-width: 480px){
  .topbar{ padding: 14px 14px 0; }
  .topbar-actions{ gap:8px; }
  .connect-btn{ padding: 8px 14px; font-size: 12.5px; }

  .hero{ padding: 24px 14px 0; }
  .brand{ flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
  .brand-mark svg{ width:30px; height:30px; }
  .brand h1{ font-size: 24px; letter-spacing: -0.3px; }

  #searchInput{ height: 48px; font-size: 14px; padding: 0 42px; border-radius: 14px; }
  .search-icon{ left:14px; width:16px; height:16px; }
  .paste-btn{ right:8px; width:28px; height:28px; }
  .paste-btn svg{ width:16px; height:16px; }

  .stats-bar{
    grid-template-columns: 1fr;
    padding: 16px;
    row-gap: 14px;
    border-radius: var(--radius-md);
  }
  .stat-chart{ grid-column: span 1; }
  .stat-label{ font-size: 12px; }
  .stat-value{ font-size: 19px; }

  .columns{ margin: 32px auto 0; padding: 0 14px 40px; gap: 30px; }
  .col-head{ font-size: 17px; }

  .app-row{ gap: 10px; }
  .app-icon{ width:38px; height:38px; border-radius: 10px; }
  .app-name{ font-size: 14px; }
  .app-desc{ font-size: 12.5px; }

  .stats-grid{ gap: 14px; margin-bottom: 22px; }
  .stats-grid-cell .stat-value{ font-size: 19px; }

  .news-thumb{ width:48px; height:48px; }

  .footer{ padding: 0 14px 30px; padding-top: 20px; font-size: 12px; }
  .footer-badge{ text-align:center; flex-direction:column; gap:4px; }
  .footer-note{ font-size: 11.5px; }
}
