<style>

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter',sans-serif;
}

body{
    background:#f4f7f7;
}

/* BUTTON */

.chat-toggle{
    position:fixed;
    bottom:25px;
    right:25px;
    width:65px;
    height:65px;
    border-radius:50%;
    background:#0F766E;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:9999;
    font-size:26px;
    box-shadow:0 8px 25px rgba(0,0,0,0.18);
    transition:0.3s;
}

.chat-toggle:hover{
    transform:scale(1.05);
    background:#115E59;
}

/* POPUP */

.chat-popup{
    position:fixed;
    bottom:100px;
    right:25px;
    width:410px;
    max-width:95%;
    height:680px;
    background:white;
    border-radius:20px;
    overflow:hidden;
    display:none;
    flex-direction:column;
    z-index:9999;
    box-shadow:0 10px 40px rgba(0,0,0,0.15);
    border:1px solid #d9ece9;
}

/* HEADER */

.chat-header{
    background:linear-gradient(135deg,#0F766E,#14B8A6);
    color:white;
    padding:18px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.chat-header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.bot-avatar{
    width:50px;
    height:50px;
    border-radius:14px;
    background:white;
    color:#0F766E;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.bot-info h3{
    font-size:18px;
    font-weight:700;
    margin-bottom:2px;
    color:white;
    letter-spacing:0.3px;
    text-shadow:0 1px 2px rgba(0,0,0,0.15);
}

.bot-info p{
    font-size:12px;
    opacity:0.9;
}

.close-chat{
    cursor:pointer;
    font-size:20px;
}

/* BODY */

.chat-body{
    flex:1;
    padding:20px;
    overflow-y:auto;
    background:#f8fbfb;
}

/* MESSAGE */

.bot-message,
.user-message{
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:15px;
    max-width:85%;
    line-height:1.7;
    font-size:14px;
    animation:fadeIn 0.2s ease;
}

/* BOT */

.bot-message{
    background:white;
    color:#334155;
    border:1px solid #dcefed;
    border-bottom-left-radius:5px;
}

/* USER */

.user-message{
    background:linear-gradient(135deg,#14B8A6,#0F766E);
    color:white;
    margin-left:auto;
    border-bottom-right-radius:5px;
}

/* CARD */

.book-card{
    background:white;
    border:1px solid #dcefed;
    border-radius:14px;
    padding:14px;
    margin-top:10px;
    transition:0.3s;
}

.book-card:hover{
    border-color:#14B8A6;
    transform:translateY(-2px);
}

.book-title{
    font-size:15px;
    font-weight:600;
    color:#0F766E;
    margin-bottom:10px;
}

.book-info{
    font-size:13px;
    margin-bottom:6px;
    color:#475569;
}

/* INPUT */

.chat-footer{
    background:white;
    padding:15px;
    display:flex;
    align-items:center;
    gap:10px;
    border-top:1px solid #dcefed;
}

.chat-footer input{
    flex:1;
    border:1px solid #cfe7e4;
    border-radius:30px;
    padding:14px 18px;
    outline:none;
    font-size:14px;
    background:#f8fbfb;
}

.chat-footer input:focus{
    border-color:#14B8A6;
}

.chat-footer button{
    width:52px;
    height:52px;
    border:none;
    border-radius:50%;
    background:linear-gradient(135deg,#14B8A6,#0F766E);
    color:white;
    cursor:pointer;
    font-size:18px;
    transition:0.3s;
}

.chat-footer button:hover{
    transform:scale(1.05);
}

/* WELCOME */

.welcome-box{
    background:white;
    border:1px solid #dcefed;
    border-radius:16px;
    padding:18px;
    line-height:1.7;
    color:#475569;
}

.welcome-title{
    font-size:16px;
    font-weight:600;
    color:#0F766E;
    margin-bottom:10px;
}

/* TYPING */

.typing{
    display:flex;
    gap:5px;
}

.typing span{
    width:8px;
    height:8px;
    background:#14B8A6;
    border-radius:50%;
    animation:typing 1s infinite;
}

.typing span:nth-child(2){
    animation-delay:0.2s;
}

.typing span:nth-child(3){
    animation-delay:0.4s;
}

/* ANIMATION */

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(8px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes typing{
    0%{
        transform:translateY(0);
        opacity:0.5;
    }
    50%{
        transform:translateY(-4px);
        opacity:1;
    }
    100%{
        transform:translateY(0);
        opacity:0.5;
    }
}

/* MOBILE */

@media(max-width:480px){

    .chat-popup{
        width:100%;
        height:100%;
        right:0;
        bottom:0;
        border-radius:0;
    }

}

</style>