:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #172033; background: #eef2f6; }
* { box-sizing: border-box; } body { margin: 0; min-height: 100vh; }
.app { width: min(100%, 920px); height: 100vh; margin: 0 auto; display: flex; flex-direction: column; background: #f6f8fb; box-shadow: 0 0 28px rgb(28 42 66 / 8%); }
.topbar { min-height: 72px; padding: 14px 24px; display: flex; align-items: center; gap: 12px; color: #fff; background: linear-gradient(120deg, #b51832, #dc3a51); }
.logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #c7213c; background: #fff; font-size: 20px; font-weight: 800; }
.title { font-size: 16px; font-weight: 700; } .subtitle { margin-top: 2px; color: rgb(255 255 255 / 80%); font-size: 12px; }
.online { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; }.online:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #f5c66d; }.online.ready:before { background: #85e5a7; }
.safety-note { margin: 14px 20px 0; padding: 10px 13px; border: 1px solid #f0d7a0; border-radius: 10px; color: #73551c; background: #fff8e7; font-size: 12px; line-height: 1.45; }
.messages { flex: 1; overflow-y: auto; padding: 20px clamp(16px, 4vw, 42px); display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }.day-divider { display: flex; justify-content: center; color: #8190a4; font-size: 12px; }.day-divider span { padding: 5px 10px; border-radius: 12px; background: #e7ecf2; }
.message { display: flex; align-items: flex-start; gap: 9px; max-width: 86%; }.message.user { align-self: flex-end; flex-direction: row-reverse; }.avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 14px; font-weight: 750; }.assistant .avatar { color: #fff; background: #c62640; }.user .avatar { color: #41617b; background: #dce7f0; }
.bubble { min-width: 62px; padding: 11px 13px; border-radius: 4px 14px 14px; color: #24344a; background: #fff; box-shadow: 0 1px 2px rgb(16 38 65 / 8%); font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }.user .bubble { border-radius: 14px 4px 14px 14px; color: #173e58; background: #c7ecff; }.message.error .bubble { border: 1px solid #d63c4b; color: #8d1f2a; background: #fff1f2; }.message-meta { padding: 5px 2px 0; color: #8593a4; font-size: 11px; }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }.typing i { width: 6px; height: 6px; border-radius: 50%; background: #a4afbd; animation: bounce 1.2s infinite ease-in-out; }.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; } @keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
.composer { padding: 12px 20px 18px; border-top: 1px solid #e1e7ef; background: #fff; }.input-row { display: flex; align-items: flex-end; gap: 10px; max-width: 840px; margin: 0 auto; }.input-shell { position: relative; flex: 1; } textarea { width: 100%; min-height: 46px; max-height: 128px; padding: 12px 54px 12px 14px; resize: none; overflow-y: hidden; border: 1px solid #cad5e1; border-radius: 12px; outline: 0; color: inherit; font: inherit; line-height: 1.45; } textarea:focus { border-color: #c62640; box-shadow: 0 0 0 3px rgb(198 38 64 / 12%); }
button { font: inherit; cursor: pointer; }.send { flex: 0 0 78px; height: 46px; border: 0; border-radius: 12px; color: #fff; background: #c62640; font-weight: 650; }.send:hover { background: #ad1f36; }.send:disabled, .mic:disabled, textarea:disabled { cursor: wait; opacity: .58; }.voice-answer { flex: 0 0 46px; display: grid; place-items: center; height: 46px; padding: 0; border: 1px solid #cad5e1; border-radius: 12px; color: #8795a7; background: #fff; transition: color .16s, background .16s, border-color .16s; }.voice-answer:disabled { cursor: not-allowed; color: #aab3bd; border-color: #d8dee5; background: #eef1f4; opacity: .72; }.voice-answer svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.voice-answer-wave { display: none; }.voice-answer[aria-pressed="true"] { border-color: #c62640; color: #fff; background: #c62640; box-shadow: 0 1px 3px rgb(198 38 64 / 24%); }.voice-answer[aria-pressed="true"] .voice-answer-wave { display: block; }.voice-answer[aria-pressed="true"] .voice-answer-slash { display: none; }.voice-answer:not(:disabled):hover { border-color: #c62640; color: #c62640; }.voice-answer[aria-pressed="true"]:hover { color: #fff; background: #ad1f36; }.voice-answer:focus-visible { outline: 3px solid rgb(198 38 64 / 28%); outline-offset: 2px; }.mic { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #c62640; box-shadow: 0 1px 3px rgb(198 38 64 / 28%); transition: transform .16s, background .16s; touch-action: none; }.mic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.mic:hover { background: #ad1f36; transform: scale(1.06); }.mic.recording { background: #8f1a2e; animation: pulse 1.1s infinite; }.mic.recording:before, .mic.recording:after { content: ""; position: absolute; inset: 0; border: 1.5px solid #c62640; border-radius: 50%; pointer-events: none; animation: voice-wave 1.5s ease-out infinite; }.mic.recording:after { animation-delay: .72s; }.mic:focus-visible { outline: 3px solid rgb(198 38 64 / 28%); outline-offset: 2px; } @keyframes pulse { 50% { box-shadow: 0 0 0 6px rgb(143 26 46 / 16%); } } @keyframes voice-wave { 0% { opacity: .72; transform: scale(1); } 100% { opacity: 0; transform: scale(2.15); } }
.composer-tip { display: flex; align-items: center; gap: 12px; margin: 7px 2px 0; color: #8995a6; font-size: 11px; }.composer-tip audio { height: 24px; max-width: 220px; }
.voice-overlay { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; background: rgb(23 32 51 / 18%); pointer-events: none; }.voice-overlay[hidden] { display: none; }.voice-call-card { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 164px; padding: 28px 24px; border-radius: 18px; color: #fff; background: rgb(25 35 52 / 92%); font-size: 14px; box-shadow: 0 10px 36px rgb(17 25 39 / 28%); }.voice-call-icon { position: relative; display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: #c62640; }.voice-call-icon:before, .voice-call-icon:after { content: ""; position: absolute; inset: 0; border: 1.5px solid rgb(255 255 255 / 72%); border-radius: 50%; animation: call-wave 1.6s ease-out infinite; }.voice-call-icon:after { animation-delay: .8s; }.voice-call-icon svg { width: 33px; height: 33px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } @keyframes call-wave { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.95); } }
@media (max-width: 560px) { .app { width: 100%; }.topbar { padding: 13px 16px; }.online { display: none; }.safety-note { margin: 10px 12px 0; }.messages { padding: 16px 12px; }.message { max-width: 94%; }.composer { padding: 10px 12px 14px; } }
