:root {
	--bg: #0e0f13;
	--panel: #17191f;
	--line: #262932;
	--fg: #f2f2f4;
	--muted: #9a9ca6;
	--red: #c8102e;
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.app { display: flex; flex-direction: column; height: 100%; max-width: 860px; margin: 0 auto; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; }
.name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.tag { font-size: 0.78rem; color: var(--muted); }
.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.ghost:hover { border-color: var(--red); }

.chat { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.hero { margin: auto; text-align: center; max-width: 560px; }
.hero h1 { font-size: 2.6rem; margin: 14px 0 0; letter-spacing: -0.04em; }
.slogan { color: var(--red); font-weight: 700; font-size: 1.15rem; margin: 4px 0 10px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.sugg { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sugg button { text-align: left; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.sugg button:hover { border-color: var(--red); }

.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.user { justify-content: flex-end; }
.msg svg { flex: none; }
.bubble { max-width: 100%; min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 4px 18px; padding: 10px 14px; max-width: 85%; }
.plain { white-space: pre-wrap; }
.bubble img { max-width: 220px; width: 100%; border-radius: 10px; display: block; margin-bottom: 6px; }
.bubble pre { background: #0a0b0e; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.bubble code { font-family: ui-monospace, Menlo, monospace; font-size: 0.88em; background: #23252d; padding: 1px 5px; border-radius: 4px; }
.bubble pre code { background: none; padding: 0; }
.bubble h3, .bubble h4 { margin: 8px 0 4px; }
.bubble li { margin-left: 18px; list-style: disc; display: list-item; }

.dots { display: inline-flex; gap: 4px; padding: 8px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: b 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes b { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.err { background: #3a0f16; border: 1px solid var(--red); color: #ffc9d0; padding: 10px 14px; border-radius: 12px; }

.composer { padding: 10px 16px 14px; }
.box { display: flex; align-items: flex-end; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 6px; }
.box:focus-within { border-color: var(--red); }
.box textarea { flex: 1; min-width: 0; resize: none; background: transparent; color: var(--fg); border: 0; outline: none; font: inherit; padding: 9px 4px; max-height: 160px; }
.icon { background: transparent; border: 0; font-size: 1.1rem; padding: 8px; }
.send { background: var(--red); color: #fff; border: 0; border-radius: 50%; width: 38px; height: 38px; flex: none; }
.send:disabled { opacity: 0.35; cursor: default; }
.preview { position: relative; display: inline-block; margin-bottom: 8px; }
.preview img { height: 64px; border-radius: 10px; }
.preview button { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; }
.note { text-align: center; color: var(--muted); font-size: 0.74rem; margin: 8px 0 0; }
