/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h1 {
    text-align: center;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.predefined-credentials {
    margin-top: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.predefined-credentials p {
    margin-top: 0;
    font-weight: bold;
}

.predefined-credentials ul {
    margin-bottom: 0;
    padding-left: 20px;
}

/* Chat page styles */
.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    background-color: #4CAF50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    margin: 0;
    font-size: 20px;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    background-color: #45a049;
    border-radius: 4px;
}

.logout-btn:hover {
    background-color: #3d8b40;
}

.chat-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.user-list {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.user-list h2 {
    padding: 15px;
    margin: 0;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
}

.user-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-list li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.user-list li:hover {
    background-color: #e9ecef;
}

.user-list li.active {
    background-color: #d4edda;
    font-weight: bold;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    position: relative;
}

.message.sent {
    background-color: #d4edda;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message.received {
    background-color: #e9ecef;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message .sender {
    font-weight: bold;
    display: block;
    margin-bottom: 3px;
}

.message .time {
    font-size: 12px;
    color: #6c757d;
    display: block;
    text-align: right;
    margin-top: 5px;
}

.message-input {
    padding: 15px;
    border-top: 1px solid #ddd;
    display: flex;
}

.message-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.message-input button {
    width: auto;
    padding: 10px 20px;
    border-radius: 20px;
}