#weightsDisplay {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 800px; /* Adjusted for a wider layout */
    margin: 40px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-height: 700px; /* Set a maximum height */
    overflow-y: auto; /* Make it scrollable vertically */
}


.weight-entry {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Distribute space between items */
    align-items: center;
}

.weight-entry p, .weight-entry div {
    flex: 1 1 200px; /* Allows wrapping and maintains a minimum width */
    margin: 5px;
}

.weight-entry .date {
    flex-basis: 100%; /* Ensure the date takes full width */
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 15px;
    font-size: 18px;
}

.weight-entry span {
    font-weight: 600;
    color: #007bff;
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
    #weightsDisplay {
        padding: 15px;
        margin: 20px auto;
    }

    .weight-entry p, .weight-entry div {
        flex-basis: auto; /* Stack elements vertically on smaller screens */
    }
}


.no-data {
    color: red;
    font-weight: bold;
}
