html,
body{
    margin:0;
    background:#111;
    font-family:Arial,sans-serif;
    height:100%;
    width:100%;
}

body{
       overflow:hidden;
    }

.chat{
    flex:1;
    width:100%;
    height:100vh;
    background:#1b1b1b;
    display:flex;
    flex-direction:column;
    min-width:0;
}

h1{

color:white;

text-align:center;

}

#messages{

flex:1;

overflow:auto;

color:white;

padding:10px;

}

.user{

background:#4CAF50;

padding:10px;

margin:10px;

border-radius:10px;

}

.ai{

background:#333;

padding:10px;

margin:10px;

border-radius:10px;

}

.bottom{

display:flex;
width:100%;
padding:15px;
gap:10px;

}

input{

flex:1;

padding:12px;

font-size:16px;

}

button{

padding:12px;

cursor:pointer;

}
textarea{
    flex:1;
    resize:none;
    padding:12px;
    border:none;
    outline:none;
    border-radius:10px;
    font-size:16px;
    font-family:Arial,sans-serif;
    min-height:50px;
    max-height:180px;
    overflow-y:auto;
}
header{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 25px;
    border-bottom:1px solid #333;
    background:#1b1b1b;
    flex-wrap:wrap;
    gap:10px;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand h1,
.brand h2{
    margin:0;
    color:white;
}

.account{
    display:flex;
    align-items:center;
    gap:15px;
}

header img {
    margin: 10px auto;
}
.app{
    display:flex;
    width:100%;
    height:100vh;
}

.sidebar{
    width:260px;
    background:#171717;
    color:white;
    display:flex;
    flex-direction:column;
    padding:15px;
    overflow:auto;
    flex-shrink:0;
}

.sidebar h3{
    margin-top:20px;
    margin-bottom:10px;
}

#history{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.historyItem{
    padding:12px;
    background:#2a2a2a;
    border-radius:8px;
    cursor:pointer;
    height:20px;
}

.historyItem:hover{
    background:#444;
}

#newChat{
    display:flex;
    align-items:center;
    gap:12px;

    margin-top:12px;
    padding:12px;

    background:#252525;
    border-radius:12px;

    cursor:pointer;
    transition:.25s;
    color:white;
}

#newChat:hover{
    background:#2b2b2b;
}

#newChat svg{
    width:48px;
    height:48px;
    border-radius:10px;
    object-fit:cover;
}

.chat{
    flex:1;
    display:flex;
    flex-direction:column;
    
}

header{
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    border-bottom:1px solid #333;
}


#messages{
    flex:1;
    overflow-y:auto;
    padding:20px;
    width:90%;
}
.historyItem{
    padding:10px;
    margin-bottom:8px;
    background:#2b2b2b;
    color:white;
    border-radius:8px;
    cursor:pointer;
    word-break:break-word;
    
}
#userEmail{
    font-size:11px;
    color:#888;
}

#userName{
    font-size:13px;
    font-weight:bold;
}
.brand{
    display:flex;
    align-items:center;
    gap:12px;
}


.historyItem:hover{
    background:#3b3b3b;
}
.account{
display:flex;
gap:10px;
align-items:center;
margin-top:10px;
}

.account button{
background:#4285F4;
color:white;
border:none;
padding:10px 18px;
border-radius:8px;
}

#logoutBtn{
background:#d9534f;
}
#loginBtn{
    display:flex;
    align-items:center;
    gap:10px;

    background:white;
    color:#444;

    border:none;
    border-radius:30px;

    padding:10px 18px;

    font-size:15px;
    font-weight:600;

    cursor:pointer;

    transition:.25s;
}

#loginBtn:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,.3);
}

#loginBtn img{
    width:22px;
    height:22px;
}
#userInfo{
    display:flex;
    align-items:center;
    gap:12px;
}

#userPhoto{
    width:40px;
    height:40px;
    border-radius:50%;
    object-fit:cover;
}

#userName{
    color:white;
    font-weight:600;
}

#logoutBtn{
    background:#444;
    color:white;
    border:none;
    border-radius:20px;
    padding:8px 14px;
    cursor:pointer;
}
.sidebar{
    width:260px;
    background:#171717;
    color:white;
    display:flex;
    flex-direction:column;
    padding:15px;
    height:100VH;
}

#history{
    flex:1;
    overflow-y:auto;
}

.sidebarFooter{
    margin-top:auto;
    margin-bottom:28px;   /* Move it up */
    padding-top:15px;
    border-top:1px solid #333;
    text-align:center;
    font-size:13px;
    color:#888;
    font-weight:500;
}
.account{
    display:flex;
    align-items:center;
    gap:10px;
}

#userInfo{
    display:flex;
    align-items:center;
    gap:8px;
}

#userPhoto{
    width:30px;
    height:30px;
    border-radius:50%;
    object-fit:cover;
}

.userDetails{
    display:flex;
    flex-direction:column;
    line-height:1.1;
}

#userName{
    color:white;
    font-size:10px;
    font-weight:600;
}

#userEmail{
    color:#999;
    font-size:5px;
}

#logoutBtn{
    padding:5px 10px;
    font-size:11px;
    border-radius:15px;
}
#uploadBtn{
    width:45px;
    height:45px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:#2d2d2d;
    color:white;

    cursor:pointer;
    font-size:22px;
}

#uploadBtn:hover{
    background:#3d3d3d;
    transform:translateY(-2px) scale(1.08);
    box-shadow:0 0 15px rgba(255,255,255,.25);
}
.bottom{
    display:flex;
    align-items:flex-end;
    gap:10px;
    padding:15px;
}

.bottom{
    padding:15px;
}

.inputArea{
    display:flex;
    align-items:flex-end;
    background:#2b2b2b;
    border-radius:18px;
    padding:8px;
    gap:10px;
    width:90%;
}

#prompt{
    flex:1;
    background:transparent;
    border:none;
    outline:none;
    color:white;
    font-size:16px;
    resize:none;
    min-height:24px;
    max-height:180px;
    text-align:center;
    padding:8px 0;
    
}

#uploadBtn{
    width:40px;
    height:40px;
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    background:none;
    color:#ffffff;
    font-size:22px;
    border-radius:50%;

}

#uploadBtn:hover{
    background:#3d3d3d;
    transform:translateY(-2px) scale(1.08);
    box-shadow:0 0 15px rgba(255,255,255,.25);
}

#sendBtn{
    width:42px;
    height:42px;
    border:none;
    border-radius:50%;
    background:none;
    color:white;
    font-size:18px;
    cursor:pointer;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink:0;
}

#sendBtn:hover{
    background:#3d3d3d;
    transform:translateY(-2px) scale(1.08);
    box-shadow:0 0 15px rgba(255,255,255,.25);
}
.brand img{
    width:45px;
    height:45px;
    max-width:100%;
}
@media (max-width:768px){

    .sidebar{
        width: 200px;;
    }

    .chat{
        width:100%;
    }

    header{
        padding:10px;
    }

    .brand h2{
        font-size:18px;
    }

    #sendBtn,
    #uploadBtn{
        width:40px;
        height:40px;
    }

    #prompt{
        font-size:15px;
    }

}

.historyItem{
    display:flex;
    justify-content:space-between;
    align-items:center;
}


.deleteChatBtn{
    background:none;
    border:none;
    color:#ff5555;
    cursor:pointer;
    font-size:16px;
}


.deleteChatBtn:hover{
    transform:scale(1.7);
}
.modal{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.6);

    justify-content:center;

    align-items:center;

    z-index:2000;

}


.modalBox{

    background:#222;

    color:white;

    width:320px;

    padding:25px;

    border-radius:15px;

    text-align:center;

    box-shadow:0 10px 40px black;

}


.modalBox h3{

    margin-bottom:10px;

}


.modalButtons{

    display:flex;

    justify-content:center;

    gap:15px;

    margin-top:20px;

}


#cancelDelete{

    background:#444;

    color:white;

    border:none;

    padding:10px 20px;

    border-radius:10px;

}


#confirmDelete{

    background:#d9534f;

    color:white;

    border:none;

    padding:10px 20px;

    border-radius:10px;

}
.copyBtn{
    margin-top:8px;
    background:#444;
    color:white;
    border:none;
    padding:5px 10px;
    border-radius:8px;
    cursor:pointer;
    font-size:12px;
    text-align:right;
    align-content:right;
    align-items:right;
    
}
#menuBtn{
    display:none;
    font-size:28px;
    background:none;
    border:none;
    color:white;
    cursor:pointer;
}


.copyBtn:hover{
    background:#666;
}
@media (max-width:768px){

.sidebar{
    position:fixed;
    left:-280px;
    top:0;
    width:260px;
    height: 800px;
    transition:.3s;
    z-index:1000;
    display:flex;
    flex-direction:column;

}


.sidebar.open{
    left:0;
}

#menuBtn{
    display:block;
    font-size:28px;
    background:none;
    border:none;
    color:white;
    cursor:pointer;
}

}







#closeMenu{
    display:none;   /* Hidden on desktop */

    width:100%;
    height:40px;

    align-items:center;
    justify-content:center;

    background:none;
    border:none;
    border-radius:8px;

    color:white;
    cursor:pointer;

    transition:.2s;
}

#closeMenu:hover{
    background:#2b2b2b;
}

#closeMenu svg{
    width:20px;
    height:20px;
}
#micBtn{
    width:45px;
    height:45px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    font-size:8px;
    background:none;
    color:white;
}
#micBtn:hover{
    background:#3d3d3d;
    transform:translateY(-2px) scale(1.08);
    box-shadow:0 0 15px rgba(255,255,255,.25);
}

#micBtn:active{
    transform:scale(.95);
}
#micBtn.recording{
    background:#ff3b30;
    animation:pulse 1s infinite;
}

@keyframes pulse{
    0%{
        transform:scale(1);
    }
    50%{
        transform:scale(1.12);
    }
    100%{
        transform:scale(1);
    }
}

.sharechat-btn{
    background: none;
    border: none;
    color: white;
}
#calculatorBtn{
    display:flex;
    align-items:center;
    gap:12px;

    margin-top:12px;
    padding:12px;

    background:#252525;
    border-radius:12px;

    cursor:pointer;
    transition:.25s;
    color:white;
}


.toolButton:hover{
    background:#333;
    transform:translateY(-2px);
}

#calculatorBtn svg{
     width:48px;
    height:48px;
    border-radius:10px;
    object-fit:cover;
}
.toolButton{
    display:flex;
    align-items:center;
    gap:12px;

    margin-top:12px;
    padding:12px;

    background:#252525;
    border-radius:12px;

    cursor:pointer;
    transition:.25s;
    
}


.toolButton:hover{
    background:#333;
    transform:translateY(-2px);
}

.toolButton img{
    width:48px;
    height:48px;
    border-radius:10px;
    object-fit:cover;
}

.toolButton h4{
    margin:0;
    color:white;
    font-size:15px;
}

.toolButton p{
    margin:3px 0 0;
    color:#999;
    font-size:12px;
}
@media (max-width:768px){

    #closeMenu{
        display:flex;

        width:100%;
        height:40px;
    }

}
.actionBtn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    padding:10px 16px;

    background:#252525;
    color:white;

    border:none;
    border-radius:12px;

    cursor:pointer;
    transition:.25s;

    font-size:14px;
    font-weight:600;
}

.actionBtn:hover{
    background:#333;
    transform:translateY(-2px);
}

.actionBtn svg{
    width:18px;
    height:18px;
}