/*----------------------------------------------------------------------------------
style generico
-----------------------------------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px; 
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 2.5rem;
    font-weight: 550;
    font-family: Impact;  
    color: black;
    letter-spacing: 1px;
}

.user-button {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4ecdc4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-button:hover {
    background-color: #3db8af;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.main-content {
    padding: 20px;
    flex-grow: 1;
}


/*----------------------------------------------------------------------------------
stile specifico per autenticazione
-----------------------------------------------------------------------------------*/
.auth-page-body {
    margin: 0;
    max-height: fit-content;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 450px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    margin: auto;
}

.auth-logo-container {
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.auth-logo-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: #cf7e00;
    text-decoration: none;
    letter-spacing: -1px;
}

.auth-card {
    background: #ffffff;
    width: 100%;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    text-align: left;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
    text-align: center;
}

.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #475569;
}

.auth-label i { width: 20px; margin-right: 8px; color: #94a3b8; }

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-wrapper .auth-input {
    padding-right: 45px !important; /* Spazio per non sovrapporre il testo all'icona */
    width: 100%;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.toggle-password {
    position: absolute !important;
    right: 12px; /* Distanza dal bordo destro interno */
    top: 50%;
    transform: translateY(-50%); /* Centra l'icona verticalmente */
    cursor: pointer;
    color: #e9bc81;
    z-index: 999; /* La porta in primo piano */
    font-style: normal !important;
    font-size: 1.1rem;
    display: inline-block;
    user-select: none;
    line-height: 1;
    background: white; /* Opzionale: evita trasparenze strane */
    padding: 0 5px;
}

.toggle-password:hover {
    color: #cf7e00;
}

/* Modifica specifica per i criteri */
.crit-item.valid { color: #10b981; font-weight: 600; }

/* Badge Obbligatorio/Opzionale */
.auth-req { color: #ef4444; margin-left: 2px; }
.auth-opt { font-size: 0.7rem; color: #94a3b8; font-weight: 400; margin-left: 4px; }

/* Box Suggerimenti Password */
#psw-criteria {
    display: none;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 0.75rem;
    border: 1px solid #e2e8f0;
}

.crit-item {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.crit-item.valid { color: #10b981; font-weight: 600; }
.crit-item.valid::before { content: "✓ "; }

/* Bottoni */
.auth-btn-primary {
    width: 100%;
    background-color: #cf7e00;
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
}

.auth-btn-primary:hover { background-color: #4338ca; }

.auth-btn-ghost {
    width: 100%;
    background: transparent;
    color: #64748b;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.2s;
}

.auth-btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Alert */
.auth-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Responsive per Tablet e Mobile */
@media (max-width: 640px) {
    .auth-card { padding: 1.5rem; border-radius: 0.75rem; }
}

@media (max-width: 480px) {
    .auth-page-body {
        align-items: flex-start; /* Inizia dall'alto sui telefoni */
    }
    .auth-wrapper {
        padding: 0;
        max-width: 100%;
        max-height: 100%;
    }
    .auth-card {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
}

/*------------------------------------------------------------------------------------------------------------------------------
style specifico per Home.html
-----------------------------------------------------------------------------------------------------------------------------*/
.daily-recipe-section {
    margin-bottom: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 450;
    font-family: Impact;
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.square-button {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background-color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.square-button:hover {
    background-color: #ff6b6b;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.2);
}

.square-button.active {
    background-color: #ff6b6b;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.2);
}

.daily-dishes-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 900px;
    margin-bottom: 15px;
}

.dish-card {
    background-color: #fff;
    border-radius: 0 20px 20px 0; 
    padding: 32.5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    transform: translateX(-100%); /* Parte completamente fuori dallo schermo a sinistra */
    opacity: 0;
    animation: slideInFromLeft 0.8s forwards;
    display: flex; /* Per allineare icona e contenuto */
    align-items: center;
    gap: 32.5px; 
    cursor: pointer; 
    height: 325px; 
    min-height: 325px; 
    max-height: 325px; 
}

/* Colori per i dessert (tutti viola) */
.daily-dishes-container.dessert-mode .dish-card:nth-child(1),
.daily-dishes-container.dessert-mode .dish-card:nth-child(2),
.daily-dishes-container.dessert-mode .dish-card:nth-child(3) {
    background-color: #9c27b0; 
}

/* Colori testo per i dessert */
.daily-dishes-container.dessert-mode .dish-card .dish-title,
.daily-dishes-container.dessert-mode .dish-card .dish-description {
    color: white;
}

.daily-dishes-container.dessert-mode .dish-card .dish-description {
    color: rgba(255, 255, 255, 0.6); 
}

.dish-card:nth-child(2) {
    animation-delay: 0.2s;
}

.dish-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes slideInFromLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.dish-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.dish-card.clicked {
    animation: clickEffect 0.3s ease;
}

.dish-icon {
    width: 135.2px; 
    height: 135.2px; 
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.38rem; 
    color: #333;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.dish-card:nth-child(1) {
    background-color: #ff8c42;
}

.dish-card:nth-child(2) {
    background-color: #4caf50;
}

.dish-card:nth-child(3) {
    background-color: #42a5f5;
}

.dish-card .dish-icon{
    background-color: white;
}

.dish-content {
    flex-grow: 1;
    height: 100%; /* occupa tutta l'altezza disponibile */
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra verticalmente il contenuto */
}

.dish-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.3; /* controllo altezza righe */
}

.dish-description {
    color: #666;
    line-height: 1.5;
    overflow: hidden; /* nasconde testo in eccesso */
    text-overflow: ellipsis; /* aggiunge ... per testo troppo lungo */
    display: -webkit-box; /* supporto per limitare righe */
    -webkit-line-clamp: 4; /* mostra massimo 3 righe */
    line-clamp: 5;
    -webkit-box-orient: vertical; /* orientamento verticale */
}

.menu-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.menu-button {
    background-color: transparent;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-button i {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.menu-button span {
    font-size: 0.75rem;
    font-weight: 500;
}

.menu-button.active {
    color: #ff6b6b;
    transform: translateY(-10px);
}

.menu-button.active::before {
    content: '';
    position: absolute;
    top: -5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff6b6b;
}

.menu-button:not(.active):hover {
    color: #4ecdc4;
    background-color: rgba(78, 205, 196, 0.05);
    transform: translateY(-5px);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.bounce {
    animation: bounce 0.4s ease;
}

@keyframes userBounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.015); }
}

.user-button.bounce {
    animation: userBounce 0.4s ease;
}


/*------------------------------------------------------------------------------------------------------------------------
style specifico per riccetario
--------------------------------------------------------------------------------------------------------------------------*/
.ricettario-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
        
.ricettario-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    height: 80px;
    /* Nessun position: relative, il pulsante non sarà assoluto */
}

.ricettario-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    flex-shrink: 0;
    background-color: #f0f0f0; /* Sfondo come in preferiti */
}

.ricettario-content {
    flex-grow: 1;
    overflow: hidden;
    min-width: 0; /* Permette al testo di restringersi */
}

.ricettario-title {
    font-size: 0.95rem;  /* Ridotto come in preferiti */
    color: #333;
    font-weight: 600;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ricettario-info {
    font-size: 0.75rem;
    color: #666;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pulsante addToFavorite specifico per le card del ricettario */
.ricettario-card .addToFavorite {
    position: static; /* Annulla l'absolute globale */
    background: none;
    border: none;
    font-size: 1.2rem; /* Come il pulsante remove */
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ricettario-card .addToFavorite:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.ricettario-card .addToFavorite.favorite {
    color: #ff6b6b;
}

/* Adattamenti per mobile – copiati da .preferiti-card */
@media (max-width: 480px) {
    .ricettario-card {
        height: auto;
        min-height: 70px;
        padding: 12px;
    }

    .ricettario-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .ricettario-content {
        min-width: 0;
    }

    .ricettario-title,
    .ricettario-info {
        max-width: calc(100vw - 140px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ricettario-card .addToFavorite {
        padding: 6px;
        font-size: 1.1rem;
    }
}


/*--------------------------------------------------------------------------------------------------------------------
style specifico per scansiona
----------------------------------------------------------------------------------------------------------------------*/
.scansione-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.scansione-area {
    width: 100%;
    max-width: 500px;
    height: 320px;
    background-color: #f5f5f5;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

#reader {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

#reader video,
#reader canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.camera-status {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.ricerca-manuale {         
    padding: 0.6rem 0.8rem;       
    flex-shrink: 0;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 500px;
    width: 100%;
    margin: 10;
}

.ricerca-manuale label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #2b3e4b;
}

.input-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.input-group input {
    height: 40px;
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    padding: 8px 12px;
    border: 1.5px solid #d4d8dd;
    border-radius: 40px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

.input-group input:focus {
    border-color: #005f73;
}

.input-group button {
    align-items: center;
    width: 55px;
    height: 40px;
    background: #0a9396;
    border: none;
    color: white;
    font-weight: 500;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(10,147,150,0.3);
}

.input-group button:hover {
    background: #0b7b7e;
}

.risultato-scansione {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
    padding: 0.5rem 0.7rem;   
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    width: 100%;
    max-width: 500px;
    flex-shrink: 0;
}

.risultato-titolo {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.risultato-testo {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
    word-break: break-word;
    flex: 1;
}

.product-detail {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}


/*---------------------------------------------------------------------------------------
Stily per tags e button nei blocchi recipe in Home.html
----------------------------------------------------------------------------------------*/

.dish-tags {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: absolute;
}

.tag {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    max-width: 120px;
}

.tag i {
    font-size: 0.8rem;
}

/* Tags per main dishes (testo nero, senza sfondo) */
.dish-card:not(.dessert-mode) .tag {
    background: none;
    color: #333;  /* Testo nero */
    border: none;
}

/* Tags per dessert (testo bianco, senza sfondo) */
.dessert-mode .dish-card .tag {
    background: none;
    color: white;  /* Testo bianco */
    border: none;
}

/* Pulsante addToFavorite */
.addToFavorite {
    position: absolute;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    z-index: 2;
}

.addToFavorite:hover {
    transform: scale(1.1);
}

.addToFavorite.favorite {
    color: #ff6b6b;
}

/* Layout per mobile (fino a 767px) */
.mobile-tags {
    top: 15px;
    left: 15px;
    display: flex;
}

.mobile-favorite {
    top: 15px;
    right: 15px;
    display: block;
}

.desktop-tags {
    display: none;
}

.desktop-favorite {
    display: none;
}

/* Layout per tablet/desktop (768px e oltre) */
@media (min-width: 768px) {
    .mobile-tags {
        display: none;
    }
    
    .mobile-favorite {
        display: none;
    }
    
    .desktop-tags {
        display: flex;
        bottom: 15px;
        left: 15px;
    }
    
    .desktop-favorite {
        display: block;
        bottom: 15px;
        right: 15px;
    }
}

/* Aggiustamenti per i dessert */
.dessert-mode .dish-card .addToFavorite {
    color: rgba(255, 255, 255, 0.7);
}

.dessert-mode .dish-card .addToFavorite.favorite {
    color: #ff6b6b;
}

.dessert-mode .dish-card .addToFavorite:hover {
    color: white;
}


/*------------------------------------------------------------------------------------------------------------
Style specifico per Preferiti.html 
--------------------------------------------------------------------------------------------------------------*/
.preferiti-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    text-align: center;
}

.preferiti-vuoto {
    max-width: 500px;
}

.preferiti-vuoto-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.preferiti-vuoto-titolo {
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 450;
    font-family: Impact;
}

.preferiti-vuoto-testo {
    color: #999;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Container per le ricette preferite */
.preferiti-ricette-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Card per le ricette preferite */
.preferiti-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    height: 80px;
    position: relative;
}

.preferiti-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.preferiti-card:active {
    animation: clickEffect 0.3s ease;
}

.preferiti-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.preferiti-content {
    flex-grow: 1;
    overflow: hidden;
}

.preferiti-title {
    font-size: 0.95rem;  
    color: #333;
    font-weight: 600;
    margin: 0 0 3px 0;  
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preferiti-info {
    font-size: 0.75rem;  
    color: #666;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.removeFromFavorite {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.removeFromFavorite:hover {
    background-color: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .preferiti-ricette-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
        padding: 15px;
    }
    
    .preferiti-card {
        height: 70px;
        padding: 12px;
    }
    
    .preferiti-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .preferiti-card {
        min-height: 60px;
    }
    
    .preferiti-content {
        flex-grow: 1;
        overflow: hidden;
        min-width: 0;  
    }
    
    .preferiti-title, .preferiti-info {
        max-width: calc(100vw - 140px);  
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/*------------------------------------------------------------------------------------------------------------
Style specifico per Login / Registrazione
--------------------------------------------------------------------------------------------------------------*/
.auth-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 35px 30px;
    background-color: #fff;
    border-radius: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    font-family: Impact, 'Segoe UI', sans-serif;
    font-weight: 450;
    font-size: 2.2rem;
    color: #333;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 6px;
    color: #ff6b6b;
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1.5px solid #d4d8dd;
    border-radius: 40px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    background-color: #fff;
}

.btn-login, .btn-registrati, .btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.btn-login {
    background: #00c407;
    box-shadow: 0 4px 10px rgba(0, 196, 7, 0.2);
}

.btn-login:hover {
    background: #008d05;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 196, 7, 0.3);
}

.btn-registrati, .btn-primary {
    background: #2196F3;
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
}

.btn-registrati:hover, .btn-primary:hover {
    background: #186fb6;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(33, 150, 243, 0.3);
}

.alert-error {
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 500;
    padding: 10px;
    background-color: #fff1f1;
    border-radius: 40px;
    border: 1px solid #ffcdcd;
}

.alert-success {
    color: #28a745;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 500;
    padding: 10px;
    background-color: #d4edda;
    border-radius: 40px;
    border: 1px solid #c3e6cb;
}

.alert-success a {
    color: #155724;
    font-weight: 600;
    text-decoration: underline;
}

.alert-success a:hover {
    text-decoration: none;
}

/* Adattamento per schermi piccoli */
@media (max-width: 480px) {
    .auth-container {
        margin: 20px 15px;
        padding: 25px 20px;
    }
    .auth-title {
        font-size: 1.9rem;
    }
}

/*---------------------------------------------------------------------------------------
adattamento per dispositivi
----------------------------------------------------------------------------------------*/
@media (min-width: 768px) {
    .daily-dishes-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 30px;
    }

    .dish-card {
        width: calc(50% - 15px);
        min-height: 200px;
    }

    .dish-card:last-child {
        width: calc(50% - 15px);
    }
}

@media (min-width: 992px) {
    .daily-dishes-container {
        max-width: 1200px;
        gap: 40px;
    }

    .dish-card {
        width: calc(33.333% - 27px);
        margin-right: 0;
    }

    .dish-card:last-child {
        width: calc(33.333% - 27px);
    }
    
    @media (min-width: 1200px) {
        .main-content {
            padding: 30px 40px;
        }
        
        .dish-card {
            width: calc(33.333% - 30px);
            padding: 30px;
        }
    }
}

@media (max-width: 576px) {
    .dish-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .dish-icon {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
}
