html
{
    margin: 0;
    padding: 0;
}
body
{
    height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    overflow-x: hidden;
    color: black;
}

dialog
{
    border-radius: 20px;
    outline: none;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.1);
    padding: 10px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
dialog[open]
{
    animation: opened 0.5s;
}
@keyframes opened {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

.chat_box
{
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.chat_back
{
    height: 90vh;
    width: 90vw;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    
    display: flex;
    flex-direction: column;
}
.chat_history
{
    flex-grow: 1; 
    padding: 16px;
    overflow-y: auto;
    border-bottom: 1px solid #e0e0e0;
}

.infos_area
{
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 16px;
}
.buttond
{
    padding: 10px 16px;
    border: none;
    background-color: #fcdd0f;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.buttond:hover
{
    background-color: #d1c70b;
}
.button
{
    padding: 10px 16px;
    border: none;
    background-color: #d3d3d3;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.button:hover
{
    background-color: #c5c5c5;
}
.disabled
{
    padding: 10px 16px;
    border: none;
    background-color: #c9c9c9;
    color: gray;
    border-radius: 20px;
}

.input_area
{
    padding: 10px 16px;
    display: flex;
    gap: 8px;
}
.input
{
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 16px;
    outline: none;
}
.checkbox
{
    outline: none;
    border: none;
    transition: 0.5s;
}
.checkbox:hover
{
    cursor: pointer;
}
.sendbtn
{
    padding: 10px 16px;
    border: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.sendbtn:hover
{
    background-color: #0056b3;
}


.msg-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.msg-container.self {
    align-items: flex-end;
    margin-left: auto;
}

.msg-container.normal {
    align-items: flex-start;
    margin-right: auto;
}

.msg-container.system {
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.msg-container.self .user-info {
    flex-direction: row-reverse;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.msg-container.self .avatar {
    margin-left: 8px;
    margin-right: 0;
}

.sender-name {
    font-size: 16px;
    color: #555;
    font-weight: bold;
}

.msg-content {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 15px;
    background-color: #f0f2f5;
    
    max-width: 75%; 
}

.msg-container.self .msg-content {
    background-color: #007bff;
}

.msg-container.normal .msg-content {
    background-color: #d3d3d3;
}

.msg-bubble {
    color: #000;
    font-size: 18px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.msg-container.self .msg-bubble {
    color: #fff;
}


.extra-text {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.timestamp {
    font-size: 10px;
    color: #999;
    align-self: flex-end;
    margin-top: 5px;
}

.msg-container.self .timestamp {
    color: #e0e0e0;
}

.msg-container.system {
    text-align: center;
    color: #888;
    padding: 5px;
}
.system-message {
    text-align: center;
    color: #888;
    padding: 5px;
    font-size: 14px;
    margin: 5px auto;
}



body
{
    height: 100vh;
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    overflow-x: hidden;
    color: black;
    transition: background-color 0.3s ease, color 0.3s ease;
}


body.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}


body.dark-mode .chat_back {
    background-color: #1e1e1e !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}


body.dark-mode .chat_history {
    border-bottom: 1px solid #333 !important;
    transition: border-bottom-color 0.3s ease;
}


body.dark-mode .infos_area {
    border-bottom: 1px solid #333 !important;
    transition: border-bottom-color 0.3s ease;
}


body.dark-mode .input {
    background-color: #2c2c2c !important;
    border: 1px solid #555 !important;
    color: #e0e0e0 !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}


body.dark-mode .input::placeholder {
    color: #888 !important;
    transition: color 0.3s ease;
}


body.dark-mode dialog {
    background-color: #2c2c2c !important;
    color: #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}


body.dark-mode .button,
body.dark-mode .buttond,
body.dark-mode .sendbtn {
    transition: background-color 0.3s ease, color 0.3s ease;
}


body.dark-mode .msg-content {
    background-color: #383838 !important;
    transition: background-color 0.3s ease;
}


body.dark-mode .msg-container.self .msg-content {
    background-color: #007bff !important;
    transition: background-color 0.3s ease;
}


body.dark-mode .msg-container.self .msg-bubble {
    color: #fff !important;
    transition: color 0.3s ease;
}

body.dark-mode .msg-container.normal .msg-bubble {
    color: #fff !important;
}

body.dark-mode .sender-name {
    color: #b0b0b0 !important;
    transition: color 0.3s ease;
}


body.dark-mode .extra-text {
    color: #b0b0b0 !important;
    transition: color 0.3s ease;
}


body.dark-mode .timestamp {
    color: #888 !important;
    transition: color 0.3s ease;
}


body.dark-mode .msg-container.self .timestamp {
    color: #e0e0e0 !important;
    transition: color 0.3s ease;
}


body.dark-mode .system-message {
    color: #b0b0b0 !important;
    transition: color 0.3s ease;
}