/* ============================================================
   NOLA9TECH Master Console — custom.css v6
   FULL SPECTRUM — Rainbow Neon Billion Dollar Edition
   ============================================================ */

/* ── MULTI-COLOR PALETTE ── */
:root {
  --c1: #ff6b6b;   /* coral red    */
  --c2: #ff9f43;   /* orange       */
  --c3: #ffd93d;   /* yellow       */
  --c4: #6bcb77;   /* green        */
  --c5: #4ecdc4;   /* teal         */
  --c6: #45b7d1;   /* sky blue     */
  --c7: #a855f7;   /* purple       */
  --c8: #ec4899;   /* hot pink     */
  --c9: #c8a84b;   /* gold         */

  /* Rainbow gradient — main accent */
  --rainbow: linear-gradient(135deg,
    #ff6b6b 0%,
    #ff9f43 14%,
    #ffd93d 28%,
    #6bcb77 42%,
    #4ecdc4 57%,
    #45b7d1 71%,
    #a855f7 85%,
    #ec4899 100%
  );
  /* Soft glow version */
  --rainbow-glow: linear-gradient(90deg,
    rgba(255,107,107,0.7),
    rgba(255,159,67,0.7),
    rgba(255,217,61,0.7),
    rgba(107,203,119,0.7),
    rgba(78,205,196,0.7),
    rgba(69,183,209,0.7),
    rgba(168,85,247,0.7),
    rgba(236,72,153,0.7)
  );

  --nola-black: #000000;
  --nola-dark: #050508;
  --nola-surface: rgba(10,10,18,0.78);
  --nola-surface2: rgba(16,16,28,0.88);
  --nola-border: rgba(255,255,255,0.12);
  --nola-text: #f5f5f5;
  --nola-text-dim: rgba(245,245,245,0.55);
  --nola-radius: 14px;
  --nola-blur: blur(18px);
  --nola-blur-sm: blur(8px);
  --nola-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

/* ── RESET BACKGROUNDS — canvas shows through ── */
html, body {
  background: transparent !important;
  background-color: transparent !important;
}
html::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #05050a;
  z-index: -2;
  pointer-events: none;
}
#app,
[data-sveltekit-hydrated],
main,
div[class*="bg-gray-900"],
div[class*="bg-gray-950"],
div[class*="bg-white"],
.dark .bg-gray-900,
.dark .bg-gray-950,
.dark .bg-white { background: transparent !important; }

/* ── SPLASH SCREEN ── */
#splash-screen {
  background: #05050a !important;
}
#splash-screen::after {
  content: 'NOLA9TECH';
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 22px;
  letter-spacing: 8px;
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HIDE PLATFORM BRANDING ── */
*[title*="Open WebUI"], *[alt*="Open WebUI"],
*[aria-label*="Open WebUI"] { display: none !important; }

/* ── LOGO — 4X with rainbow glow ── */
#logo {
  width: 10rem !important; height: 10rem !important;
  min-width: 10rem !important; min-height: 10rem !important;
  border-radius: 50% !important;
  filter: drop-shadow(0 0 24px rgba(168,85,247,0.8))
          drop-shadow(0 0 48px rgba(236,72,153,0.4)) !important;
  animation: nola-logo-rainbow 4s ease-in-out infinite !important;
}
img[class*="size-24"] { width: 200px !important; height: 200px !important; }
img[class*="w-6"][class*="rounded-full"],
.sidebar img[class*="rounded-full"],
nav img[class*="rounded-full"] {
  width: 48px !important; height: 48px !important;
  filter: drop-shadow(0 0 8px rgba(78,205,196,0.7)) !important;
}

/* ── KEYFRAMES ── */
@keyframes nola-logo-rainbow {
  0%   { filter: drop-shadow(0 0 20px rgba(255,107,107,0.9)); }
  20%  { filter: drop-shadow(0 0 20px rgba(255,217,61,0.9)); }
  40%  { filter: drop-shadow(0 0 20px rgba(107,203,119,0.9)); }
  60%  { filter: drop-shadow(0 0 20px rgba(69,183,209,0.9)); }
  80%  { filter: drop-shadow(0 0 20px rgba(168,85,247,0.9)); }
  100% { filter: drop-shadow(0 0 20px rgba(255,107,107,0.9)); }
}
@keyframes nola-rainbow-border {
  0%   { border-color: rgba(255,107,107,0.6); box-shadow: 0 0 20px rgba(255,107,107,0.2); }
  20%  { border-color: rgba(255,217,61,0.6);  box-shadow: 0 0 20px rgba(255,217,61,0.2); }
  40%  { border-color: rgba(107,203,119,0.6); box-shadow: 0 0 20px rgba(107,203,119,0.2); }
  60%  { border-color: rgba(69,183,209,0.6);  box-shadow: 0 0 20px rgba(69,183,209,0.2); }
  80%  { border-color: rgba(168,85,247,0.6);  box-shadow: 0 0 20px rgba(168,85,247,0.2); }
  100% { border-color: rgba(255,107,107,0.6); box-shadow: 0 0 20px rgba(255,107,107,0.2); }
}
@keyframes nola-fadeup {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes nola-slide-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes nola-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes nola-shimmer-rainbow {
  0%   { background-position: -300% center; }
  100% { background-position: 300% center; }
}
@keyframes nola-thinking {
  0%,80%,100% { transform: scaleY(0.4); opacity: 0.4; }
  40%          { transform: scaleY(1.2); opacity: 1; }
}
@keyframes nola-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes nola-ripple-out { to { transform: scale(4); opacity: 0; } }
@keyframes nola-ping {
  0%  { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(1.8); opacity: 0; }
  100%{ transform: scale(1.8); opacity: 0; }
}
@keyframes nola-gradient-x {
  0%,100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ── RAINBOW ACCENT BAR at top ── */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--rainbow);
  background-size: 200% 200%;
  animation: nola-gradient-x 4s ease infinite;
  z-index: 999999;
  pointer-events: none;
}

/* ── SIDEBAR ── */
#sidebar,
nav[class*="sidebar"],
aside,
div[class*="sidebar"],
.sidebar {
  background: rgba(6,6,12,0.85) !important;
  backdrop-filter: var(--nola-blur) !important;
  -webkit-backdrop-filter: var(--nola-blur) !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 4px 0 30px rgba(0,0,0,0.6) !important;
}

/* Sidebar new-chat button */
button[aria-label*="New chat"],
button[title*="New chat"] {
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(236,72,153,0.1)) !important;
  border: 1px solid rgba(168,85,247,0.4) !important;
  color: #a855f7 !important;
  border-radius: 10px !important;
  transition: all 0.2s !important;
}
button[aria-label*="New chat"]:hover,
button[title*="New chat"]:hover {
  background: linear-gradient(135deg, rgba(168,85,247,0.35), rgba(236,72,153,0.2)) !important;
  box-shadow: 0 0 20px rgba(168,85,247,0.4) !important;
}

/* Sidebar items */
.sidebar li:hover, nav li:hover {
  background: rgba(78,205,196,0.07) !important;
}

/* ── LOGIN PAGE ── */
.login-form,
form[action*="login"],
div[class*="login"] {
  background: rgba(6,6,14,0.88) !important;
  backdrop-filter: var(--nola-blur) !important;
  -webkit-backdrop-filter: var(--nola-blur) !important;
  border: 1px solid rgba(168,85,247,0.3) !important;
  border-radius: 20px !important;
  box-shadow: 0 0 60px rgba(168,85,247,0.15), 0 0 30px rgba(236,72,153,0.1), var(--nola-shadow) !important;
  animation: nola-rainbow-border 5s ease-in-out infinite !important;
}

/* ── HEADER / TOPBAR ── */
header,
div[class*="navbar"],
div[class*="topbar"],
nav[class*="top"] {
  background: rgba(4,4,10,0.82) !important;
  backdrop-filter: var(--nola-blur) !important;
  -webkit-backdrop-filter: var(--nola-blur) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5) !important;
}

/* ── GROK-STYLE MESSAGES ── */
div[class*="messages"],
#messages, .messages,
[class*="overflow-y-auto"][class*="flex-col"] {
  background: transparent !important;
}

/* User message — teal/purple right bubble */
div[class*="message"][class*="user"],
div[data-role="user"] .content,
.human-message {
  background: linear-gradient(135deg, rgba(69,183,209,0.15), rgba(168,85,247,0.1)) !important;
  border: 1px solid rgba(69,183,209,0.3) !important;
  border-radius: 18px 18px 4px 18px !important;
  padding: 12px 18px !important;
  backdrop-filter: var(--nola-blur-sm) !important;
  margin-left: auto !important;
  max-width: 72% !important;
  animation: nola-fadeup 0.3s ease !important;
}

/* AI message — pink/purple left card */
div[class*="message"][class*="assistant"],
div[data-role="assistant"] .content,
.ai-message {
  background: rgba(12,12,22,0.68) !important;
  border: 1px solid rgba(236,72,153,0.15) !important;
  border-left: 3px solid rgba(236,72,153,0.6) !important;
  border-radius: 0 18px 18px 4px !important;
  padding: 16px 20px !important;
  backdrop-filter: var(--nola-blur-sm) !important;
  max-width: 90% !important;
  animation: nola-slide-in 0.3s ease !important;
}

/* Hover glow */
div[class*="message"][class*="user"]:hover {
  border-color: rgba(69,183,209,0.55) !important;
  box-shadow: 0 0 20px rgba(69,183,209,0.15) !important;
}
div[class*="message"][class*="assistant"]:hover {
  border-left-color: rgba(236,72,153,0.9) !important;
  box-shadow: 0 0 20px rgba(236,72,153,0.1) !important;
}

/* ── CHAT INPUT — Grok floating bar ── */
div[class*="input-area"],
div[class*="chat-input"],
form[class*="input"],
.input-area, footer {
  background: transparent !important;
}

div[class*="relative"][class*="flex"][class*="rounded"],
div[class*="input"][class*="flex"],
.message-input-wrapper {
  background: rgba(10,10,20,0.90) !important;
  backdrop-filter: var(--nola-blur) !important;
  -webkit-backdrop-filter: var(--nola-blur) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 18px !important;
  box-shadow: 0 0 40px rgba(0,0,0,0.6) !important;
  transition: border-color 0.25s, box-shadow 0.25s !important;
}
div[class*="relative"][class*="flex"][class*="rounded"]:focus-within,
div[class*="input"][class*="flex"]:focus-within {
  border-color: rgba(168,85,247,0.6) !important;
  box-shadow: 0 0 30px rgba(168,85,247,0.2), 0 0 60px rgba(236,72,153,0.1) !important;
  animation: nola-rainbow-border 3s ease infinite !important;
}

textarea#chat-textarea,
textarea[placeholder],
.chat-textarea {
  background: transparent !important;
  color: var(--nola-text) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  caret-color: #a855f7 !important;
}
textarea:focus { outline: none !important; box-shadow: none !important; }

/* Send button — rainbow gradient */
button[type="submit"],
button[aria-label*="Send"],
button[title*="Send"] {
  background: var(--rainbow) !important;
  background-size: 200% 200% !important;
  animation: nola-gradient-x 3s ease infinite !important;
  border-radius: 10px !important;
  color: #000 !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 0 20px rgba(168,85,247,0.4) !important;
  transition: transform 0.15s, box-shadow 0.15s !important;
}
button[type="submit"]:hover,
button[aria-label*="Send"]:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 0 35px rgba(236,72,153,0.6) !important;
}

/* ── MODEL SELECTOR ── */
button[class*="model"],
div[class*="model-selector"],
#model-selector {
  background: rgba(10,10,20,0.85) !important;
  border: 1px solid rgba(78,205,196,0.3) !important;
  border-radius: 10px !important;
  color: #4ecdc4 !important;
  backdrop-filter: var(--nola-blur-sm) !important;
  transition: all 0.2s !important;
}
button[class*="model"]:hover {
  border-color: rgba(78,205,196,0.7) !important;
  box-shadow: 0 0 15px rgba(78,205,196,0.3) !important;
}

/* ── BUTTONS ── */
button, .btn {
  transition: all 0.18s cubic-bezier(0.4,0,0.2,1) !important;
}
button:hover:not([disabled]) { transform: translateY(-1px) !important; }
button:active:not([disabled]) { transform: translateY(0) scale(0.97) !important; }

/* Primary buttons */
button[class*="primary"], .btn-primary {
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  color: #fff !important; border: none !important; font-weight: 700 !important;
  box-shadow: 0 0 20px rgba(168,85,247,0.4) !important;
}
button[class*="primary"]:hover {
  box-shadow: 0 0 30px rgba(236,72,153,0.6) !important;
}

/* ── MODALS / DROPDOWNS ── */
div[class*="modal"],
div[role="dialog"],
div[class*="dropdown"],
div[class*="popover"],
.modal, .dropdown-menu {
  background: rgba(8,8,16,0.97) !important;
  backdrop-filter: var(--nola-blur) !important;
  -webkit-backdrop-filter: var(--nola-blur) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: var(--nola-radius) !important;
  box-shadow: var(--nola-shadow), 0 0 40px rgba(168,85,247,0.1) !important;
  color: var(--nola-text) !important;
}

/* ── INPUTS / FORM FIELDS ── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select {
  background: rgba(12,12,22,0.85) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 8px !important;
  color: var(--nola-text) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
input:focus, select:focus {
  border-color: rgba(168,85,247,0.6) !important;
  box-shadow: 0 0 15px rgba(168,85,247,0.2) !important;
  outline: none !important;
}

/* ── CODE BLOCKS ── */
pre, code {
  background: rgba(0,0,0,0.6) !important;
  border: 1px solid rgba(78,205,196,0.2) !important;
  border-radius: 8px !important;
  color: #a8e6cf !important;
}
pre { padding: 16px !important; overflow-x: auto !important; }
/* Inline code */
:not(pre) > code {
  background: rgba(168,85,247,0.15) !important;
  color: #d4b0ff !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

/* ── GENERATING / THINKING ANIMATIONS ── */
[class*="animate-spin"] {
  border-top-color: #a855f7 !important;
  border-right-color: #ec4899 !important;
  border-bottom-color: transparent !important;
  border-left-color: #4ecdc4 !important;
}
.generating .prose,
.streaming .prose,
div[class*="streaming"] {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168,85,247,0.04) 25%,
    rgba(236,72,153,0.04) 50%,
    rgba(78,205,196,0.04) 75%,
    transparent 100%) !important;
  background-size: 300% auto !important;
  animation: nola-shimmer-rainbow 3s linear infinite !important;
}

/* Custom thinking bars */
.nola-thinking-indicator {
  display: inline-flex; gap: 4px; align-items: flex-end; height: 20px;
}
.nola-thinking-indicator span {
  display: block; width: 4px; height: 14px; border-radius: 2px;
  animation: nola-thinking 1.2s ease-in-out infinite;
}
.nola-thinking-indicator span:nth-child(1) { background: #ff6b6b; }
.nola-thinking-indicator span:nth-child(2) { background: #6bcb77; animation-delay: 0.15s; }
.nola-thinking-indicator span:nth-child(3) { background: #45b7d1; animation-delay: 0.30s; }
.nola-thinking-indicator span:nth-child(4) { background: #a855f7; animation-delay: 0.45s; }

/* Hide the tiny native heartbeat while the NOLA HUD is handling progress. */
body.nola-thinking-active .animate-pulse,
body.nola-thinking-active [class*="animate-pulse"],
body.nola-thinking-active .loading-dots,
body.nola-thinking-active [class*="loading"]:has(> div.rounded-full),
body.nola-thinking-active div:has(> .animate-pulse),
body.nola-thinking-active div:has(> [class*="animate-pulse"]) {
  opacity: 0 !important;
  visibility: hidden !important;
}

body.nola-thinking-active button,
body.nola-thinking-active textarea,
body.nola-thinking-active input,
body.nola-thinking-active [role="button"],
body.nola-thinking-active [contenteditable="true"] {
  opacity: revert !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.nola-thinking-active #nola-thinking-hud,
body.nola-thinking-active #nola-thinking-hud *,
body.nola-thinking-active .nola-ripple {
  opacity: revert !important;
  visibility: visible !important;
}

/* Message fade entry */
.message-animate-in { animation: nola-fadeup 0.35s cubic-bezier(0.4,0,0.2,1) forwards !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a855f7, #ec4899);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c084fc, #f472b6);
}

/* ── TYPOGRAPHY ── */
body, html {
  font-family: -apple-system, 'SF Pro Display', 'Inter', system-ui, sans-serif !important;
  color: var(--nola-text) !important;
}
h1,h2,h3,h4 {
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
a { color: #45b7d1 !important; }
a:hover { color: #4ecdc4 !important; }

/* ── SELECTION ── */
::selection {
  background: rgba(168,85,247,0.4) !important;
  color: #fff !important;
}

/* ── PROSE / MARKDOWN ── */
.prose h1,.prose h2,.prose h3 {
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.prose code { background: rgba(168,85,247,0.15) !important; color: #d4b0ff !important; }
.prose blockquote {
  border-left: 3px solid #4ecdc4 !important;
  background: rgba(78,205,196,0.05) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 12px 16px !important;
}
.prose table { border-color: rgba(255,255,255,0.1) !important; }
.prose th {
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(236,72,153,0.1)) !important;
  color: #c084fc !important;
}
.prose tr:hover td { background: rgba(78,205,196,0.04) !important; }
.prose a { color: #45b7d1 !important; }

/* ── SETTINGS PAGE ── */
div[class*="settings"] h2,
div[class*="settings"] h3 {
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  padding-bottom: 8px !important;
}

/* ── BADGES / TAGS ── */
span[class*="badge"], .badge, .tag {
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(236,72,153,0.1)) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168,85,247,0.35) !important;
  border-radius: 6px !important;
}

/* ── TOAST / NOTIFICATIONS ── */
div[class*="toast"], div[class*="notification"], .toast {
  background: rgba(8,8,18,0.97) !important;
  border-left: 3px solid #a855f7 !important;
  border-radius: 10px !important;
  box-shadow: var(--nola-shadow), 0 0 20px rgba(168,85,247,0.2) !important;
}

/* ── VOICE BUTTON ── */
button[aria-label*="voice"],
button[aria-label*="microphone"],
button[title*="voice"] {
  color: #4ecdc4 !important;
}
button[aria-label*="voice"].active {
  background: rgba(78,205,196,0.2) !important;
  color: #4ecdc4 !important;
  box-shadow: 0 0 20px rgba(78,205,196,0.4) !important;
  animation: nola-ping 1s ease-in-out infinite !important;
}

/* ── FILE UPLOAD ── */
div[class*="upload"], div[class*="drop"] {
  border: 2px dashed rgba(78,205,196,0.35) !important;
  background: rgba(78,205,196,0.03) !important;
  border-radius: 12px !important;
  transition: all 0.2s !important;
}
div[class*="upload"]:hover, div[class*="drop"]:hover {
  border-color: #4ecdc4 !important;
  background: rgba(78,205,196,0.08) !important;
}

/* ── WELCOME / EMPTY STATE ── */
div[class*="welcome"] h1,
div[class*="welcome"] h2 {
  font-size: 2.5rem !important;
  background: var(--rainbow) !important;
  background-size: 200% 200% !important;
  animation: nola-gradient-x 4s ease infinite !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ── HR / DIVIDERS ── */
hr, [class*="separator"], [class*="divider"] {
  background: linear-gradient(90deg, transparent, rgba(168,85,247,0.4), rgba(78,205,196,0.4), transparent) !important;
  border: none !important;
  height: 1px !important;
}

/* ── NOLA BG PANEL (admin only) ── */
#nola-bg-panel {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 99999; display: none;
}
#nola-bg-panel.nola-admin-visible { display: block !important; }

#nola-bg-toggle {
  width: 50px; height: 50px; border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(8,8,16,0.92);
  background-clip: padding-box;
  position: relative;
  cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 25px rgba(168,85,247,0.35);
  transition: all 0.25s;
  animation: nola-float 3.5s ease-in-out infinite;
}
#nola-bg-toggle::before {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: var(--rainbow);
  background-size: 200% 200%;
  animation: nola-gradient-x 3s ease infinite;
  z-index: -1;
}
#nola-bg-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 0 40px rgba(168,85,247,0.6);
}
#nola-bg-drawer {
  display: none;
  position: absolute; bottom: 62px; right: 0;
  width: 310px;
  background: rgba(6,6,14,0.97);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 0 50px rgba(0,0,0,0.9), 0 0 30px rgba(168,85,247,0.1);
}
#nola-bg-drawer.open { display: block !important; }

.nola-bg-item {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  text-align: left; cursor: pointer; font-size: 12px;
  border: 1px solid transparent; transition: all 0.15s;
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.65); margin-bottom: 3px;
}
.nola-bg-item:hover { background: rgba(168,85,247,0.12); color: #fff; border-color: rgba(168,85,247,0.3); }
.nola-bg-item.active {
  background: linear-gradient(135deg, rgba(168,85,247,0.2), rgba(236,72,153,0.1));
  border-color: rgba(168,85,247,0.5);
  color: #c084fc;
}

/* ── CLICK RIPPLE ── */
.nola-ripple {
  position: fixed; border-radius: 50%;
  background: linear-gradient(135deg, rgba(168,85,247,0.4), rgba(236,72,153,0.3));
  pointer-events: none; transform: scale(0);
  animation: nola-ripple-out 0.45s ease-out forwards;
  z-index: 999998;
}
/* ── NOLA9TECH THINKING / GENERATING HUD ───────────────────── */
#nola-thinking-hud {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 999999;
  transform: translate(-50%, 18px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2,.9,.2,1);
}

#nola-thinking-hud.active {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.nola-thinking-shell {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  min-width: min(520px, calc(100vw - 28px));
  padding: 13px 16px 13px 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 217, 61, 0.32);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 28%, rgba(255, 217, 61, 0.22), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(78, 205, 196, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(5, 6, 12, 0.96), rgba(11, 14, 26, 0.94));
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(255, 217, 61, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.nola-thinking-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.07) 45%, transparent 80%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 16px);
  opacity: 0.42;
  transform: translateX(-100%);
  animation: nola-scanline 1.15s linear infinite;
}

.nola-thinking-track {
  position: relative;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
}

.nola-thinking-track::before,
.nola-thinking-track::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255,217,61,0.9) 0 15px, transparent 15px 28px);
  opacity: 0.65;
  animation: nola-track-lines 440ms linear infinite;
}

.nola-thinking-track::before { top: 18px; }
.nola-thinking-track::after { bottom: 16px; animation-duration: 360ms; }

.nola-runner {
  position: absolute;
  left: 28px;
  top: 12px;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 14px rgba(255, 217, 61, 0.9));
  animation: nola-runner-bob 280ms ease-in-out infinite alternate;
}

.nola-runner::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffd93d;
  box-shadow: 0 0 18px rgba(255, 217, 61, 0.92);
}

.nola-runner::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 17px;
  width: 22px;
  height: 16px;
  border: solid #4ecdc4;
  border-width: 4px 0 0 4px;
  border-radius: 8px 0 0 0;
  transform-origin: 6px 2px;
  animation: nola-runner-legs 220ms linear infinite;
}

.nola-logo-orbit {
  position: absolute;
  right: 9px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #050508;
  font: 900 12px/1 Orbitron, Rajdhani, sans-serif;
  letter-spacing: -0.03em;
  background: conic-gradient(from 0deg, #ffd93d, #4ecdc4, #a855f7, #ff6b6b, #ffd93d);
  box-shadow: 0 0 22px rgba(78, 205, 196, 0.5);
  animation: nola-logo-spin 520ms linear infinite;
}

.nola-thinking-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.nola-thinking-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nola-thinking-kicker {
  font: 800 10px/1 Orbitron, Rajdhani, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffd93d;
  text-shadow: 0 0 14px rgba(255, 217, 61, 0.55);
}

.nola-thinking-title {
  margin-top: 5px;
  color: #fff;
  font: 800 15px/1.25 Rajdhani, sans-serif;
  letter-spacing: 0.04em;
}

.nola-thinking-detail {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font: 600 12px/1.35 Rajdhani, sans-serif;
}

.nola-thinking-percent {
  color: #fff;
  font: 900 20px/1 Orbitron, Rajdhani, sans-serif;
  letter-spacing: -0.04em;
  text-shadow: 0 0 18px rgba(78, 205, 196, 0.55);
}

.nola-thinking-progress {
  position: relative;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.nola-thinking-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd93d, #4ecdc4, #a855f7);
  box-shadow: 0 0 18px rgba(78, 205, 196, 0.6);
  transition: width 260ms ease;
}

.nola-thinking-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.52);
  font: 700 10px/1.2 Orbitron, Rajdhani, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nola-thinking-status {
  color: rgba(255, 217, 61, 0.78);
}

.nola-thinking-dots::after {
  content: '';
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: nola-thinking-dots 1s steps(4, end) infinite;
}

@keyframes nola-scanline {
  to { transform: translateX(100%); }
}

@keyframes nola-track-lines {
  to { background-position-x: -28px; }
}

@keyframes nola-runner-bob {
  from { transform: translateY(0) skewX(-8deg); }
  to { transform: translateY(-5px) skewX(7deg); }
}

@keyframes nola-runner-legs {
  0% { transform: rotate(0deg) skewX(-18deg); }
  50% { transform: rotate(26deg) skewX(18deg); }
  100% { transform: rotate(0deg) skewX(-18deg); }
}

@keyframes nola-logo-spin {
  to { transform: rotate(360deg); }
}

@keyframes nola-thinking-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75%, 100% { content: '...'; }
}

@media (max-width: 640px) {
  #nola-thinking-hud {
    left: 12px;
    right: 12px;
    bottom: 82px;
    transform: translateY(18px) scale(0.98);
  }

  #nola-thinking-hud.active {
    transform: translateY(0) scale(1);
  }

  .nola-thinking-shell {
    grid-template-columns: 78px 1fr;
    min-width: 0;
    width: 100%;
    padding: 11px 12px;
    border-radius: 18px;
  }

  .nola-thinking-title {
    font-size: 13px;
  }

  .nola-thinking-percent {
    font-size: 17px;
  }
}
