:root{
  --bg1:#070a14;
  --bg2:#0b1020;
  --card: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.10);
  --text:#e9eefc;
  --muted: rgba(233,238,252,.75);
  --accent:#7c5cff;
  --accent2:#2ee6a6;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  overflow:hidden;
}

.bg{
  position:fixed; inset:-20%;
  background:
    radial-gradient(900px 500px at 15% 15%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(700px 400px at 90% 30%, rgba(46,230,166,.18), transparent 60%),
    radial-gradient(900px 700px at 60% 100%, rgba(124,92,255,.12), transparent 60%);
  filter: blur(2px);
}

.app{
  position:relative;
  max-width: 980px;
  margin: 0 auto;
  height: 100vh;
  display:flex;
  flex-direction:column;
  padding: 18px;
  gap: 12px;
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap: 12px; }
.dot{
  width: 14px; height: 14px; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), rgba(124,92,255,.2));
  box-shadow: 0 0 0 6px rgba(124,92,255,.14);
}
h1{ margin:0; font-size: 18px; letter-spacing: .2px; }
.sub{ font-size: 13px; color: var(--muted); margin-top:2px; }

.pill{
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--muted);
}

.chat{
  flex:1;
  overflow:auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.msg{ display:flex; margin: 10px 0; }
.msg.a{ justify-content:flex-start; }
.msg.u{ justify-content:flex-end; }

.bubble{
  max-width: min(720px, 92%);
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.35;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
  color: var(--text);
}

.msg.u .bubble{
  background: linear-gradient(180deg, rgba(124,92,255,.35), rgba(124,92,255,.18));
  border: 1px solid rgba(124,92,255,.35);
}

.typing{
  opacity: .85;
  font-style: italic;
}

.bar{
  display:flex;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

input{
  flex:1;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  outline:none;
  font-size: 14px;
}
input::placeholder{ color: rgba(233,238,252,.45); }

button{
  border:0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  background: linear-gradient(180deg, var(--accent), rgba(124,92,255,.55));
  color: white;
  cursor:pointer;
}
button:disabled{ opacity:.6; cursor:not-allowed; }

.foot{
  font-size: 12px;
  color: rgba(233,238,252,.55);
  text-align:center;
  padding-bottom: 6px;
}
