* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
}

#inbox {
    list-style: none;
    padding: 10px;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#inbox li {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 6px;
    max-width: calc(100% - 20px);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

#self {
    background: #4caf50;
    color: white;
    align-self: flex-end;
}

#other {
    background: #e0e0e0;
    color: black;
    align-self: flex-start;
}

#input-area {
    position: relative;
    display: flex;
    padding: 6px 10px;
    gap: 8px;
    border-top: 1px solid #ccc;
    align-items: center;
}

textarea {
    flex: 1;
    height: 40px;
    resize: none;
    padding: 8px;
}

button {
    height: 40px;
    padding: 0 12px;
    cursor: pointer;
}

/* upload button */
#upload-btn {
    width: 40px;
}

/* popup menu */
#upload-menu {
    position: absolute;
    bottom: 50px;
    left: 10px;
    display: none;
    gap: 5px;
    padding: 8px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    flex-wrap: wrap;
    width: 220px;
}

#upload-menu img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
}