.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.tour-welcome-modal {
    background: white; /* Cambiato da gradient a bianco */
    border-radius: 20px;
    padding: 30px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    color: #333; /* Cambiato da white a scuro */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.5s ease-out;
}

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

.tour-welcome-modal h1 {
    margin: 0 0 15px 0;
    font-size: 2.2em;
    font-weight: bold;
}

.tour-logo {
    width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.tour-welcome-modal p {
    margin: 0 0 25px 0;
    font-size: 1.1em;
    line-height: 1.5;
    opacity: 0.9;
}

.tour-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tour-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tour-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
}

.tour-btn.primary {
    background: white;
    color: #f89b31;
    border-color: white;
}

.tour-btn.primary:hover {
    background: #f8f8f8;
}

.tour-step {
    position: fixed;
    z-index: 10001;
    background: white;
    border-radius: 15px;
    padding: 20px;
    max-width: 320px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    animation: stepFadeIn 0.3s ease-out;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tour-step::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.tour-step.arrow-left::before {
    border-right-color: white;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
}

.tour-step.arrow-right::before {
    border-left-color: white;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
}

.tour-step.arrow-top::before {
    border-bottom-color: white;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.tour-step.arrow-bottom::before {
    border-top-color: white;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.tour-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.tour-step-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f89b31, #b8941c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    font-size: 1.2em;
}

.tour-step-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.tour-step-content {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.tour-step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-progress {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 0.9em;
}

.tour-controls {
    display: flex;
    gap: 10px;
}

.tour-control-btn {
    background: transparent;
    border: 2px solid #f89b31;
    color: #f89b31;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tour-control-btn:hover {
    background: #f89b31;
    color: white;
}

.tour-control-btn.primary {
    background: #f89b31;
    color: white;
}

.tour-control-btn.primary:hover {
    background: #b8941c;
}

.tour-spotlight {
    position: fixed;
    z-index: 9999;
    border: 3px solid #f89b31;
    border-radius: 10px;
    box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.5);
    animation: spotlightPulse 2s infinite;
    pointer-events: none;
}

@keyframes spotlightPulse {
    0%, 100% {
        border-color: #f89b31;
        box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.5), 0 0 20px #f89b31;
    }
    50% {
        border-color: #ffc107;
        box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.5), 0 0 30px #ffc107;
    }
}

.premium-feature {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    display: inline-block;
    margin-top: 5px;
}

.tour-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tour-close:hover {
    color: white;
}

@media (max-width: 768px) {
    .tour-welcome-modal {
        padding: 20px;
        margin: 20px;
    }
    
    .tour-welcome-modal h1 {
        font-size: 1.8em;
    }
    
    .tour-step {
        max-width: 280px;
        padding: 15px;
    }
    
    .tour-buttons {
        flex-direction: column;
        align-items: center;
    }
}
/* Aggiungi questi stili al tuo welcome-tour.css esistente */

/* Miglioramenti mobile per i tooltip */
@media (max-width: 768px) {
    .tour-step {
        max-width: calc(100vw - 40px);
        padding: 15px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    
    /* Posizionamento speciale per elementi del menu in basso */
    .tour-step.bottom-menu-tooltip {
        position: fixed !important;
        left: 20px !important;
        right: 20px !important;
        bottom: 200px !important;
        top: auto !important;
        transform: none !important;
        max-width: none !important;
        width: calc(100% - 40px) !important;
    }
    
    .tour-step.bottom-menu-tooltip::before {
        display: none; /* Nascondi la freccia per i tooltip del menu */
    }
    
    .tour-step-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .tour-step-title {
        font-size: 1.1em;
    }
    
    .tour-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tour-control-btn {
        flex: 1;
        min-width: 70px;
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    /* Assicurati che i tooltip non vadano sopra il menu */
    .tour-step {
        z-index: 10002 !important;
    }
}

/* Miglioramenti per il welcome modal su mobile */
@media (max-width: 768px) {
    .tour-welcome-modal {
        margin: 15px;
        padding: 20px;
        max-width: none;
        width: calc(100% - 30px);
    }
    
    .tour-welcome-modal h1 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    
    .tour-welcome-modal p {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .tour-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .tour-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1em;
    }
}

/* Logo nel welcome modal */
.tour-logo {
    width: 350px;
    height: auto;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .tour-logo {
        width: 200px;
        margin-bottom: 10px;
    }
}

/* Animazioni più fluide per mobile */
@media (max-width: 768px) {
    .tour-step {
        animation: mobileStepFadeIn 0.3s ease-out;
    }
    
    @keyframes mobileStepFadeIn {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* Spotlight più visibile su mobile */
@media (max-width: 768px) {
    .tour-spotlight {
        border-width: 2px;
        box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.6);
    }
    
    @keyframes spotlightPulse {
        0%, 100% {
            border-color: #f89b31;
            box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.6), 0 0 15px #f89b31;
        }
        50% {
            border-color: #ffc107;
            box-shadow: 0 0 0 5000px rgba(0, 0, 0, 0.6), 0 0 25px #ffc107;
        }
    }
}

/* Miglioramenti per i pulsanti evidenziati dal tour */
.mode-button.tour-highlighted {
    position: relative;
    z-index: 10001;
}

/* Assicurati che il carosello sia scrollabile anche durante il tour */
.carousel-content {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Stili per il progresso del tour più visibili su mobile */
@media (max-width: 768px) {
    .tour-progress {
        background: rgba(208, 166, 20, 0.1);
        padding: 5px 10px;
        border-radius: 15px;
        font-weight: 600;
    }
}
/* Nuovo stile per tooltip centrati su mobile */
.tour-step.mobile-centered-tooltip {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 40px) !important;
    max-width: 320px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    z-index: 10002 !important;
    margin: 0 !important;
}

/* Nascondi le frecce per i tooltip centrati */
.tour-step.mobile-centered-tooltip::before {
    display: none !important;
}

/* Miglioramenti per i controlli su mobile centrato */
@media (max-width: 768px) {
    .tour-step.mobile-centered-tooltip .tour-controls {
        flex-direction: row !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .tour-step.mobile-centered-tooltip .tour-control-btn {
        flex: 1 1 auto !important;
        min-width: 80px !important;
        max-width: 120px !important;
        padding: 12px 8px !important;
        font-size: 14px !important;
        text-align: center !important;
    }
    
    .tour-step.mobile-centered-tooltip .tour-step-content {
        max-height: 40vh !important;
        overflow-y: auto !important;
        padding-right: 5px !important;
        margin-bottom: 15px !important;
    }
    
    .tour-step.mobile-centered-tooltip .tour-step-footer {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        padding-top: 15px !important;
        border-top: 1px solid #eee !important;
        margin-top: 10px !important;
    }
    
    .tour-step.mobile-centered-tooltip .tour-progress {
        margin-bottom: 12px !important;
        text-align: center !important;
        font-weight: 600 !important;
        background: rgba(208, 166, 20, 0.1) !important;
        padding: 8px 16px !important;
        border-radius: 20px !important;
        display: inline-block !important;
    }
}

/* Assicurati che il tooltip sia sempre sopra tutto su mobile */
@media (max-width: 768px) {
    .tour-step.mobile-centered-tooltip {
        z-index: 10003 !important;
    }
}
/* Ottimizzazione pulsanti con icone */
.tour-control-btn {
    background: transparent;
    border: 2px solid #f89b31;
    color: #f89b31;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-control-btn:hover {
    background: #f89b31;
    color: white;
    transform: scale(1.1);
}

.tour-control-btn.primary {
    background: #f89b31;
    color: white;
}

.tour-control-btn.primary:hover {
    background: #b8941c;
    transform: scale(1.1);
}

/* Miglioramenti specifici per mobile */
@media (max-width: 768px) {
    .tour-step.mobile-centered-tooltip .tour-controls {
        flex-direction: row !important;
        gap: 12px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .tour-step.mobile-centered-tooltip .tour-control-btn {
        flex: 0 0 auto !important;
        min-width: 45px !important;
        max-width: 45px !important;
        width: 45px !important;
        height: 45px !important;
        padding: 0 !important;
        font-size: 16px !important;
    }
    
    /* Stile distintivo per il pulsante principale */
    .tour-step.mobile-centered-tooltip .tour-control-btn.primary {
        background: #f89b31 !important;
        color: white !important;
        border-color: #f89b31 !important;
        box-shadow: 0 2px 8px rgba(208, 166, 20, 0.3) !important;
    }
}