:root {
  --bg: #0a0a0f;
  --fuchsia: #d946ef;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(217,70,239,0.14), transparent 60%),
    radial-gradient(1000px 700px at 100% 110%, rgba(34,211,238,0.12), transparent 55%),
    linear-gradient(180deg, #0a0a0f 0%, #0d0a14 100%);
  color: #e5e5eb;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#root { display: flex; flex-direction: column; }

/* Logo */
.logo-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f0abfc, #d946ef, #22d3ee, #a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }

/* Glass surfaces */
.glass {
  background: rgba(20, 16, 28, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.glass-dark {
  background: rgba(12, 10, 18, 0.7);
  backdrop-filter: blur(12px);
}

/* Buttons */
.btn-neon {
  background: linear-gradient(90deg, #d946ef, #a855f7 55%, #22d3ee);
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(217,70,239,0.35);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s;
}
.btn-neon:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 6px 28px rgba(217,70,239,0.5); }
.btn-neon:active:not(:disabled) { transform: translateY(0); }
.btn-ghost {
  background: rgba(255,255,255,0.05); color: #d4d4d8; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1); transition: all .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(217,70,239,0.4); }

/* Inputs */
.input-neon {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f4f4f5; outline: none;
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.input-neon:focus { border-color: rgba(217,70,239,0.6); box-shadow: 0 0 0 3px rgba(217,70,239,0.15); }
.input-neon::placeholder { color: #71717a; }
textarea.input-neon { line-height: 1.4; }

.lbl { display:block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color:#a1a1aa; margin-bottom: 6px; }

/* Chips */
.chip {
  display:inline-flex; align-items:center;
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.05); color:#c4b5fd;
  border: 1px solid rgba(139,92,246,0.3); transition: all .15s;
}
.chip:hover { background: rgba(139,92,246,0.2); color:#fff; }
.chip-active {
  display:inline-flex; align-items:center;
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(217,70,239,0.3), rgba(34,211,238,0.25));
  color:#fff; border: 1px solid rgba(217,70,239,0.5);
}

/* Character cards */
.char-card {
  display:flex; align-items:center; gap: 10px;
  padding: 10px; border-radius: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
}
.char-card:hover { background: rgba(255,255,255,0.04); }
.char-active {
  background: rgba(217,70,239,0.12);
  border-color: rgba(217,70,239,0.5);
  box-shadow: 0 0 18px rgba(217,70,239,0.25);
}

/* Bubbles */
.bubble-ai {
  background: rgba(30, 24, 42, 0.9);
  border: 1px solid rgba(139,92,246,0.25);
  color: #ececf2; line-height: 1.5; white-space: pre-wrap;
}
.bubble-user {
  background: linear-gradient(135deg, #c026d3, #7c3aed);
  color: #fff; line-height: 1.5; white-space: pre-wrap;
  box-shadow: 0 3px 14px rgba(192,38,211,0.3);
}

/* Typing indicator */
.typing { display:flex; gap:5px; align-items:center; }
.typing span {
  width:7px; height:7px; border-radius:50%;
  background: #d946ef; opacity:.5; animation: bounce 1.2s infinite;
}
.typing span:nth-child(2){ animation-delay:.2s; }
.typing span:nth-child(3){ animation-delay:.4s; }
@keyframes bounce { 0%,60%,100%{ transform:translateY(0); opacity:.4;} 30%{ transform:translateY(-5px); opacity:1;} }

/* Flame glow */
.flame-glow { animation: flame 1.6s ease-in-out infinite; }
@keyframes flame { 0%,100%{ box-shadow:0 0 8px rgba(249,115,22,0.4);} 50%{ box-shadow:0 0 18px rgba(249,115,22,0.7);} }

/* Motion */
.msg-in { animation: msgIn .3s ease both; }
@keyframes msgIn { from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:none;} }
.slide-in { animation: slideIn .25s ease both; }
@keyframes slideIn { from{ transform:translateX(-100%);} to{ transform:none;} }
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-12px);} }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(217,70,239,0.3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(217,70,239,0.5); }
.no-scrollbar::-webkit-scrollbar { display:none; }
.no-scrollbar { -ms-overflow-style:none; scrollbar-width:none; }