/* ==========================================
   PHANTOMIX AI ASSISTANT
   Production Chatbot CSS
   ========================================== */

:root{
    --bg:#070b17;
    --card:#111827;
    --card-2:#182235;
    --primary:#00e5ff;
    --secondary:#2196f3;
    --accent:#7cff6b;
    --text:#ffffff;
    --text-muted:#a0aec0;
    --border:rgba(255,255,255,.08);
    --shadow:0 0 25px rgba(0,229,255,.25);
    --radius:18px;
}

/* Floating Button */

#phantomix-chat-toggle{
    position:fixed;
    right:22px;
    bottom:22px;
    width:68px;
    height:68px;
    border:none;
    border-radius:50%;
    background:linear-gradient(
        135deg,
        var(--primary),
        var(--secondary)
    );
    cursor:pointer;
    z-index:99999;
    box-shadow:
        0 0 20px rgba(0,229,255,.4),
        0 0 45px rgba(33,150,243,.3);
    transition:.3s ease;
}

#phantomix-chat-toggle:hover{
    transform:scale(1.08);
}

#phantomix-chat-toggle img{
    width:40px;
    height:40px;
    object-fit:contain;
}

/* Main Chat */

#phantomix-chat{
    position:fixed;
    right:22px;
    bottom:105px;
    width:380px;
    height:650px;
    max-height:80vh;

    background:rgba(17,24,39,.96);

    backdrop-filter:blur(20px);

    border:1px solid var(--border);

    border-radius:24px;

    overflow:hidden;

    display:flex;
    flex-direction:column;

    z-index:99998;

    box-shadow:
    0 0 35px rgba(0,229,255,.12),
    0 20px 50px rgba(0,0,0,.4);

    transform:translateY(30px);
    opacity:0;
    pointer-events:none;

    transition:.35s ease;
}

#phantomix-chat.active{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}

/* Header */

.phantomix-header{
    height:78px;

    background:
    linear-gradient(
    135deg,
    #0f172a,
    #12213d
    );

    border-bottom:1px solid var(--border);

    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:0 18px;
}

.phantomix-brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.phantomix-brand img{
    width:42px;
    height:42px;
    border-radius:50%;
}

.phantomix-brand h3{
    color:var(--text);
    font-size:16px;
    font-weight:700;
}

.phantomix-brand span{
    display:block;
    color:var(--accent);
    font-size:12px;
}

.phantomix-close{
    background:none;
    border:none;
    color:white;
    font-size:22px;
    cursor:pointer;
}

/* Messages */

.phantomix-messages{
    flex:1;
    overflow-y:auto;
    padding:18px;

    display:flex;
    flex-direction:column;
    gap:14px;

    scroll-behavior:smooth;
}

.phantomix-messages::-webkit-scrollbar{
    width:5px;
}

.phantomix-messages::-webkit-scrollbar-thumb{
    background:var(--primary);
    border-radius:20px;
}

/* Message Bubble */

.message{
    max-width:85%;
    padding:12px 15px;
    border-radius:16px;
    line-height:1.5;
    font-size:14px;
    word-wrap:break-word;
    animation:fadeIn .25s ease;
}

.user-message{
    align-self:flex-end;

    background:
    linear-gradient(
    135deg,
    var(--primary),
    var(--secondary)
    );

    color:#000;
    font-weight:600;

    border-bottom-right-radius:5px;
}

.bot-message{
    align-self:flex-start;

    background:var(--card-2);

    color:var(--text);

    border:1px solid rgba(255,255,255,.06);

    border-bottom-left-radius:5px;
}

/* Timestamp */

.message-time{
    font-size:11px;
    opacity:.65;
    margin-top:5px;
}

/* Typing */

.typing{
    display:flex;
    gap:6px;
    align-items:center;
}

.typing span{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--primary);

    animation:bounce 1s infinite;
}

.typing span:nth-child(2){
    animation-delay:.2s;
}

.typing span:nth-child(3){
    animation-delay:.4s;
}

/* Input */

.phantomix-input{
    border-top:1px solid var(--border);

    background:#0d1325;

    padding:14px;

    display:flex;
    align-items:center;
    gap:10px;
}

.phantomix-input input{
    flex:1;

    background:#1b2740;

    border:1px solid rgba(255,255,255,.08);

    border-radius:14px;

    color:white;

    padding:14px;

    outline:none;
}

.phantomix-input input::placeholder{
    color:#9ca3af;
}

.phantomix-send{
    width:52px;
    height:52px;

    border:none;

    border-radius:14px;

    background:
    linear-gradient(
    135deg,
    var(--primary),
    var(--secondary)
    );

    color:#000;

    font-size:18px;

    cursor:pointer;

    transition:.3s;
}

.phantomix-send:hover{
    transform:scale(1.05);
}

/* Welcome Card */

.phantomix-welcome{
    background:
    linear-gradient(
    135deg,
    rgba(0,229,255,.15),
    rgba(33,150,243,.12)
    );

    border:1px solid rgba(0,229,255,.15);

    border-radius:18px;

    padding:18px;
}

.phantomix-welcome h4{
    color:white;
    margin-bottom:8px;
}

.phantomix-welcome p{
    color:var(--text-muted);
    font-size:13px;
}

/* Mobile */

@media(max-width:768px){

#phantomix-chat{

    width:100%;
    height:100vh;

    max-height:100vh;

    right:0;
    bottom:0;

    border-radius:0;
}

#phantomix-chat-toggle{
    right:18px;
    bottom:18px;
}
}

/* Animations */

@keyframes fadeIn{
from{
opacity:0;
transform:translateY(8px);
}
to{
opacity:1;
transform:translateY(0);
}
}

@keyframes bounce{
0%,100%{
transform:translateY(0);
}
50%{
transform:translateY(-5px);
}
}