*{box-sizing:border-box;margin:0;padding:0}body{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);justify-content:center;align-items:center;min-height:100vh;font-family:system-ui,-apple-system,sans-serif;display:flex}.chat-container{background:#fff;border-radius:16px;flex-direction:column;width:100%;max-width:640px;height:90vh;display:flex;overflow:hidden;box-shadow:0 20px 60px #0000004d}.header{color:#fff;background:#2563eb;justify-content:space-between;align-items:center;padding:1rem 1.2rem;display:flex}.header h2{font-size:1.2rem;font-weight:600}.online-badge{background:#fff3;border-radius:999px;align-items:center;gap:.4rem;padding:.3rem .7rem;font-size:.85rem;display:flex}.online-badge .dot{background:#4ade80;border-radius:50%;width:8px;height:8px;animation:2s infinite pulse}@keyframes pulse{0%,to{opacity:1}50%{opacity:.4}}.messages{background:#f8fafc;flex:1;padding:1rem;overflow-y:auto}.msg{border-radius:10px;max-width:85%;margin-bottom:.6rem;padding:.5rem .8rem;animation:.2s fadeIn}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.msg.chat{background:#eff6ff;border-left:3px solid #2563eb}.msg.system{color:#92400e;background:#fef3c7;max-width:100%;font-size:.82rem;font-style:italic}.msg .user{color:#1e40af;font-size:.82rem;font-weight:700}.msg .time{color:#94a3b8;margin-left:.5rem;font-size:.7rem}.msg .text{word-break:break-word;white-space:pre-wrap;margin-top:.2rem}#form{background:#fff;border-top:1px solid #e2e8f0;padding:.8rem}.input-row{gap:.5rem;margin-bottom:.5rem;display:flex}.input-row:last-child{margin-bottom:0}#form input{border:1px solid #cbd5e1;border-radius:8px;outline:none;flex:1;padding:.6rem .8rem;font-size:.95rem;transition:border-color .2s}#form input:focus{border-color:#2563eb}#form button{color:#fff;cursor:pointer;background:#2563eb;border:none;border-radius:8px;padding:.6rem 1.2rem;font-size:.95rem;transition:background .2s}#form button:hover{background:#1d4ed8}#reroll{background:#f1f5f9;border:1px solid #cbd5e1;padding:.6rem .8rem;font-size:1.1rem}
