body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
}

header {
    background: #333;
    color: white;
    padding: 10px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

#menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    display: block;
}

main {
    display: flex;
    height: calc(100vh - 52px);
}

#chat-list {
    width: 100%;
    max-width: 300px;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    border-right: 1px solid #444;
    display: none;
}

#toggle-chat-list {
    display: none;
}

#chat-list input {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #444;
    background: #555;
    color: white;
}

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

.chat-item {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #444;
    align-items: center;
}

.chat-item img {
    border-radius: 50%;
    margin-right: 10px;
}

.chat-item .name {
    font-weight: normal;
}

.chat-item .last-message {
    color: #bbb;
}

.chat-item .timestamp {
    color: #bbb;
    font-size: 12px;
    margin-left: auto;
}

.unread .name {
    font-weight: bold;
}

#chat-window {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
}

#chat-window header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

#chat-window header img {
    width: 40px; /* Tamaño de la imagen */
    height: 40px; /* Tamaño de la imagen */
    object-fit: cover; /* Ajusta la imagen al contenedor */
    border-radius: 50%; /* Convierte la imagen en un círculo */
    margin-right: 10px; /* Espacio entre la imagen y el texto */
}

#chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.message {
    display: flex;
    margin-bottom: 10px;
}

.message p {
    background: #444;
    padding: 10px;
    border-radius: 10px;
    max-width: 60%;
    color: white;
}

.message.received p {
    background: #555;
    margin-left: auto;
}

.message.sent p {
    background: #007bff;
    margin-right: auto;
}

.timestamp {
    font-size: 12px;
    color: #bbb;
    margin-left: 10px;
}

#chat-window footer {
    display: flex;
    align-items: center;
    border-top: 1px solid #444;
    padding-top: 10px;
}

#attach-btn {
    background: none;
    border: none;
    font-size: 24px;
    margin-right: 10px;
    position: relative;
    color: white;
}

#attach-menu {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 10px;
    background: #333;
    border: 1px solid #444;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#attach-menu label {
    display: block;
    padding: 10px;
    color: #ddd;
    text-decoration: none;
    cursor: pointer;
}

#attach-menu label:hover {
    background: #555;
}

#chat-window input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 20px;
    background: #555;
    color: white;
}

#send-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 20px;
    margin-left: 10px;
}

@media (min-width: 768px) {
    #menu-btn {
        display: none;
    }

    nav ul {
        display: block;
    }

    #chat-list {
        display: block;
    }

    #toggle-chat-list {
        display: none;
    }
}
