:root {
  --neon-green: #00ff00;
  --neon-purple: #6200ea;
  --bg-black: #050505;
  --panel-bg: #0a0a0a;
  --terminal-bg: #111111;
  --msg-ai-bg: #1a1a1a;
  --msg-user-bg: #00ff00;
  --border-color: #333;
  --text-dim: #888;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-black);
  color: #fff;
  font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
}

.w-40 { width: 40%; }
.w-60 { width: 60%; }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #050505;
}
::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #333;
}

#chat-feed {
  scroll-behavior: smooth;
}

.msg {
  position: relative;
  animation: fadeIn 0.3s ease-out;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  line-height: 1.6;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.ai {
  border-left: 3px solid var(--neon-green);
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.05);
}

.msg.user {
  border-right: 3px solid var(--neon-purple);
  box-shadow: 0 4px 15px rgba(98, 0, 234, 0.05);
}

#audit-btn {
  background: var(--neon-green);
  color: #000;
  border: none;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#audit-btn:hover {
  background: #00cc00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
  transform: scale(1.02);
}

#helio-checkout-btn {
  background: var(--neon-purple);
  border: none;
  transition: all 0.2s ease;
}

#helio-checkout-btn:hover {
  background: #5000ca;
  box-shadow: 0 0 15px rgba(98, 0, 234, 0.3);
  transform: scale(1.02);
}

.animate-pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

#character-sprite {
  filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.1));
}

/* Glassmorphism for status box */
.bg-black.border.border-secondary {
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .w-40 { display: none !important; }
  .w-60 { width: 100% !important; }
}

#ai-dialogue-text {
    white-space: pre-wrap; /* Preserves newlines and enables wrapping */
    line-height: 1.5; /* Improves readability */
}

.sprite-container {
  height: 325px; /* 350px image height minus the 25px negative margin */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Anchors the character perfectly to the box */
}

.sprite-container img {
  height: 350px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(0, 255, 0, 0.15));
  margin-bottom: -25px; /* Overlap dialogue box */
  position: relative;
  z-index: 1;
}

#live-market-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid #333;
  /* border-bottom: 2px solid var(--neon-green); */
  border-bottom: 2px solid rgba(0, 255, 0, 0.4);
  border-radius: 8px;
  margin-bottom: 20px;
  z-index: 3;
}

.pulsating-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
  70% { opacity: 0.3; box-shadow: 0 0 0 5px rgba(0, 255, 0, 0); }
  100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

.market-pill {
  background: #111;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;

  white-space: nowrap; /* 1. Prevents the text from stacking vertically */
  flex-shrink: 0;      /* 2. Prevents the pill from being crushed by the flex container */
}

.market-pill:hover {
  background: #222;
  border-color: #666;
}

.market-pill.positive {
  color: var(--neon-green);
}

.market-pill.negative {
  color: #ff3333;
}

#wallet-scan-ticker {
  display: none;
  width: 100%;
  padding: 0 0 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px dashed #333;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#wallet-scan-ticker::-webkit-scrollbar {
  display: none;
}

.wallet-summary-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: #b8b8b8;
}

.wallet-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wallet-emoji {
  opacity: 0.85;
}

.wallet-sep {
  opacity: 0.45;
}

.wallet-status {
  font-weight: 700;
}

@media (max-width: 576px) {
  .input-group-custom {
    flex-direction: column;
    gap: 12px;
  }
  
  .input-group-custom input,
  .input-group-custom button {
    width: 100%;
  }

  #live-market-header {
    flex-direction: row; 
    align-items: center;
    gap: 12px;
    padding: 5px 12px; 
  }

  /* 2. Hide the "LIVE TRENCHES" text, but keep the pulsing dot */
  #live-market-header > div:first-child span {
    display: none;
  }

  /* 3. Force pills into a single horizontal scrolling row */
  #market-pill-container {
    width: 100%;
    flex-wrap: nowrap; 
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* Enables smooth momentum scrolling on iOS */
    scrollbar-width: none; /* Hides scrollbar in Firefox */
  }

  /* 4. Hide the scrollbar in Webkit (Chrome/Safari) for a clean look */
  #market-pill-container::-webkit-scrollbar {
    display: none; 
  }
}