/* General page styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Chat container */
#chat-app {
    width: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Chat App Title */
#app-title {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

/* Inputs and textarea */
#chat-app input,
#chat-app textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 14px;
    text-align: center;
}

#chat-app textarea {
    resize: none;
    height: 60px;
    text-align: center;
}

/* Text formatting toolbar */
#format-bar {
    display: flex;              
    justify-content: center;    
    gap: 3px;                  
    margin-bottom: 5px;        
}

#format-bar #bold-btn,
#format-bar #italic-btn,
#format-bar #underline-btn {
    background-color: #555;   
    color: #fff;              
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;

}

/* Individual button styles */
#bold-btn {
    font-weight: bold;
}

#italic-btn {
    font-style: italic;
}

#underline-btn {
    text-decoration: underline;
}

#format-bar button:hover {
    background-color: #d6d6d6;
}

/* Send button */
#chat-app button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#chat-app button:hover {
    background-color: #45a049;
}

/* Message display area */
#message-area {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    height: 300px;
    overflow-y: auto;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Individual messages */
#message-area p {
    margin: 0;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #e0e0e0;
    word-wrap: break-word;
}

/* Highlight your own messages */
#message-area p.self {
    background-color: #d1ffd6;
    align-self: flex-end;
}
