*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body{
    font-family: Arial, sans-serif;
    background-color: #121212;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero{
    color:#d3d3d3;
    font-size: 14px;
}
.Chat{
    width: 90%;
    max-width: 800px;
    margin: 32px auto 20px;
    flex: 1;
    display: flex;
    gap: 16px;
    overflow-y:auto;
    flex-direction: column;
}
.Botmsg{
    margin-top: 8px;
    background-color: transparent;
    color:#eeeeee;
    padding: 4px 0;
    border-radius: 14px 14px 14px 4px;
    width: fit-content;
    max-width: 100%;
    line-height: 1.6;
    align-self: flex-start;
    border: none;

}
.Botmesg{
    font-size: 15px;
}
.input{
    width: 90%;
    max-width: 800px;
    margin: 0 auto 20px;
    display: flex;
    gap: 10px;
    background-color: #1a1a1a;
    padding: 6px 6px 6px 14px;
    border: 1px solid #2f2f2f;
    border-radius: 28px;
}
.input textarea{
    flex:1;
    padding : 12px 15px;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    background-color: transparent;
    color: white;
    resize: none;
    overflow-y: auto;
    max-height: 140px;
    line-height: 20px;
    height: 44px;
}
.input textarea::placeholder{
    color: #777;
}
.input textarea:focus{
    border-color: #e284e2;
    outline: none;
}
button{
    padding: 0 20px;
    border: none;
    border-radius: 7px;
    background: rgb(139,65,139);
    color: white;
    font-weight:bold;
    font-size: 15px;
    cursor: pointer;
    
}
button:hover{
    background: rgb(97, 45, 97);
}
.UserBubble{
    background-color: rgb(105,58,105);
    color:#ffffff;
    padding: 12px 15px;
    border-radius: 22px;
    width: fit-content;
    max-width: 75%;
    line-height: 1.3;
    align-self: flex-end;
}

#status{
    display: block;
    font-size: 20px;
    margin: 20px;
}
.Thinking{
    display: none;
    background-color:#1e1e1e;
    color: #bdbdbd;
    padding: 12px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    width: fit-content;
    max-width: 70%;
    line-height: 1.4;
    align-self: flex-start;
    flex-direction: column;
    font-style: italic;
}
.sidebar{
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background-color: #1e1e1e;
    color: white;
    padding: 20px;
    border-right: 1px solid #333;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}
.sidebar.open{
    transform: translateX(0);
}
.main{
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.chatpiece{
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.2s ease, transform 0.2s ease;

}
.chatpiece:hover{
    background-color: #2a2a2a;
    transform: translateX(3px);

}
.sidebar h3{
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    
}
.sendbtn{
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    transition: 0.2s ease;
}
.sendbtn:hover{
    transform: scale(1.2);
}
.newchat{
    width: 100%;
    height: 42px;
    border-radius: 10px;
    margin-top: 6px;
    background-color: #272727;
    border: 1px solid #333;
    color: #eeeeee
}
.newchat:hover{
    background-color: #303030;
    border-color: rgb(139, 65,139);
}
.sidebrand{
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebrand span{
    font-size: 24px;
}
.sidebrand h2{
    font-size: 18px;
    margin-bottom: 2px;
}
.sidebrand p{
    font-size: 12px;
    color: #999;
}
.welcometxt{
    margin: auto;
    text-align: center;
    color: #eeeeee;
}
.welcometxt h2{
    font-size: 28px;
    margin-bottom: 8px;
    color: #f1e8f1;
}
.welcometxt p{
    color: #a8a0a8;
    font-size: 14px;
}
.suggestions{
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
    

}
.suggestion strong{
    font-size: 14px;
    color: #eeeeee;
}
.suggestion span{
    font-size: 12px;
    color: #999;
    line-height: 1.4;
}
.suggestion:hover{
    border-color: rgb(139, 65, 139);
    transform: translateY(-2px);
}
.suggestion{
    background-color: #1a1a1a;
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 14px 16px;
    width: 230px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: 0.2s ease;
}
.chatpiece.active{
    background-color: #302330;
    border-left: 3px solid rgb(139, 65, 139);
}
.list{
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.input textarea::-webkit-scrollbar{
    width: 8px;
}
.input textarea::-webkit-scrollbar-thumb{
    background: #555;
    border-radius: 10px;
}
.input textarea::-webkit-scrollbar-track{
    background: #1a1a1a;
}
.sidebaroverlay{
    position: fixed;
    inset:0;
    background-color: rgb(0,0,0,0.45);
    z-index: 950;
    display: none;
}
.sidebaroverlay.open{
    display: block;
}
.quizstatus{
    display: none;
    justify-content: space-between;
    align-items: center;
    color: #bdbdbd;
    font-size: 13px;
    padding:8px 12px;
    border-bottom: 1px solid #303030;
    position: sticky;
    top : 0;
    z-index: 10;
    background-color: #121212;

}
.explainstatus{
    display: none;
    align-items: center;
    color: #bdbdbd;
    font-size: 13px;
    padding: 8px 12px;
    border-bottom: 1px solid #303030;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #121212;
}
.flashcardbox{
    display: none;
    width: 90%;
    margin: auto;
    max-width: 560px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 18px;
    flex-direction: column;
    padding: 28px;
    align-items: center;
    text-align: center;
    gap: 20px;
}
.flashcardcontent{
    color: #eeeeee;
    font-size: 18px;
    line-height:1.5;
}
.flashcardbtn{
    height: 40px;
    border-radius:10px;
}
.sidebarbtn{
    position: fixed;
    top: 18px;
    left: 18px;
    width: 36px;
    background: transparent;
    height: 36px;
    padding: 0;
    z-index: 900;
    font-size: 25px;
    color: #bdbdbd;
    border-radius: 8px;
    border: none;
    
}
.sidebarbtn:hover{
    background-color: #242424;
    border-radius: 8px;
}
.sideclose{
    position: absolute;
    top: 16px;
    right:16px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    font-size: 22px;
    font-weight: normal;
    border-radius: 8px;
    color:#bdbdbd   
}
.sideclose:hover{
    background-color: #2a2a2a;
    color:white;
}
.sidebarbtn svg{
    width: 25px;
    height:25px;
    fill: none;
    stroke: #bdbdbd;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
.sideclose svg{
    width: 22px;
    height:22px;
    fill: none;
    stroke: #bdbdbd;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}
@media(max-width: 768px){
    .sidebar{
        width: 82%;
        max-width: 280px;
    }
    .main{
        margin-left: 0;
        width: 100%;
    }
    .Chat{
        width: 94%;
        margin: 64px auto 12px;
        gap: 12px;
    }
    .input{
        width: 92%;
        margin: 0 auto 12px;
    }
    .suggestions{
        flex-direction: column;
        width: 100%;
        align-items: center;
    }
    .suggestion{
        width: 100%;
        max-width: 340px;
    }
    .welcometxt h2{
        font-size: 24px;
        text-align: center;
    }
    .welcometxt > p{
        font-size: 14px;
        text-align: center;
        padding: 0 16px;
    }
    .Botmsg{
        max-width: 85%;

    }
    .UserBubble{
        max-width: 85%;
    }
    .flashcardbox{
        width: 100%;
        padding: 22px;

        
    }
    .Botmsg,
    .UserBubble{
        overflow-wrap: break-word;
        word-break: break-word;
    }
}
