img {
    width: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); /* Optional shadow for better depth */
    border-radius: 20px;
    border: none;
    margin-bottom: 2rem;
}

@media (min-width: 768px) { /* Apply rules for larger screens */
    img {
        max-width: 60%; /* Limit the image width */
    }
}

ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

li {
    cursor: pointer; /* Make the entire item clickable */
    margin-bottom: 15px;
    display: flex; /* Align the checkbox and text horizontally */
    align-items: flex-start;  /* Align text with the top of the checkbox */
}

li.completed {
    text-decoration: line-through;
    color: #95a5a6;
    opacity: 0.7;
}

/* General table styling */
table {
    margin: 1rem auto; /* Ensures the table is centered */
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(46, 139, 87, 0.1);
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

/* Table header */
th {
    display: none;
}

/* Table body cells */
td {
    padding: 0.5rem 1rem;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

td:first-child {
    color: #2E8B57;
    font-weight: 600;
    width: 45%;
}

td:last-child {
    width: 55%;
}

hr {
    margin: 3rem 0;
    border: none;
    height: 2px;
    background: linear-gradient(135deg, transparent, #2E8B57, transparent);
    border-radius: 2px;
}

.quantity-button {
    background: #f8f9fa;
    border: 2px solid #2E8B57;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity-button:hover {
    background: #2E8B57;
    color: white;
    transform: scale(1.1);
}

#portionControl {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    font-size: 1.2rem;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

#portionDisplay {
    min-width: 3rem;
    text-align: center;
}

input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 10px;
    accent-color: #2E8B57;
    cursor: pointer;
}