#doorlink-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#doorlink-chat-btn:hover {
    opacity: 0.85;
}
#doorlink-chat-panel{
    position:fixed;
    right:30px;
    bottom:100px;
    width:420px;
    height:650px;
    background:#fff;
    display:none;
    flex-direction:column;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.3);
    z-index:99999;
}
#doorlink-header{
    height:55px;
    background:#1976d2;
    color:#fff;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 20px;
    font-size:18px;
}
#doorlink-close{
    cursor:pointer;
    font-size:20px;
}
#doorlink-history{
    flex:1;
    padding:15px;
    overflow-y:auto;
    background:#f5f5f5;
}
.ai{
    display:flex;
    margin-bottom:15px;
}
.user{
    display:flex;
    justify-content:flex-end;
    margin-bottom:15px;
}
.ai div{
    background:white;
    padding:10px 14px;
    border-radius:10px;
    max-width:80%;
}
.user div{
    background:#1976d2;
    color:white;
    padding:10px 14px;
    border-radius:10px;
    max-width:80%;
}
#doorlink-input-box{
    display:flex;
    padding:10px;
    border-top:1px solid #ddd;
}
#doorlink-input{
    flex:1;
    height:40px;
    padding:0 10px;
    font-size:15px;
}
#doorlink-send{
    width:80px;
    margin-left:10px;
}
.ai-thinking{
    display:flex;
    align-items:center;
    margin:10px 0;
}

.ai-thinking .bubble{
    background:#f3f4f6;
    border-radius:18px;
    padding:12px 16px;
}

.typing{
    display:flex;
    gap:4px;
}

.typing span{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#999;
    animation:typing 1.4s infinite;
}

.typing span:nth-child(2){
    animation-delay:.2s;
}

.typing span:nth-child(3){
    animation-delay:.4s;
}

@keyframes typing{
0%{
    opacity:.2;
    transform:translateY(0);
}
50%{
    opacity:1;
    transform:translateY(-4px);
}
100%{
    opacity:.2;
    transform:translateY(0);
}
}
@media (max-width:768px){
#doorlink-chat-panel{
    position:fixed;
    left:0;
    top:0;
    width:100vw;
    height:100dvh;
    border-radius:0;
    margin:0;
}
#doorlink-chat-btn{
    bottom:18px;
    right:18px;
}
#doorlink-input-box{
    padding-bottom:calc(
        env(safe-area-inset-bottom) + 16px
    );
    padding-top:12px;
}
}