/* ═══════════════════════════════════════
   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(0,229,255,0.08) !important;
  box-shadow: 0 1px 40px rgba(0,82,255,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(0,82,255,0.7)) drop-shadow(0 0 60px rgba(0,229,255,0.35));
  border-radius: 20px;
}

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

/* ── PREMIUM SELECTION ── */
::selection { background: rgba(0,82,255,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(0,82,255,0.15), 0 0 0 1px rgba(0,229,255,0.2) !important;
}

/* ── PREMIUM BUY CARD ── */
.buy-card {
  background: linear-gradient(135deg, rgba(0,82,255,0.06) 0%, rgba(0,229,255,0.04) 50%, rgba(0,82,255,0.06) 100%) !important;
  border: 1px solid rgba(0,229,255,0.15) !important;
  box-shadow: 0 0 80px rgba(0,82,255,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(0,82,255,0.5);
  box-shadow:
    0 0 0 0 rgba(0,82,255,0.4),
    0 8px 32px rgba(0,82,255,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(0,82,255,0.1), 0 12px 40px rgba(0,82,255,0.4);
}
#wagent-chat-btn:active { transform: scale(0.96); }
@keyframes chatBtnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,82,255,0.4), 0 8px 32px rgba(0,82,255,0.3); }
  50% { box-shadow: 0 0 0 10px rgba(0,82,255,0.0), 0 8px 32px rgba(0,229,255,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(0,229,255,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(0,82,255,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(0,229,255,0.06),
    0 0 60px rgba(0,82,255,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(0,82,255,0.15);
  background: linear-gradient(135deg, rgba(0,82,255,0.08), rgba(0,229,255,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(0,82,255,0.4);
  object-fit: cover;
  box-shadow: 0 0 16px rgba(0,82,255,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(0,229,255,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(0,82,255,0.1);
  border: 1px solid rgba(0,82,255,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(0,82,255,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(0,82,255,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(0,82,255,0.1);
  border: 1px solid rgba(0,82,255,0.2);
  color: rgba(237,244,255,0.85);
  border-bottom-left-radius: 4px;
}
.wc-msg-user .wc-bubble {
  background: linear-gradient(135deg, #0052FF, #003dd6);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,82,255,0.3);
}

/* Typing indicator */
.wc-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(0,82,255,0.08);
  border: 1px solid rgba(0,82,255,0.15);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}
.wc-typing span {
  width: 6px; height: 6px;
  background: rgba(0,229,255,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(0,82,255,0.1);
  flex-shrink: 0;
}
.wc-quick-btns button {
  background: rgba(0,82,255,0.1);
  border: 1px solid rgba(0,82,255,0.25);
  color: rgba(0,229,255,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(0,82,255,0.2);
  color: var(--cyan);
  border-color: rgba(0,229,255,0.4);
}

/* Chat input */
.wc-input-wrap {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,82,255,0.15);
  background: rgba(0,0,0,0.2);
  flex-shrink: 0;
}
#wcInput {
  flex: 1;
  background: rgba(0,82,255,0.06);
  border: 1px solid rgba(0,82,255,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(0,82,255,0.5);
  box-shadow: 0 0 0 3px rgba(0,82,255,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: white;
}
#wcSendBtn svg { width: 16px; height: 16px; }
#wcSendBtn:hover { background: var(--cyan); color: var(--bg); box-shadow: 0 0 16px rgba(0,229,255,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(0,82,255,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

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

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

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

/* ── PREMIUM FOOTER ── */
footer {
  background: linear-gradient(180deg, transparent, rgba(0,82,255,0.03)) !important;
  border-top: 1px solid rgba(0,82,255,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(0,229,255,0.4);
}

/* ── PREMIUM MODAL ── */
.modal-box {
  backdrop-filter: blur(40px) !important;
  -webkit-backdrop-filter: blur(40px) !important;
  border: 1px solid rgba(0,229,255,0.12) !important;
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,82,255,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);
}
