/* ========================================
   FULLSCREEN & PWA BUTTONS
   ======================================== */

/* Bottone Fullscreen */
#fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 80px;
    width: 50px;
    height: 50px;
    background: rgba(124, 58, 237, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    font-family: Arial, sans-serif;
}

#fullscreen-btn:hover {
    background: rgba(124, 58, 237, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

#fullscreen-btn:active {
    transform: scale(0.95);
}

/* Bottone Install PWA */
#install-pwa-btn {
    position: fixed;
    top: 20px;
    right: 140px;
    width: 50px;
    height: 50px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: none; /* Nascosto di default, appare via JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#install-pwa-btn:hover {
    background: rgba(34, 197, 94, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

#install-pwa-btn:active {
    transform: scale(0.95);
}

/* Animazione pulse per install button */
@keyframes pulse-install {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(34, 197, 94, 0.8);
    }
}

#install-pwa-btn.pulse {
    animation: pulse-install 2s infinite;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #fullscreen-btn,
    #install-pwa-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 10px;
    }
    
    #fullscreen-btn {
        right: 65px;
    }
    
    #install-pwa-btn {
        right: 115px;
    }
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    #fullscreen-btn,
    #install-pwa-btn {
        top: 10px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    #fullscreen-btn {
        right: 55px;
    }
    
    #install-pwa-btn {
        right: 100px;
    }
}

/* Nascosto quando già in fullscreen (opzionale) */
body:fullscreen #fullscreen-btn {
    /* Puoi nasconderlo o cambiare icona */
}

/* Toast notification per installazione PWA */
.pwa-install-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(34, 197, 94, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}
