/* Simple Translation Chat - Minimal UI */
:root{
  --bg:#0f172a;
  --card:#111827;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --line:#1f2937;
  --primary:#22c55e;
  --danger:#ef4444;
  --warn:#f59e0b;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans Arabic", sans-serif;
  background: radial-gradient(900px 500px at 20% 10%, #1f2937 0%, var(--bg) 60%);
  color:var(--text);
}

.page{max-width:900px;margin:0 auto;padding:18px}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(17,24,39,0.75);
  backdrop-filter: blur(8px);
}
.brand{font-weight:700;letter-spacing:.2px}
.nav{display:flex;gap:10px;align-items:center}
.link{color:var(--muted);text-decoration:none}
.link:hover{color:var(--text)}
.card{
  margin-top:14px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(17,24,39,0.85);
}
.footer{padding:14px;text-align:center}

.h1{margin:0 0 8px 0;font-size:22px}
.h2{margin:0 0 8px 0;font-size:18px}
.muted{color:var(--muted)}
.mt{margin-top:12px}

.stack{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.label{font-size:13px;color:var(--muted)}

.input,.textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#0b1220;
  color:var(--text);
  outline:none;
}
.textarea{resize:vertical;min-height:70px}
.input:focus,.textarea:focus{border-color:#334155}

.btn{
  appearance:none;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 14px;
  background:#0b1220;
  color:var(--text);
  cursor:pointer;
  font-weight:600;
}
.btn.primary{
  background: linear-gradient(180deg, rgba(34,197,94,0.25), rgba(34,197,94,0.08));
  border-color: rgba(34,197,94,0.55);
}
.btn:disabled{opacity:.55;cursor:not-allowed}

.alert{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  margin-bottom:12px;
}
.alert-error{border-color:rgba(239,68,68,0.55); background:rgba(239,68,68,0.10)}
.alert-ok{border-color:rgba(34,197,94,0.55); background:rgba(34,197,94,0.10)}
.alert-warn{border-color:rgba(245,158,11,0.55); background:rgba(245,158,11,0.10)}

.tabs{display:flex;gap:10px;margin-bottom:12px}
.tab{
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line);
  color:var(--muted);
  text-decoration:none;
}
.tab.active{color:var(--text); border-color:#334155}

.share{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}

/* Chat */
.chatapp{display:flex;flex-direction:column;gap:12px}
.messages{
  border:1px solid var(--line);
  border-radius:12px;
  background:#0b1220;
  padding:12px;
  max-height:58vh;
  overflow:auto;
}
.msg{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.msg .meta{display:flex;gap:10px;align-items:center;color:var(--muted);font-size:12px}
.msg .bubble{
  display:inline-flex;
  max-width:85%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
}
.msg .text{white-space:pre-wrap;word-break:break-word}
.msg.me{align-items:flex-end}
.msg.me .bubble{background:rgba(34,197,94,0.08); border-color:rgba(34,197,94,0.35)}
.msg.other{align-items:flex-start}
.msg.other .bubble{background:rgba(148,163,184,0.06)}

.send{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
.send .textarea{flex:1}
.status{min-height:18px}
