body{
    margin:0;
    font-family:Arial,sans-serif;
    display:flex;
    height:100vh;
}

.sidebar{
    width:300px;
    background:#1e1e1e;
    color:white;
    padding:20px;
    overflow-y:auto;
    box-sizing:border-box;
}

.sidebar h2{
    text-align:center;
    margin-top:0;
}

.history-item{
    padding:10px;
    margin:10px 0;
    background:#2b2b2b;
    border-radius:8px;
    word-wrap:break-word;
}

.main{
    flex:1;
    display:flex;
    flex-direction:column;
    background:#121212;
    color:white;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px;
    background:#1f1f1f;
}

.topbar h1{
    margin:0;
    font-size:24px;
}

#chat-box{
    flex:1;
    overflow-y:auto;
    padding:20px;
}

.user{
    text-align:right;
    margin:10px;
}

.bot{
    text-align:left;
    margin:10px;
}

.message{
    display:inline-block;
    padding:12px;
    border-radius:12px;
    max-width:70%;
    word-wrap:break-word;
}

.user .message{
    background:#0078ff;
    color:white;
}

.bot .message{
    background:#333;
    color:white;
}

.input-area{
    display:flex;
    padding:15px;
    gap:10px;
}

input{
    flex:1;
    padding:12px;
    font-size:16px;
    background:#222;
    color:white;
    border:none;
    border-radius:8px;
}

button{
    padding:12px 20px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    background:#0078ff;
    color:white;
    font-size:14px;
}

button:hover{
    opacity:0.9;
}

/* Light Theme */

body.light{
    background:#f4f4f4;
}

body.light .main{
    background:white;
    color:black;
}

body.light .sidebar{
    background:#eaeaea;
    color:black;
}

body.light .history-item{
    background:white;
    border:1px solid #ddd;
}

body.light .topbar{
    background:#ffffff;
    border-bottom:1px solid #ddd;
}

body.light .bot .message{
    background:#e5e5e5;
    color:black;
}

body.light input{
    background:white;
    color:black;
    border:1px solid #ccc;
}

body.light button{
    background:#0078ff;
    color:white;
}