*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

body{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:linear-gradient(135deg,#0f172a,#1e293b,#334155);
    padding:20px;
}

.chat-container{
    width:100%;
    max-width:850px;
    height:90vh;
    background:rgba(255,255,255,0.08);
    backdrop-filter:blur(15px);
    border:1px solid rgba(255,255,255,0.1);
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 10px 40px rgba(0,0,0,0.3);
    display:flex;
    flex-direction:column;
}

.chat-header{
    background:rgba(255,255,255,0.05);
    color:white;
    padding:18px;
    text-align:center;
    font-size:1.3rem;
    font-weight:600;
    border-bottom:1px solid rgba(255,255,255,0.1);
}

#chat-box{
    flex:1;
    overflow-y:auto;
    padding:20px;
    scroll-behavior:smooth;
}

#chat-box::-webkit-scrollbar{
    width:8px;
}

#chat-box::-webkit-scrollbar-thumb{
    background:#64748b;
    border-radius:10px;
}

.user-message{
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    color:white;
    padding:12px 18px;
    border-radius:18px 18px 5px 18px;
    margin:12px 0;
    width:fit-content;
    max-width:75%;
    margin-left:auto;
    box-shadow:0 5px 15px rgba(37,99,235,0.4);
    animation:slideRight .3s ease;
}

.ai-message{
    background:white;
    color:#1e293b;
    padding:12px 18px;
    border-radius:18px 18px 18px 5px;
    margin:12px 0;
    width:fit-content;
    max-width:75%;
    line-height:1.7;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
    animation:slideLeft .3s ease;
}

.input-area{
    display:flex;
    gap:10px;
    padding:15px;
    background:rgba(255,255,255,0.05);
    border-top:1px solid rgba(255,255,255,0.1);
}

#user-input{
    flex:1;
    padding:15px;
    border:none;
    outline:none;
    border-radius:12px;
    font-size:16px;
    background:white;
}

#send-btn{
    padding:15px 25px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    font-size:15px;
    font-weight:600;
    color:white;
    background:linear-gradient(135deg,#2563eb,#3b82f6);
    transition:.3s;
}

#send-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 5px 15px rgba(37,99,235,0.4);
}

#send-btn:active{
    transform:scale(.95);
}

.typing{
    color:#94a3b8;
    font-style:italic;
    padding:10px;
}

@keyframes slideRight{
    from{
        opacity:0;
        transform:translateX(30px);
    }
    to{
        opacity:1;
        transform:translateX(0);
    }
}

@keyframes slideLeft{
    from{
        opacity:0;
        transform:translateX(-30px);
    }
    to{
        opacity:1;
        transform:translateX(0);
    }
}

@media(max-width:768px){
    .chat-container{
        height:100vh;
        border-radius:0;
    }

    .user-message,
    .ai-message{
        max-width:90%;
    }
}