/* Moni — earthy futuristic theme on top of Tailwind CDN. */

:root {
  --bg0: #0a0d0a;
  --bg1: #10160f;
}

body {
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(123, 182, 97, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(201, 138, 94, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  background-attachment: fixed;
}

/* Mouse-follow canvas sits behind everything. */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Glassmorphism panels */
.glass {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(205, 214, 196, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(205, 214, 196, 0.10);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(123, 182, 97, 0.35);
  box-shadow: 0 12px 40px rgba(63, 122, 58, 0.18);
}

.glow { text-shadow: 0 0 18px rgba(123, 182, 97, 0.45); }
h1, h2, h3 { font-family: "Space Grotesk", system-ui, sans-serif; }

/* Status / action chips */
.chip {
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(205, 214, 196, 0.18);
  font-weight: 500;
  transition: all 0.2s ease;
}
.chip-on { color: #7bb661; border-color: rgba(123, 182, 97, 0.5); box-shadow: 0 0 12px rgba(123,182,97,0.25); }
.chip-sky { color: #6fb6d6; border-color: rgba(111, 182, 214, 0.5); }
.chip-off { color: rgba(205, 214, 196, 0.4); }
.chip-clay { color: #e0b089; border-color: rgba(201, 138, 94, 0.5); }
.chip-clay:hover { background: rgba(201, 138, 94, 0.15); }

/* Sentiment / action pills */
.pill { padding: 0.1rem 0.5rem; border-radius: 0.4rem; font-size: 0.7rem; font-weight: 600; }
.pill-good, .pill-buy { background: rgba(123,182,97,0.18); color: #9fd585; }
.pill-bad, .pill-sell { background: rgba(225,90,90,0.18); color: #f0a3a3; }
.pill-neutral, .pill-hold { background: rgba(205,214,196,0.12); color: #cdd6c4; }

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
code {
  background: rgba(205, 214, 196, 0.12);
  padding: 0 0.3rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}
html { scroll-behavior: smooth; }
a { text-underline-offset: 3px; }

/* Loading spinner */
.spin {
  width: 18px; height: 18px; border-radius: 9999px; flex: none;
  border: 2px solid rgba(205, 214, 196, 0.25);
  border-top-color: #7bb661;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
.spin-sm { width: 13px; height: 13px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: rgba(205, 214, 196, 0.55); }

/* Help tooltip icon */
.help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px; height: 14px;
  margin-left: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(205, 214, 196, 0.35);
  font-size: 9px;
  color: rgba(205, 214, 196, 0.7);
  cursor: help;
  vertical-align: middle;
}
.help:hover { border-color: #7bb661; color: #9fd585; }

/* AI helper chat widget */
.chat-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 54px; height: 54px; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 26, 20, 0.85);
  border: 1px solid rgba(123, 182, 97, 0.45);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45), 0 0 16px rgba(123, 182, 97, 0.25);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); }
.chat-panel {
  position: fixed; right: 18px; bottom: 84px; z-index: 40;
  width: min(360px, calc(100vw - 36px));
  border-radius: 1rem; overflow: hidden;
  display: flex; flex-direction: column;
}
.chat-head { padding: 0.7rem 1rem; border-bottom: 1px solid rgba(205, 214, 196, 0.12); }
.chat-log {
  padding: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem;
  max-height: 48vh; overflow-y: auto; font-size: 0.85rem;
}
.chat-msg { padding: 0.5rem 0.7rem; border-radius: 0.7rem; max-width: 85%; line-height: 1.35; }
.chat-you { align-self: flex-end; background: rgba(201, 138, 94, 0.18); color: #e8d4c2; }
.chat-ai { align-self: flex-start; background: rgba(123, 182, 97, 0.12); color: #d7e3cd; }
.chat-form { display: flex; gap: 0.4rem; padding: 0.7rem; border-top: 1px solid rgba(205, 214, 196, 0.12); }
