body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 80vh;
}

#login-container {
    padding: 20px;
    text-align: center;
}

#login-container input {
    padding: 10px;
    margin: 10px 0;
    width: 80%;
    max-width: 300px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#login-container button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#chat-container {
    display: flex;
    flex-grow: 1;
}

#sidebar {
    width: 250px;
    border-right: 1px solid #eee;
    padding: 15px;
    background-color: #f8f9fa;
}

#chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#chat-list li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#chat-list li:hover {
    background-color: #e9ecef;
}

#chat-list li.active {
    background-color: #007bff;
    color: white;
}

#main-chat {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#chat-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

#messages-container {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse; /* For virtual scrolling and showing latest messages at bottom */
}

.message {
    background-color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 10px;
    max-width: 70%;
    align-self: flex-start;
}

.message.sent {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
}

.message img, .message video {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 5px;
}

.message-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.message.sent .message-info {
    color: rgba(255, 255, 255, 0.7);
}

#message-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    resize: none;
    height: 40px;
}

#file-input {
    margin-right: 10px;
}

#send-button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

