*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container{
    width: 80%;
    margin: 50px auto;

}

body{
    background-color: antiquewhite;
}

#recipe_table{
    width: 100%;

}

.card{
    width:250px ;
    height: 300px ;
    background-color: whitesmoke;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.card:hover{
    background-color: rgba(0,0,0,0.3);
    cursor: pointer;
}

.img-ricetta{
    margin: 15px;
    max-width: 90%;
    border-radius: 6px;
}

.titolo-ricetta{
    margin: 15px;
}

#cards-container{
    display: flex;
    gap:10px;
    flex-wrap: wrap;
    justify-content: center;

}


#modale-ingredienti {
    display:none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

/* Contenitore del Modale */
#contenuto-modale {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
}


@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


#chiudi-modale-ingredienti {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

#chiudi-modale-ingredienti:hover {
    color: #333;
}


#recipe_table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


#ingrediente-column, #quantità-column{
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ingrediente, .quantità{
padding: 12px 15px;
border-bottom: 1px solid #ccc;
}

@media screen and (max-width:400px) {
    #ingrediente-column, #quantità-column{
    padding: 6px 7px;
 
}

.quantità {
    padding:0;
}
}




#recipe_table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}


#recipe_table tr:last-child td {
    border-bottom: none;
}

#recipe_table tr:hover {
    background-color: #fdfdfd;
}


.quantità {
    font-weight: bold;
    color: #e67e22; 
}

#quantità-column{
    width: 30%;
}

#search-section{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#input-ricerca-ricetta{
    padding: 10px;
    border: none;
    border-radius: 4px 0px 0px 4px;
}

#btn-ricerca{
    padding: 10px;
    border-radius: 0px 4px 4px 0px;
    background-color: orange;
    border: none;
}

#btn-ricerca:hover{
    cursor: pointer;
    background-color: #e67e22;
}

