@font-face{font-family: VazirLocal; src:url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-display:swap;}
:root{
  --bg:#070b14;
  --card:rgba(255,255,255,.06);
  --stroke:rgba(255,255,255,.10);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --primary:#3b82f6;
  --me:rgba(59,130,246,.18);
  --bot:rgba(255,255,255,.07);
  --shadow:0 18px 45px rgba(0,0,0,.35);
  --blur:18px;
  --radius:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:VazirLocal,Tahoma,Arial,sans-serif;
  background: radial-gradient(1200px 700px at 10% 0%, rgba(59,130,246,.18), transparent 60%),
              radial-gradient(900px 600px at 90% 10%, rgba(34,197,94,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}
.c-wrap{height:100%; display:flex; align-items:center; justify-content:center; padding:12px}
.c-card{
  width:min(980px, 100%);
  height:min(760px, 100%);
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:22px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(var(--blur));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.c-head{
  padding:14px 16px;
  border-bottom:1px solid var(--stroke);
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.c-sub{opacity:.75;font-size:12px}
.c-log{
  flex:1;
  padding:14px 16px;
  overflow:auto;
  scroll-behavior:smooth;
}
.bubble{
  max-width:85%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:var(--bot);
  line-height:1.9;
  white-space:pre-wrap;
}
.row{display:flex; margin:10px 0}
.row.me{justify-content:flex-start}
.row.me .bubble{background:var(--me); border-color:rgba(59,130,246,.25)}
.row.bot{justify-content:flex-end}
.meta{margin-top:6px; font-size:11px; color:var(--muted)}
.c-box{
  position:sticky;
  bottom:0;
  padding:12px;
  border-top:1px solid var(--stroke);
  background:rgba(7,11,20,.35);
  backdrop-filter:blur(var(--blur));
}
.c-input{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
textarea{
  flex:1;
  min-height:46px;
  max-height:140px;
  resize:none;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
button{
  padding:12px 16px;
  border-radius:16px;
  border:1px solid rgba(59,130,246,.35);
  background:rgba(59,130,246,.22);
  color:var(--text);
  font-weight:800;
  cursor:pointer;
}
button:disabled{opacity:.6; cursor:not-allowed}
.typing{
  display:inline-flex;
  gap:6px;
  align-items:center;
}
.dot{
  width:7px;height:7px;border-radius:99px;
  background:rgba(234,240,255,.7);
  animation:bounce 1s infinite ease-in-out;
}
.dot:nth-child(2){animation-delay:.15s}
.dot:nth-child(3){animation-delay:.3s}
@keyframes bounce{
  0%,80%,100%{transform:translateY(0);opacity:.6}
  40%{transform:translateY(-5px);opacity:1}
}
@media(max-width:700px){
  .c-wrap{padding:0}
  .c-card{height:100%; border-radius:0}
  .bubble{max-width:92%}
}
