/* Minimal, clean UI with a phone look; Tailwind-less CSS for portability */
:root{
  --bg:#0b0f14;
  --bg-soft:#0f141b;
  --text:#e6eaf2;
  --muted:#9aa6b2;
  --accent:#4f46e5;
  --danger:#ef4444;
  --ok:#10b981;
  --card:#111827;
  --ring:rgba(79,70,229,.35);
}

*{box-sizing:border-box}

html,body{
  height:100%;
  background: radial-gradient(1200px 800px at 70% -10%, #1f2937 0%, #0b0f14 60%, #05070a 100%);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  margin:0;
}

.wrap{ min-height:100%; display:grid; place-items:center; padding:24px; }

/* Phone shell */
.phone{
  width:min(420px, 94vw);
  height:min(820px, 94vh);
  border:12px solid #10141a;
  border-radius:36px;
  background:linear-gradient(180deg,#0d1117,#0a0f15);
  box-shadow: 0 10px 30px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.05);
  position:relative;
  overflow:hidden;
}

.bezel{
  position:absolute; inset:0 0 auto 0; height:34px; display:flex; align-items:center; justify-content:center;
}

.speaker{
  width:72px; height:6px; background:#222b36; border-radius:6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.camera{
  position:absolute; right:32px; width:9px; height:9px; background:#1f2937; border-radius:50%;
  box-shadow: inset 0 0 0 2px #0a0f15, inset 0 0 0 3px #1f2937, 0 0 0 1px rgba(255,255,255,.06);
}

.topbar{
  position:absolute; top:34px; left:0; right:0;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px;
  background:rgba(17,24,39,.7);
  backdrop-filter: blur(8px);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo{ width:28px; height:28px; opacity:.9 }
.avatar{ width:36px; height:36px; border-radius:50%; border:1px solid rgba(255,255,255,.08) }
.title{ font-weight:700; letter-spacing:.2px }
.subtitle{ color:var(--muted); font-size:.9rem }

.screen{
  position:absolute; top:84px; bottom:104px; left:0; right:0;
  padding:14px;
  display:flex; flex-direction:column; gap:10px;
}

.messages{
  list-style:none; margin:0; padding:0; overflow:auto; flex:1; display:flex; flex-direction:column; gap:10px;
}
.msg{ padding:10px 12px; border-radius:14px; max-width:86%; width:max-content; box-shadow: 0 2px 8px rgba(0,0,0,.25) }
.msg.user{ align-self:flex-end; background:linear-gradient(180deg,#1f2937,#111827) }
.msg.assistant{ align-self:flex-start; background:linear-gradient(180deg,#0f172a,#0b1320); border:1px solid rgba(255,255,255,.05) }

.meter{ height:10px; background:#0d1320; border-radius:999px; border:1px solid rgba(255,255,255,.06); overflow:hidden }
.level{ height:100%; width:0%; background:linear-gradient(90deg, var(--accent), var(--ok)); transition:width .08s linear }

.controls{
  position:absolute; left:0; right:0; bottom:0;
  height:104px; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:linear-gradient(180deg, rgba(17,24,39,.6), rgba(5,7,10,.9));
  border-top:1px solid rgba(255,255,255,.06);
}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:none; padding:12px 14px; border-radius:16px; font-weight:600; cursor:pointer;
  background:#0f172a; color:var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active{ transform: translateY(1px) }
.btn-primary{ background: radial-gradient(240px 140px at 50% -20%, rgba(79,70,229,.5), transparent), #0f172a; }
.btn-danger{ background: radial-gradient(240px 140px at 50% -20%, rgba(239,68,68,.5), transparent), #0f172a; }
.btn-secondary{ background: radial-gradient(240px 140px at 50% -20%, rgba(156,163,175,.35), transparent), #0f172a; }
.btn[aria-pressed="true"]{ outline: 2px solid var(--ring); }

.icon{ width:20px; height:20px; opacity:.95 }
.icon-big{ width:44px; height:44px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }

.toast{
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:120px; background:#0b1320; padding:10px 14px; border-radius:12px; border:1px solid rgba(255,255,255,.06);
  opacity:0; pointer-events:none; transition: opacity .25s ease;
}
.toast.show{ opacity:1 }

/* Desktop nicety */
@media (min-width: 1000px){
  .wrap{ grid-template-columns: 1fr; }
}
