/* CONTAINER CONTROLLI SUPERIORI */
.top-controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px auto;
    width: fit-content;
    z-index: 100;
}

/* PULSANTI LINGUA - DESIGN ELEGANTE */
.language-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 8px;
    border: 1px solid rgba(0, 255, 168, 0.2);
    margin: 0;
    width: fit-content;
    z-index: 100;
    text-align: center;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: rgba(0, 255, 168, 0.2);
    border-color: rgba(0, 255, 168, 0.5);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: rgba(0, 255, 168, 0.3);
    border-color: #00FFA8;
    color: #00FFA8;
    text-shadow: 0 0 10px rgba(0, 255, 168, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .top-controls-container {
        flex-direction: column;
        gap: 15px;
        margin: 15px auto;
    }
    
    .language-selector {
        margin: 0;
        gap: 4px;
        padding: 6px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .pdf-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }
}

/* PULSANTE DOWNLOAD PDF */
.pdf-download-container {
    position: static;
    margin: 0;
    z-index: 100;
}

.pdf-btn {
    background: linear-gradient(135deg, #00FFA8 0%, #3be3ff 100%);
    border: none;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 168, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 168, 0.2);
}

.pdf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 168, 0.4);
    background: linear-gradient(135deg, #3be3ff 0%, #00FFA8 100%);
    border-color: rgba(0, 255, 168, 0.5);
}

.pdf-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 168, 0.3);
}

/* Loading state del pulsante PDF */
.pdf-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.pdf-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive per PDF button */
@media (max-width: 768px) {
    .pdf-download-container {
        display: none !important;
    }
}
