body {
    /* This is your default starting color */
    background-color: rgb(216, 192, 255); 
    color: white;
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    
    /* This makes the color change look smooth instead of snapping */
    transition: background-color 0.8s ease; 
    
    /* Ensure the body takes up the whole screen */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.darkmode::before {
  opacity: 1;
}

body.darkmode {
  color: white;
}

html, body {
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#app-container{
    display: flex;
    width: 100%;
    height: 100%;
}

#canvas-container{
    flex: 1;
    min-width: 0;
    position: relative;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#side-panel{
    width: 350px;
    color: black;
    background: rgba(252, 252, 252, 0.8);
    backdrop-filter: blur(10px);
    border-left: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

body.darkmode #side-panel{
    background: rgba(41, 41, 41, 0.8);
}

#chat-history{
    flex: 1;
    padding-top: 10px;
    margin: 5px;
    overflow-y: auto;
}

.message{
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
}

.bot {
    background: rgb(192, 192, 255);
    align-self: flex-start;
}

body.darkmode .bot{
  background: rgb(105, 105, 255);
  color: white;
}

#input-area{
    padding: 1px;
    display: flex;
    gap: 1px;
}

input{
    flex: 1;
    background: hsl(0, 0%, 100%);
    border: 1px solid #5179ff;
    color: black;
    padding: 10px;
    border-radius: 5px;
    margin: 2px;
}

body.darkmode input{
    background: #222222;
    border: 1px solid #444;
    color: white;
}

#send-btn{
    background: rgb(192, 192, 255);
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 1px;
}

.dmbtn,.lmbtn{
    background: rgb(219, 192, 255);
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 1px;
}


body.darkmode #send-btn{
    background: rgb(105, 105, 255);
    color: white;
}

body.darkmode .dmbtn,.lmbtn{
    background: rgb(173, 110, 255);
    color: white;
}

.user {
    background: rgb(236, 236, 236);
    align-self: flex-end;
    border: 1px solid #bbbbbb5e;
    margin-left: auto;
}

body.darkmode .user{
    background: rgb(59, 59, 59);
    border: 1px solid #a1a1a15e;
    color: white;
}

.lbtn, .dbtn{
    margin: 10px;
    cursor: pointer;
}

.dbtn{
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.dbtn.hidden{
    display: none;
}

.dmbtn.hidden{
    display: none;
}

.lbtn{
    border: none;
    cursor: pointer;
    display: none;
}

.lmbtn{
    border: none;
    cursor: pointer;
    display: none; 
}