/* ===========================
   NIKKI AI
   Chat.css
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Poppins",sans-serif;
}

body{
    background:#0b1020;
    color:#fff;
    overflow:hidden;
}

/* ===========================
   Background
=========================== */

.background{
    position:fixed;
    inset:0;
    z-index:-1;
}

.grid{
    position:absolute;
    width:100%;
    height:100%;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size:40px 40px;
}

.glow{
    position:absolute;
    width:350px;
    height:350px;
    border-radius:50%;
    filter:blur(120px);
    opacity:.35;
}

.glow-blue{
    background:#3b82f6;
    top:-100px;
    left:-100px;
}

.glow-purple{
    background:#7c3aed;
    right:-120px;
    bottom:-120px;
}

/* ===========================
   Chat Container
=========================== */

.chat-container{

    width:95%;

    max-width:1200px;

    height:95vh;

    margin:15px auto;

    display:flex;

    flex-direction:column;

    background:rgba(255,255,255,.06);

    backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.08);

    border-radius:25px;

    overflow:hidden;

}

/* ===========================
   Header
=========================== */

.chat-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:20px 25px;

    border-bottom:1px solid rgba(255,255,255,.08);

}

.chat-header h2{

    font-size:28px;

}

.chat-header p{

    color:#00ff88;

    margin-top:4px;

}

.chat-logo{

    width:60px;

}

.back-btn{

    width:50px;

    height:50px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:50%;

    background:#3b82f6;

    color:#fff;

    text-decoration:none;

    font-size:20px;

    transition:.3s;

}

.back-btn:hover{

    background:#2563eb;

    transform:scale(1.08);

}

/* ===========================
   Chat Messages
=========================== */

.chat-box{

    flex:1;

    padding:25px;

    overflow-y:auto;

    display:flex;

    flex-direction:column;

    gap:18px;

    scroll-behavior:smooth;

}

/* ===========================
   AI Message
=========================== */

.ai-message{

    align-self:flex-start;

    max-width:75%;

    padding:16px 20px;

    background:rgba(59,130,246,.18);

    border:1px solid rgba(59,130,246,.35);

    border-radius:18px 18px 18px 5px;

    color:#fff;

    line-height:1.7;

    animation:fadeIn .35s ease;

}

/* ===========================
   User Message
=========================== */

.user-message{

    align-self:flex-end;

    max-width:75%;

    padding:16px 20px;

    background:#3b82f6;

    border-radius:18px 18px 5px 18px;

    color:#fff;

    line-height:1.7;

    animation:fadeIn .35s ease;

}

/* ===========================
   Chat Scrollbar
=========================== */

.chat-box::-webkit-scrollbar{

    width:8px;

}

.chat-box::-webkit-scrollbar-track{

    background:transparent;

}

.chat-box::-webkit-scrollbar-thumb{

    background:#3b82f6;

    border-radius:20px;

}

/* ===========================
   Animation
=========================== */

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(12px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ===========================
   Chat Input Area
=========================== */

.chat-input{

    display:flex;

    align-items:center;

    gap:12px;

    padding:20px;

    border-top:1px solid rgba(255,255,255,.08);

    background:rgba(255,255,255,.04);

    backdrop-filter:blur(15px);

}

.chat-input input{

    flex:1;

    padding:15px 20px;

    border:none;

    outline:none;

    border-radius:15px;

    background:rgba(255,255,255,.08);

    color:#fff;

    font-size:16px;

}

.chat-input input::placeholder{

    color:#b8c2d8;

}

/* ===========================
   Buttons
=========================== */

.icon-btn,

.send-btn{

    width:55px;

    height:55px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:20px;

    transition:.3s;

}

.icon-btn{

    background:rgba(255,255,255,.08);

    color:#fff;

}

.icon-btn:hover{

    background:#3b82f6;

    transform:scale(1.08);

}

.send-btn{

    background:#3b82f6;

    color:#fff;

}

.send-btn:hover{

    background:#2563eb;

    transform:scale(1.08);

}

/* ===========================
   Responsive Design
=========================== */

@media(max-width:768px){

    .chat-container{

        width:100%;

        height:100vh;

        margin:0;

        border-radius:0;

    }

    .chat-header{

        padding:15px;

    }

    .chat-logo{

        width:45px;

    }

    .chat-header h2{

        font-size:22px;

    }

    .chat-box{

        padding:15px;

    }

    .ai-message,

    .user-message{

        max-width:90%;

        font-size:15px;

    }

    .chat-input{

        padding:12px;

        gap:8px;

    }

    .icon-btn,

    .send-btn{

        width:48px;

        height:48px;

        font-size:18px;

    }

}

@media(max-width:480px){

    .chat-input input{

        font-size:14px;

        padding:12px 16px;

    }

}