/* OMNIA Q&A - mobil-first, sötét prémium brand. */
:root {
  --bg: #0a0c10;
  --surface: #12161d;
  --surface-2: #1a1f29;
  --line: #262d39;
  --text: #eef2f7;
  --muted: #8b95a4;
  --red: #f4211a;
  --teal: #14dfc4;
  --radius: 16px;
  --space: clamp(14px, 4vw, 22px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
.logo { display: block; }
.ring { fill: none; stroke: var(--red); }

/* ---- login ---- */
.auth-wrap {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: var(--space); gap: 26px;
  background: radial-gradient(120% 80% at 50% 0%, #141a24 0%, var(--bg) 60%);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 6vw, 32px);
}
.auth-card h1 { font-size: 20px; margin: 0 0 4px; font-weight: 700; }
.auth-card p.sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password] {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 14px 15px; font-size: 16px;
}
input:focus { outline: none; border-color: var(--teal); }
.btn {
  width: 100%; margin-top: 22px; border: 0; border-radius: 12px;
  background: var(--red); color: #fff; font-size: 16px; font-weight: 600;
  padding: 15px; cursor: pointer; min-height: 50px;
}
.btn:active { transform: translateY(1px); }
.err { background: rgba(244,33,26,.12); border: 1px solid rgba(244,33,26,.4);
  color: #ffb3ae; padding: 10px 13px; border-radius: 10px; font-size: 14px; margin-top: 16px; }

/* ---- app shell ---- */
.app { display: flex; flex-direction: column; height: 100dvh; }
header.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--space); border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 5;
}
header.bar .brand { display: flex; align-items: center; gap: 10px; }
header.bar .brand .o { width: 18px; height: 18px; border-radius: 50%;
  border: 4px solid var(--red); }
header.bar .brand b { font-weight: 700; letter-spacing: 2px; font-size: 15px; }
header.bar .brand b span { color: var(--teal); font-weight: 500; }
header.bar .who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 12px; }
header.bar .who .uname { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lang {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 9px; padding: 6px 8px; font-size: 13px; font-family: inherit;
}
#lang:focus { outline: none; border-color: var(--teal); }
.auth-card #lang { margin-left: 10px; }

.chat { flex: 1; overflow-y: auto; padding: var(--space); display: flex;
  flex-direction: column; gap: 16px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 88%; padding: 13px 16px; border-radius: 16px; font-size: 15.5px; }
.msg.user { align-self: flex-end; background: var(--teal); color: #06231f;
  border-bottom-right-radius: 5px; font-weight: 500; }
.msg.bot { align-self: flex-start; background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.bot.think { color: var(--muted); }
/* markdown a válaszban */
.msg.bot > :first-child { margin-top: 0; }
.msg.bot > :last-child { margin-bottom: 0; }
.msg.bot p { margin: 8px 0; }
.msg.bot strong { color: #fff; font-weight: 700; }
.msg.bot ul, .msg.bot ol { margin: 8px 0; padding-left: 20px; }
.msg.bot li { margin: 4px 0; }
.msg.bot li::marker { color: var(--teal); }
.msg.bot h3, .msg.bot h4 { margin: 12px 0 6px; font-size: 15px; color: #fff; }
.msg.bot a { color: var(--teal); }
.msg.bot code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.msg.bot table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.msg.bot th, .msg.bot td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.msg.bot th { background: var(--bg); color: var(--teal); font-weight: 600; }
.msg.bot table { display: block; overflow-x: auto; }
.dots span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; border-radius: 50%;
  background: var(--muted); animation: b 1.2s infinite; }
.dots span:nth-child(2){animation-delay:.2s}.dots span:nth-child(3){animation-delay:.4s}
@keyframes b { 0%,80%,100%{opacity:.3}40%{opacity:1} }

.intro { text-align: center; color: var(--muted); margin: auto; max-width: 460px; }
.intro .logo { margin: 0 auto 18px; }
.intro h2 { color: var(--text); font-weight: 700; font-size: 19px; margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip { background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 9px 14px; font-size: 13.5px; cursor: pointer; }

footer.compose {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 10px var(--space) calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: flex-end;
}
footer.compose textarea {
  flex: 1; resize: none; background: var(--bg); border: 1px solid var(--line);
  color: var(--text); border-radius: 14px; padding: 13px 15px; font-size: 16px;
  font-family: inherit; max-height: 140px; line-height: 1.4;
}
footer.compose textarea:focus { outline: none; border-color: var(--teal); }
footer.compose button {
  border: 0; border-radius: 50%; width: 48px; height: 48px; flex: 0 0 48px;
  background: var(--red); color: #fff; font-size: 20px; cursor: pointer;
}
footer.compose button:disabled { opacity: .4; }
