/* ═══════════════════════════════════════
   WAGENT — PREMIUM UPGRADE + CHATBOT
   Mobile-first overhaul
═══════════════════════════════════════ */

/* ── PREMIUM GLASS EFFECTS ── */
nav {
  background: rgba(2,5,8,0.92) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
  border-bottom: 1px solid rgba(179,230,0,0.08) !important;
  box-shadow: 0 1px 40px rgba(204,255,0,0.06);
}

/* ── PREMIUM HERO LOGO ── */
.hero-logo-img {
  width: clamp(120px, 35vw, 180px) !important;
  height: clamp(120px, 35vw, 180px) !important;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(204,255,0,0.7)) drop-shadow(0 0 60px rgba(179,230,0,0.35));
  border-radius: 20px;
}

/* ── PREMIUM SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(204,255,0,0.4); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(179,230,0,0.5); }

/* ── PREMIUM SELECTION ── */
::selection { background: rgba(204,255,0,0.35); color: var(--cyan); }

/* ── PREMIUM CARD HOVER EFFECTS ── */
.agent-block {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  backdrop-filter: blur(8px);
}
.agent-block:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 60px rgba(204,255,0,0.15), 0 0 0 1px rgba(179,230,0,0.2) !important;
}

/* ── PREMIUM BUY CARD ── */
.buy-card {
  background: linear-gradient(135deg, rgba(204,255,0,0.06) 0%, rgba(179,230,0,0.04) 50%, rgba(204,255,0,0.06) 100%) !important;
  border: 1px solid rgba(179,230,0,0.15) !important;
  box-shadow: 0 0 80px rgba(204,255,0,0.06), inset 0 1px 0 rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(16px);
}

/* ── PREMIUM SECTION DIVIDERS ── */
.section-wrap::before {
  content: none;
}

/* ── FLOATING WAGENT CHAT BUTTON ── */
#wagent-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1628, #071020);
  border: 2px solid rgba(204,255,0,0.5);
  box-shadow:
    0 0 0 0 rgba(204,255,0,0.4),
    0 8px 32px rgba(204,255,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: chatBtnPulse 3s ease-in-out infinite;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}
#wagent-chat-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 8px rgba(204,255,0,0.1), 0 12px 40px rgba(204,255,0,0.4);
}
#wagent-chat-btn:active { transform: scale(0.96); }
@keyframes chatBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(204,255,0,0.4), 0 8px 32px rgba(204,255,0,0.3); }
  50% { box-shadow: 0 0 0 10px rgba(204,255,0,0.0), 0 8px 32px rgba(179,230,0,0.35); }
}
#wagent-chat-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
}
.wagent-pulse-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(179,230,0,0.3);
  animation: pulseRing 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}
.wagent-online-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 12px; height: 12px;
  background: var(--green);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 8px var(--green);
  animation: ldot 2s ease-in-out infinite;
}

/* ── WAGENT CHAT WINDOW ── */
#wagent-chat-window {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 380px;
  height: 540px;
  max-height: calc(100vh - 120px);
  background: rgba(4,8,18,0.97);
  border: 1px solid rgba(204,255,0,0.25);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  z-index: 9989;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.6),
    0 0 0 1px rgba(179,230,0,0.06),
    0 0 60px rgba(204,255,0,0.08);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
#wagent-chat-window.wc-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Chat header */
.wc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(204,255,0,0.15);
  background: linear-gradient(135deg, rgba(204,255,0,0.08), rgba(179,230,0,0.04));
  flex-shrink: 0;
}
.wc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(204,255,0,0.4);
  object-fit: cover;
  box-shadow: 0 0 16px rgba(204,255,0,0.3);
}
.wc-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(179,230,0,0.4);
}
.wc-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted2);
  margin-top: 2px;
}
.wc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: ldot 2s infinite;
}
.wc-minimize {
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted2);
  transition: all 0.2s;
  font-family: monospace;
}
.wc-minimize:hover {
  background: rgba(204,255,0,0.2);
  color: var(--cyan);
}

/* Chat messages */
.wc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.wc-messages::-webkit-scrollbar { width: 3px; }
.wc-messages::-webkit-scrollbar-thumb { background: rgba(204,255,0,0.3); border-radius: 2px; }

.wc-msg { display: flex; max-width: 85%; }
.wc-msg-bot { align-self: flex-start; }
.wc-msg-user { align-self: flex-end; flex-direction: row-reverse; }

.wc-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  font-family: 'Exo 2', sans-serif;
}
.wc-msg-bot .wc-bubble {
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.2);
  color: rgba(237,244,255,0.85);
  border-bottom-left-radius: 4px;
}
.wc-msg-user .wc-bubble {
  background: linear-gradient(135deg, #CCFF00, #8FBF00);
  color: #050807;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(204,255,0,0.3);
}

/* Typing indicator */
.wc-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(204,255,0,0.08);
  border: 1px solid rgba(204,255,0,0.15);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.wc-typing span {
  width: 6px; height: 6px;
  background: rgba(179,230,0,0.6);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}
.wc-typing span:nth-child(2) { animation-delay: 0.2s; }
.wc-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Quick buttons */
.wc-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid rgba(204,255,0,0.1);
  flex-shrink: 0;
}
.wc-quick-btns button {
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.25);
  color: rgba(179,230,0,0.8);
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.wc-quick-btns button:hover {
  background: rgba(204,255,0,0.2);
  color: var(--cyan);
  border-color: rgba(179,230,0,0.4);
}

/* Chat input */
.wc-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(204,255,0,0.15);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
#wcInput {
  flex: 1;
  background: rgba(204,255,0,0.06);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--white);
  font-family: 'Exo 2', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#wcInput::placeholder { color: var(--muted2); }
#wcInput:focus {
  border-color: rgba(204,255,0,0.5);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.08);
}
#wcSendBtn {
  width: 40px; height: 40px;
  background: var(--blue);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  color: var(--bg);
}
#wcSendBtn svg { width: 16px; height: 16px; }
#wcSendBtn:hover { background: var(--cyan); color: var(--bg); box-shadow: 0 0 16px rgba(179,230,0,0.3); }
#wcSendBtn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── MOBILE CHAT WINDOW ── */
@media (max-width: 480px) {
  #wagent-chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 75vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    bottom: 90px;
  }
  #wagent-chat-btn {
    bottom: 20px;
    right: 20px;
    width: 58px;
    height: 58px;
  }
  #wagent-chat-logo { width: 38px; height: 38px; }
}

/* ── PREMIUM MOBILE IMPROVEMENTS ── */
@media (max-width: 768px) {
  /* Better touch targets */
  .btn-prime, .btn-ghost {
    padding: 14px 24px !important;
    font-size: 10px !important;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Better hero on mobile */
  .hero-content {
    padding: 20px 16px !important;
  }

  /* Stack buy buttons on mobile */
  .buy-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .buy-btns a {
    text-align: center;
  }

  /* Agent blocks full width on mobile */
  .agents-grid {
    grid-template-columns: 1fr !important;
  }

  /* Better step rows on mobile */
  .step-row {
    flex-direction: column;
    gap: 12px;
  }

  /* Command center mobile */
  .cc-wrap {
    grid-template-columns: 1fr !important;
  }

  /* Tokenomics mobile */
  .tknomics-wrap {
    flex-direction: column;
    align-items: center;
  }

  /* Table scrollable */
  .stack-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── PREMIUM GLOW EFFECTS ── */
.hero-logo-wrap {
  position: relative;
}
.hero-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(204,255,0,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ── PREMIUM SECTION BACKGROUNDS ── */
#agents { background: linear-gradient(180deg, transparent 0%, rgba(204,255,0,0.02) 50%, transparent 100%); }
#tokenomics { background: linear-gradient(180deg, transparent 0%, rgba(179,230,0,0.015) 50%, transparent 100%); }

/* ── READABILITY PASS ──
   Keeps the cyber density, but makes body copy/tables readable on desktop and mobile. */
:root {
  --muted: #C8D3E6;
  --muted2: #9AAECD;
}

body {
  color: rgba(237,244,255,.84);
}

p,
.s-sub,
.hero-copy,
.what-copy,
.how-copy,
.concept-text,
.ab-desc,
.agent-block p,
.tp-desc,
.rm-check,
.mf-text,
.buy-step-text,
.docs-hero p,
.docs-card p,
.docs-agent p,
.docs-flow-line span,
.econ-copy {
  color: rgba(226,236,250,.8) !important;
}

.nav-links a,
.mobile-menu a,
.s-label,
.hstat-lbl,
.agent-status,
.agent-stat-lbl,
.feed-title,
.fi-t,
.fi-ds,
.fi-hs,
.csg-l,
.tt,
.ww-addr,
.wb-tok,
.cs-lbl,
.cs-b-lbl,
.rm-phase,
.buy-meta,
.ft-links a,
.ft-disc,
.sb-i,
.tokenomics-label {
  color: rgba(205,219,240,.76) !important;
}

.stack-table th {
  font-size: 11px !important;
  letter-spacing: 2px !important;
  color: rgba(125,164,255,.96) !important;
  padding: 16px 18px !important;
}

.stack-table td {
  font-size: 13px !important;
  line-height: 1.65 !important;
  color: rgba(224,235,250,.82) !important;
  padding: 18px !important;
}

.stack-table td:first-child {
  color: #F5F9FF !important;
  font-weight: 600 !important;
}

.feed-item,
.wallet-row,
.contract-strip,
.docs-card,
.docs-agent,
.docs-flow,
.agent-block,
.stack-table,
.rm-item {
  border-color: rgba(179,230,0,.28) !important;
}

.feed-inner,
.feed-item-right,
.live-console,
.docs-card,
.docs-agent,
.docs-flow {
  background-color: rgba(3,10,22,.86) !important;
}

.feed-item,
.dlog-i,
.tt {
  font-size: 11px !important;
}

.fi-ds {
  font-size: 10px !important;
  line-height: 1.55 !important;
}

.fi-hs {
  font-size: 9px !important;
}

.ab-rule,
.rm-check,
.docs-card p,
.docs-agent p {
  line-height: 1.75 !important;
}

@media (max-width: 760px) {
  p,
  .rm-check,
  .docs-card p,
  .docs-agent p,
  .concept-text,
  .ab-desc {
    color: rgba(237,244,255,.88) !important;
  }

  .stack-table th {
    font-size: 10px !important;
    letter-spacing: 1.4px !important;
    padding: 13px 12px !important;
  }

  .stack-table td {
    font-size: 12px !important;
    line-height: 1.6 !important;
    padding: 14px 12px !important;
  }
}

/* ── PREMIUM TEXT GLOW ── */
.hero-h1 .word {
  text-shadow: 0 0 80px rgba(179,230,0,0.2);
}
.s-title .hl {
  text-shadow: 0 0 30px rgba(179,230,0,0.3);
}

/* ── NAV LOGO IMAGE ── */
.nav-logo-img {
  border-radius: 8px;
  border: 1px solid rgba(204,255,0,0.3);
  box-shadow: 0 0 12px rgba(204,255,0,0.2);
}

/* ── PREMIUM FOOTER ── */
footer {
  background: linear-gradient(180deg, transparent, rgba(204,255,0,0.03)) !important;
  border-top: 1px solid rgba(204,255,0,0.1) !important;
}

/* ── LOADING SHIMMER FOR PREMIUM FEEL ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── PREMIUM ROADMAP NODES ── */
.rm-node {
  box-shadow: 0 0 20px rgba(179,230,0,0.4);
}

/* ── PREMIUM MODAL ── */
.modal-box {
  backdrop-filter: blur(40px) !important;
  -webkit-backdrop-filter: blur(40px) !important;
  border: 1px solid rgba(179,230,0,0.12) !important;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(204,255,0,0.1) !important;
}

/* ── STATUS BAR BOTTOM PADDING FIX ── */
.statusbar {
  padding-bottom: max(env(safe-area-inset-bottom), 8px);
}

/* ── PREMIUM PRICE STRIP ── */
.price-strip {
  background: rgba(0,0,0,0.6) !important;
  backdrop-filter: blur(20px);
}

/* ── COMMAND CENTER LOG HARDENING ── */
#live .cc-wrap {
  align-items: start;
}

#live .cc-sidebar,
#live .cc-feed,
#live .cc-right {
  min-width: 0;
}

#live .cc-feed {
  align-self: start;
  min-height: 0;
}

#live .feed-inner {
  height: clamp(360px, 52vh, 620px) !important;
  max-height: clamp(360px, 52vh, 620px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px !important;
  gap: 6px !important;
}

#live .feed-item {
  grid-template-columns: 82px 28px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 8px !important;
  padding: 9px 10px !important;
  min-height: 74px !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

#live .fi-t {
  color: rgba(237,244,255,.82) !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

#live .fi-ic {
  line-height: 1 !important;
}

#live .fi-ag {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#live .fi-ds,
#live .fi-hs {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#live .fi-hs a {
  display: inline-block !important;
  max-width: 140px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: bottom !important;
}

#live .cc-right {
  align-self: start !important;
  min-height: 0 !important;
}

#live .cc-right > .cc-panel:last-child {
  max-height: 420px !important;
  min-height: 240px !important;
  overflow: hidden !important;
}

#live .dlog {
  height: 330px !important;
  max-height: 330px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px !important;
  gap: 8px !important;
}

#live .dlog-i {
  display: block !important;
  color: rgba(237,244,255,.86) !important;
  background: rgba(0,0,0,.22) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  letter-spacing: .5px !important;
  padding: 7px 9px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#live .dlog-i a {
  display: none !important;
}

@media (min-width: 768px) {
  #live .cc-wrap {
    grid-template-rows: 190px 130px auto !important;
    align-items: start !important;
  }
}

@media (max-width: 767px) {
  #live .feed-inner {
    height: 420px !important;
    max-height: 420px !important;
  }

  #live .dlog {
    height: 260px !important;
    max-height: 260px !important;
  }

  #live .feed-item {
    grid-template-columns: 70px 24px minmax(0, 1fr) !important;
  }
}

/* ── COMMAND CENTER BOX FIX V2 ── */
#live .cc-wrap {
  align-items: start !important;
}

#live .cc-feed {
  min-height: 0 !important;
  overflow: hidden !important;
}

#live .feed-inner {
  display: block !important;
  height: 520px !important;
  max-height: 520px !important;
  min-height: 360px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px !important;
}

#live .feed-item {
  display: grid !important;
  grid-template-columns: 76px 28px minmax(0, 1fr) !important;
  min-height: 78px !important;
  margin: 0 0 8px 0 !important;
  box-sizing: border-box !important;
}

#live .cc-right > .cc-panel:last-child {
  height: 372px !important;
  max-height: 372px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#live .dlog {
  display: block !important;
  height: 300px !important;
  max-height: 300px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px !important;
  box-sizing: border-box !important;
  contain: content !important;
}

#live .dlog-i {
  display: grid !important;
  grid-template-columns: 58px 74px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 0 7px 0 !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  color: rgba(237,244,255,.88) !important;
  background: rgba(2,8,18,.72) !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: .35px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

#live .dl-time,
#live .dl-agent,
#live .dl-msg {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#live .dl-time {
  color: rgba(237,244,255,.66) !important;
}

#live .dl-agent {
  color: var(--blue) !important;
  font-weight: 700 !important;
}

#live .dl-msg {
  color: rgba(237,244,255,.78) !important;
}

@media (max-width: 767px) {
  #live .feed-inner {
    height: 420px !important;
    max-height: 420px !important;
  }

  #live .cc-right > .cc-panel:last-child {
    height: 310px !important;
    max-height: 310px !important;
  }

  #live .dlog {
    height: 240px !important;
    max-height: 240px !important;
  }

  #live .dlog-i {
    grid-template-columns: 52px 68px minmax(0, 1fr) !important;
    font-size: 9px !important;
  }
}
